mesa/es3.1: Pass sample count check for multisampled textures
authorMarta Lofstedt <marta.lofstedt@intel.com>
Mon, 15 Jun 2015 11:50:21 +0000 (13:50 +0200)
committerTapani Pälli <tapani.palli@intel.com>
Mon, 10 Aug 2015 10:34:49 +0000 (13:34 +0300)
v3 : Removed space in comment.

Signed-off-by: Marta Lofstedt <marta.lofstedt@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/mesa/main/multisample.c

index 490bad507c30efd140011bc1bc00c78f2cef50db..09e6154f7ec389298bc154f46cbdad9e078221bf 100644 (file)
@@ -164,8 +164,11 @@ _mesa_check_sample_count(struct gl_context *ctx, GLenum target,
     *
     *     "If internalformat is a signed or unsigned integer format and samples
     *     is greater than zero, then the error INVALID_OPERATION is generated."
+    *
+    * This restriction is relaxed for OpenGL ES 3.1.
     */
-   if (_mesa_is_gles3(ctx) && _mesa_is_enum_format_integer(internalFormat)
+   if ((ctx->API == API_OPENGLES2 && ctx->Version == 30) &&
+       _mesa_is_enum_format_integer(internalFormat)
        && samples > 0) {
       return GL_INVALID_OPERATION;
    }