Section '8.6 Alternate Texture Image Specification Commands', page 161 of the
OpenGL ES 3.1 spec, and page 207 of the same section in the OpenGL 4.5 spec
state in relation to CopyTexImage2D method:

    "An INVALID_ENUM error is generated if an invalid value is specified for
     internalformat."

Fixes 1 dEQP test:
* dEQP-GLES3.functional.negative_api.texture.copyteximage2d_invalid_format
---
 src/mesa/main/teximage.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index 7b1a0e6..6382114 100644
--- a/src/mesa/main/teximage.c
+++ b/src/mesa/main/teximage.c
@@ -2619,7 +2619,7 @@ copytexture_error_check( struct gl_context *ctx, GLuint 
dimensions,
 
    rb = _mesa_get_read_renderbuffer_for_format(ctx, internalFormat);
    if (rb == NULL) {
-      _mesa_error(ctx, GL_INVALID_OPERATION,
+      _mesa_error(ctx, GL_INVALID_ENUM,
                   "glCopyTexImage%dD(read buffer)", dimensions);
       return GL_TRUE;
    }
-- 
2.1.3

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to