[Mesa-dev] [PATCH 2/2] Add depth cube map support to mesa swrast
Anuj Phogat
anuj.phogat at gmail.com
Thu Dec 1 15:50:21 PST 2011
On Thu 01 Dec 2011 06:56:09 AM PST, Brian Paul wrote:
> On 11/30/2011 12:39 PM, Anuj Phogat wrote:
>> From: Anuj Phogat<anuj.phogat at gmail.com>
>>
>> I made the suggested changes to swrast/s_texfilter.c (see the patch
>> listed below). Now it render
>> polygons without any texture (black) in depth-cube-map test (see the
>> patch sent on Nov 28 to piglit mailing list).
>> But the expected output is polygons rendered with different greyscale
>> (depth) textures.
>>
>> Some debugging info:
>> _mesa_choose_tex_format() returns MESA_FORMAT_Z32
>> _mesa_get_texstore_func() returns _mesa_texstore_z32
>> Based on MESA_FORMAT_Z32, selected dstType = GL_UNSIGNED_INT
>> Verified the values stored in depthValues[i] in
>> _mesa_unpack_depth_span(). Correct pixel values (depth values) are
>> reflected in this variable.
>> depthValues[i] is converted to GLuint and stored in zValues[i]
>>
>> But while rendering swImg->FetchTexel() (called from
>> sample_depth_texture() in swrast/s_texfilter.c) is unable to fetch
>> the corect texel values.
>>
>> Any thoughts on what could go wrong after storing the depth texture
>> correctly?
>
> Off-hand, I don't know. I'd have to debug it a bit, but I probably
> won't have time to do that for a while. Maybe you could take a closer
> look.
Yes, I'll dig in further.
> In any case, the patch looks correct. I think the bug is elsewhere.
> Reviewed-by: Brian Paul <brianp at vmware.com>
>
> Can you commit this?
I don't have push access on mesa-dev. I'll appreciate if you can do it
for me. Please make sure to commit the patch
for src/mesa/main/teximage.c as well. I sent it on same thread on Nov
23.
Thanks
-Anuj
More information about the mesa-dev
mailing list