Update TextureParameter* error for incompatible texture targets
authorIago Toral Quiroga <itoral@igalia.com>
Mon, 7 Aug 2017 04:18:23 +0000 (06:18 +0200)
committerIago Toral Quiroga <itoral@igalia.com>
Wed, 9 Aug 2017 07:28:08 +0000 (09:28 +0200)
The OpenGL 4.6 specs have been updated so that GetTextureParameter*
with a texture object with an incompatible TEXTURE_TARGET should now
report INVALID_OPERATION instead of INVALID_ENUM.

Fixes:
KHR-GL45.direct_state_access.textures_parameter_errors

Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
src/mesa/main/texparam.c

index b6e91503eae9da7beda9edc69b30785e36062699..039b93349e4a545020947d658f66bf0f14e145fe 100644 (file)
@@ -174,7 +174,7 @@ get_texobj_by_name(struct gl_context *ctx, GLuint texture, const char *name)
    case GL_TEXTURE_RECTANGLE:
       return texObj;
    default:
-      _mesa_error(ctx, GL_INVALID_ENUM, "%s(target)", name);
+      _mesa_error(ctx, GL_INVALID_OPERATION, "%s(target)", name);
       return NULL;
    }