On 08/17/2015 12:35 PM, Eduardo Lima Mitev wrote: > > + if (error_check_subtexture_dimensions(ctx, dimensions, > + texImage, xoffset, yoffset, zoffset, > + width, height, depth, callerName)) { > + return GL_TRUE; > + } > + > err = _mesa_error_check_format_and_type(ctx, format, type); > if (err != GL_NO_ERROR) { > _mesa_error(ctx, err, > @@ -2047,12 +2053,6 @@ texsubimage_error_check(struct gl_context *ctx, GLuint > dimensions, > return GL_TRUE; > } > > - if (error_check_subtexture_dimensions(ctx, dimensions, > - texImage, xoffset, yoffset, zoffset, > - width, height, depth, callerName)) { > - return GL_TRUE; > - } > - > if (_mesa_is_format_compressed(texImage->TexFormat)) { > if (compressedteximage_only_format(ctx, texImage->InternalFormat)) { > _mesa_error(ctx, GL_INVALID_OPERATION, >
Forgot to mention in the cover letter that this reordering of size and offset validation is needed because this patch uncovered the fact that _mesa_validate_pbo_source() was being called before validating dimensions. Eduardo _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev