summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texparam.c
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2016-02-11 15:21:02 -0500
committerIlia Mirkin <imirkin@alum.mit.edu>2016-02-12 18:22:48 -0500
commitd33ef194799721b91305e9f764cfe44ba359a638 (patch)
tree0966ad7001b4faaabec04876e24aaae7f292a856 /src/mesa/main/texparam.c
parent2a0fc8286483034a627b5d66eaea45df7f2b0b49 (diff)
downloadexternal_mesa3d-d33ef194799721b91305e9f764cfe44ba359a638.zip
external_mesa3d-d33ef194799721b91305e9f764cfe44ba359a638.tar.gz
external_mesa3d-d33ef194799721b91305e9f764cfe44ba359a638.tar.bz2
mesa: allow DEPTH_STENCIL_TEXTURE_MODE queries in GLES 3.1 contexts
This fixes dEQP-GLES31.functional.state_query.texture.texture_2d_multisample.depth_stencil_mode_integer and a few related tests. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Diffstat (limited to 'src/mesa/main/texparam.c')
-rw-r--r--src/mesa/main/texparam.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index 00cea3e..614c1ee 100644
--- a/src/mesa/main/texparam.c
+++ b/src/mesa/main/texparam.c
@@ -500,9 +500,7 @@ set_tex_parameteri(struct gl_context *ctx,
goto invalid_pname;
case GL_DEPTH_STENCIL_TEXTURE_MODE:
- if ((_mesa_is_desktop_gl(ctx) &&
- ctx->Extensions.ARB_stencil_texturing) ||
- _mesa_is_gles31(ctx)) {
+ if (_mesa_has_ARB_stencil_texturing(ctx) || _mesa_is_gles31(ctx)) {
bool stencil = params[0] == GL_STENCIL_INDEX;
if (!stencil && params[0] != GL_DEPTH_COMPONENT)
goto invalid_param;
@@ -1819,7 +1817,7 @@ get_tex_parameterfv(struct gl_context *ctx,
*params = (GLfloat) obj->DepthMode;
break;
case GL_DEPTH_STENCIL_TEXTURE_MODE:
- if (!_mesa_is_desktop_gl(ctx) || !ctx->Extensions.ARB_stencil_texturing)
+ if (!_mesa_has_ARB_stencil_texturing(ctx) && !_mesa_is_gles31(ctx))
goto invalid_pname;
*params = (GLfloat)
(obj->StencilSampling ? GL_STENCIL_INDEX : GL_DEPTH_COMPONENT);
@@ -2054,7 +2052,7 @@ get_tex_parameteriv(struct gl_context *ctx,
*params = (GLint) obj->DepthMode;
break;
case GL_DEPTH_STENCIL_TEXTURE_MODE:
- if (!_mesa_is_desktop_gl(ctx) || !ctx->Extensions.ARB_stencil_texturing)
+ if (!_mesa_has_ARB_stencil_texturing(ctx) && !_mesa_is_gles31(ctx))
goto invalid_pname;
*params = (GLint)
(obj->StencilSampling ? GL_STENCIL_INDEX : GL_DEPTH_COMPONENT);