mesa: fix error reported on gTexSubImage2D when level not valid
authorTapani Pälli <tapani.palli@intel.com>
Tue, 7 Oct 2014 07:56:49 +0000 (10:56 +0300)
committerTapani Pälli <tapani.palli@intel.com>
Fri, 10 Oct 2014 12:01:51 +0000 (15:01 +0300)
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
src/mesa/main/teximage.c

index 647d28ab3d19e3c9ef5a89e044da72ad39a3716a..c0298af8ea61d39210fc61c849a1f6de62a57f35 100644 (file)
@@ -2449,7 +2449,7 @@ texsubimage_error_check(struct gl_context *ctx, GLuint dimensions,
 
    /* level check */
    if (level < 0 || level >= _mesa_max_texture_levels(ctx, target)) {
-      _mesa_error(ctx, GL_INVALID_ENUM, "glTexSubImage%uD(level=%d)",
+      _mesa_error(ctx, GL_INVALID_VALUE, "glTexSubImage%uD(level=%d)",
                   dimensions, level);
       return GL_TRUE;
    }