On 12/19/2012 05:59 PM, Paul Berry wrote:
On 19 November 2012 11:06, Kenneth Graunke <[email protected] <mailto:[email protected]>> wrote:On 11/18/2012 05:43 PM, Ian Romanick wrote: On Nov 17, 2012, at 11:26 PM, Kenneth Graunke <[email protected] <mailto:[email protected]>> 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... Does anyone know if this ever got addressed? I'm still seeing these GLES3 conformance failures.
There was some discussion, but I don't feel like there was any resolution. I'll rattle the cage again...
_______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
