X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Fcopyimage.c;h=cf25159e8808aac0995889b3f4410857071c175e;hb=34953f8907fddd0d2b27d276580a1d3223047987;hp=7e5df61682a9fec70c136e9ca98571c34458fafa;hpb=af7bf610cf74c6805f42babbcf85bc88b2b9453d;p=mesa.git diff --git a/src/mesa/main/copyimage.c b/src/mesa/main/copyimage.c index 7e5df61682a..cf25159e880 100644 --- a/src/mesa/main/copyimage.c +++ b/src/mesa/main/copyimage.c @@ -138,6 +138,12 @@ prepare_target(struct gl_context *ctx, GLuint name, GLenum target, struct gl_texture_object *texObj = _mesa_lookup_texture(ctx, name); if (!texObj) { + /* + * From GL_ARB_copy_image specification: + * "INVALID_VALUE is generated if either or does + * not correspond to a valid renderbuffer or texture object according + * to the corresponding target parameter." + */ _mesa_error(ctx, GL_INVALID_VALUE, "glCopyImageSubData(%sName = %u)", dbg_prefix, name); return false; @@ -154,12 +160,11 @@ prepare_target(struct gl_context *ctx, GLuint name, GLenum target, /* Note that target will not be a cube face name */ if (texObj->Target != target) { /* - * From GL_ARB_copy_image specification: - * "INVALID_VALUE is generated if either or does - * not correspond to a valid renderbuffer or texture object according - * to the corresponding target parameter." + * From GL_ARB_copy_image_specification: + * "INVALID_ENUM is generated if the target does not match the type + * of the object." */ - _mesa_error(ctx, GL_INVALID_VALUE, + _mesa_error(ctx, GL_INVALID_ENUM, "glCopyImageSubData(%sTarget = %s)", dbg_prefix, _mesa_enum_to_string(target)); return false;