mesa: Disallow CopyTexSubImage on stencil formats in ES.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 26 Apr 2016 09:29:44 +0000 (02:29 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 27 Apr 2016 04:32:35 +0000 (21:32 -0700)
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>
src/mesa/main/teximage.c

index 6ac6fb109d3ed739882a294b76cb5dd6587887c3..76b6584d3bf2b8cefa94527b4399ac9a01300032 100644 (file)
@@ -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;
 }