[Mesa-dev] [PATCH] Allow glTexImage2D with a depth component cube map

Brian Paul brianp at vmware.com
Mon Nov 28 07:40:08 PST 2011


On 11/26/2011 08:13 PM, Anuj Phogat wrote:
> Hi Brian,
>
>>> This is an updated patch to allow glTexImage2D with a depth component
>>> cube map. Patch
>>> was producing an expected ouput with depth-cube-map test (posted on
>>> piglit mailing list).
>>> But i'm getting an incorrect output since i updated my mesa branch
>>> with git://anongit.freedesktop.org/mesa/mesa.
>>> Luminance value is not getting copied to green and blue channels. So
>>> the color value i'm seeing in fragment
>>> shader is (L,0,0,1). I verified that this issue is only with depth
>>> cube maps not with depth 2D textures.
>>> Is this a known issue? I will try to debug it further.
>>
>> Which driver are you testing with?
> Just figured out that my path for libdrm wasn't set correctly so driver
> was falling back to software rasterizer. glxinfo output:
> OpenGL vendor string: Mesa Project
> OpenGL renderer string: Software Rasterizer
> OpenGL version string: 3.0 Mesa 7.12-devel (git-24d25b5)
> OpenGL shading language version string: 1.30
> So, the software rasterizer is not copying the Luminance value to green
> and blue channels.
>
> I'm getting the expected output (L,L,L,1) on setting correct path for
> libdrm. glxinfo output:
> OpenGL vendor string: Tungsten Graphics, Inc
> OpenGL renderer string: Mesa DRI Intel(R) Sandybridge Mobile
> x86/MMX/SSE2
> OpenGL version string: 3.0 Mesa 7.12-devel (git-24d25b5)
> OpenGL shading language version string: 1.30

I think you need to update swrast/s_texfilter.c to use 
sample_depth_texture() for cube textures.  Same thing for 1D/2D_ARRAY 
textures too, it appears.

-Brian


More information about the mesa-dev mailing list