[Mesa-dev] [PATCH] mesa: Use GL_RED for DEPTH_TEXTURE_MODE for everything but legacy GL.

Paul Berry stereotype441 at gmail.com
Wed Dec 19 17:59:53 PST 2012

On 19 November 2012 11:06, Kenneth Graunke <kenneth at whitecape.org> wrote:

> On 11/18/2012 05:43 PM, Ian Romanick wrote:
>> On Nov 17, 2012, at 11:26 PM, Kenneth Graunke <kenneth at whitecape.org>
>> wrote:
>>  According to page 163 of the ES 3.0 spec:
>>> "Texture lookups involving textures with depth component data generate
>>> a texture base color C_b either using depth data directly or by
>>> performing a comparison with the D_ref value used to perform the
>>> lookup, as described in section 3.8.15.  The resulting value R_t is
>>> then expanded to a color C_b = (R_t,0,0,1), ..."
>>> In other words, depth textures are supposed to be treated as GL_RED.
>>> A discussion about this text can be found in Khronos bugzilla:
>>> https://cvs.khronos.org/**bugzilla/show_bug.cgi?id=7962<https://cvs.khronos.org/bugzilla/show_bug.cgi?id=7962>
>>> It's unclear what the behavior of desktop GL should be.  The GL 3.x
>>> specifications indicate that it should be (r, r, r, 1), which is
>>> GL_LUMINANCE (the old default).  However, page 112 of the 4.2 core
>>> specification contains the text quoted above, explicitly declaring it
>>> to be (R_t, 0, 0, 1), which is GL_RED.
>>> So it hinges on whether the 4.2 text is a change or a clarification.
>>> Personally I think that using GL_RED in core contexts and GL_INTENSITY
>>> in legacy contexts seems reasonable.
>> I believe it was an intentional change somewhere in 4.x.  We may want to
>> select behavior based on API / version.
> Ugh.  On further investigation, it turns out that OES_depth_texture (which
> is ES2 only) does not provide DEPTH_TEXTURE_MODE, but explicitly states
> that it should act as GL_LUMINANCE.  There's also a conformance test for
> that.
> So, for ES 2, it *must* be GL_LUMINANCE.  For ES 3, it *must* be RED.
> Time to file spec bugs...
> ______________________________**_________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/**mailman/listinfo/mesa-dev<http://lists.freedesktop.org/mailman/listinfo/mesa-dev>

Does anyone know if this ever got addressed?  I'm still seeing these GLES3
conformance failures.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20121219/3c022f7c/attachment.html>

More information about the mesa-dev mailing list