summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2016-04-26 02:29:44 -0700
committerKenneth Graunke <kenneth@whitecape.org>2016-04-26 21:32:35 -0700
commit027c6c12220f802b39d0dac1ab996e451f95bcf5 (patch)
treecad61fb6912ac4ff6faf3ee557a2521ef08d50be /src/mesa/main/teximage.c
parent1e44599a43f6e9e35c4e951d55897c4e5a750fb9 (diff)
downloadexternal_mesa3d-027c6c12220f802b39d0dac1ab996e451f95bcf5.zip
external_mesa3d-027c6c12220f802b39d0dac1ab996e451f95bcf5.tar.gz
external_mesa3d-027c6c12220f802b39d0dac1ab996e451f95bcf5.tar.bz2
mesa: Disallow CopyTexSubImage on stencil formats in ES.
Fixes - ES31-CTS.gtf.GL31Tests.texture_stencil8.texture_stencil8 - ES31-CTS.gtf.GL31Tests.texture_stencil8.texture_stencil8_multisample Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Chris Forbes <chrisf@ijw.co.nz>
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r--src/mesa/main/teximage.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 6ac6fb1..76b6584 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -2530,6 +2530,15 @@ copytexsubimage_error_check(struct gl_context *ctx, GLuint dimensions,
}
}
+ /* In the ES 3.2 specification's Table 8.13 (Valid CopyTexImage source
+ * framebuffer/destination texture base internal format combinations),
+ * all the entries for stencil are left blank (unsupported).
+ */
+ if (_mesa_is_gles(ctx) && _mesa_is_stencil_format(texImage->_BaseFormat)) {
+ _mesa_error(ctx, GL_INVALID_OPERATION, "%s(stencil disallowed)", caller);
+ return GL_TRUE;
+ }
+
/* if we get here, the parameters are OK */
return GL_FALSE;
}