[Mesa-dev] [Mesa-stable] [PATCH 1/2] mesa: default DEPTH_TEXTURE_MODE should be RED in the core profile
Kenneth Graunke
kenneth at whitecape.org
Mon Jul 22 23:54:07 PDT 2013
On 07/22/2013 03:58 PM, Marek Olšák wrote:
> There are a couple of reasons why this was missed:
>
> 1) The depth texture mode doesn't exist in the core profile, so the
> core spec doesn't and cannot specify what the default should be, so
> that's why nobody updated it. However the 4.1 core spec says:
>
> "3.8.9 Depth Component Textures
> Depth textures and the depth components of depth/stencil textures can
> be treated as RED textures during texture filtering and application
> (see section 3.8.16). The initial state for depth and depth/stencil
> textures treats them as RED textures."
>
>
> 2) The default TBO format is LUMINANCE8 according to the ARB_tbo spec,
> so apparently the default value was copied from there. However the GL
> core spec is different again and says R8 is the default format.
You're right - the OpenGL 3.1 spec says R8, but ARB_tbo says L8.
> This
> was also missed because the piglit test expects LUMINANCE8 and also
> because proprietary drivers don't support 3.1 without
> ARB_compatibility (I assume the piglit tests had been tested on
> proprietary drivers first).
>
> I guess we should stop exposing ARB_tbo, because it conflicts with the
> GL core spec.
Hmm, and since we don't currently expose ARB_tbo in the legacy profile
(extensions.c:133 - due to having to support the crazy A/L/LA formats),
that means not exposing it at all. Which means your second patch could
simply change it to R8 universally. Slightly tidier.
> BTW I have also sent some fixes for piglit. We just lack a test for
> the depth textures being treated as RED by default.
>
> Marek
More information about the mesa-dev
mailing list