<div dir="ltr">On 19 November 2012 11:06, Kenneth Graunke <span dir="ltr"><<a href="mailto:kenneth@whitecape.org" target="_blank">kenneth@whitecape.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 11/18/2012 05:43 PM, Ian Romanick wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Nov 17, 2012, at 11:26 PM, Kenneth Graunke <<a href="mailto:kenneth@whitecape.org" target="_blank">kenneth@whitecape.org</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
According to page 163 of the ES 3.0 spec:<br>
<br>
"Texture lookups involving textures with depth component data generate<br>
a texture base color C_b either using depth data directly or by<br>
performing a comparison with the D_ref value used to perform the<br>
lookup, as described in section 3.8.15. The resulting value R_t is<br>
then expanded to a color C_b = (R_t,0,0,1), ..."<br>
<br>
In other words, depth textures are supposed to be treated as GL_RED.<br>
<br>
A discussion about this text can be found in Khronos bugzilla:<br>
<a href="https://cvs.khronos.org/bugzilla/show_bug.cgi?id=7962" target="_blank">https://cvs.khronos.org/<u></u>bugzilla/show_bug.cgi?id=7962</a><br>
<br>
It's unclear what the behavior of desktop GL should be. The GL 3.x<br>
specifications indicate that it should be (r, r, r, 1), which is<br>
GL_LUMINANCE (the old default). However, page 112 of the 4.2 core<br>
specification contains the text quoted above, explicitly declaring it<br>
to be (R_t, 0, 0, 1), which is GL_RED.<br>
<br>
So it hinges on whether the 4.2 text is a change or a clarification.<br>
Personally I think that using GL_RED in core contexts and GL_INTENSITY<br>
in legacy contexts seems reasonable.<br>
</blockquote>
<br>
I believe it was an intentional change somewhere in 4.x. We may want to select behavior based on API / version.<br>
</blockquote>
<br></div>
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.<br>
<br>
So, for ES 2, it *must* be GL_LUMINANCE. For ES 3, it *must* be RED.<br>
<br>
Time to file spec bugs...<div class="HOEnZb"><div class="h5"><br>
______________________________<u></u>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/<u></u>mailman/listinfo/mesa-dev</a><br>
</div></div></blockquote></div><br></div><div class="gmail_extra">Does anyone know if this ever got addressed? I'm still seeing these GLES3 conformance failures.<br></div></div>