[Mesa-stable] [PATCH] mesa: default DepthMode to GL_RED on ES 3.0

Ilia Mirkin imirkin at alum.mit.edu
Tue Feb 16 23:29:39 UTC 2016


See commit 9db2098d which did it internally to the i965 driver. No
reason not to have this more globally set though.

This fixes depth in a bunch of dEQP EXT_texture_border_clamp tests. And
probably other items as well.

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Cc: Ian Romanick <idr at freedesktop.org>
Cc: mesa-stable at lists.freedesktop.org
---
 src/mesa/main/texobj.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index d8407f0..2b9c80a 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -320,7 +320,8 @@ _mesa_initialize_texture_object( struct gl_context *ctx,
    obj->Sampler.MaxAnisotropy = 1.0;
    obj->Sampler.CompareMode = GL_NONE;         /* ARB_shadow */
    obj->Sampler.CompareFunc = GL_LEQUAL;       /* ARB_shadow */
-   obj->DepthMode = ctx->API == API_OPENGL_CORE ? GL_RED : GL_LUMINANCE;
+   obj->DepthMode = (ctx->API == API_OPENGL_CORE || _mesa_is_gles3(ctx)) ?
+      GL_RED : GL_LUMINANCE;
    obj->StencilSampling = false;
    obj->Sampler.CubeMapSeamless = GL_FALSE;
    obj->Swizzle[0] = GL_RED;
-- 
2.4.10



More information about the mesa-stable mailing list