On Tue, Sep 15, 2015 at 4:47 AM, Eduardo Lima Mitev <el...@igalia.com> wrote: > For consistency and efficiency, the (sub)texture dimension error check > should go before the validation of format, type and internal format.
You mentioned in another patch that this fixes a bug or, at the very least, prevents one. What bug is that? I ask because my personal inclination would be to keep them in the order they were before. --Jason > --- > src/mesa/main/teximage.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c > index d9453e3..09040d5 100644 > --- a/src/mesa/main/teximage.c > +++ b/src/mesa/main/teximage.c > @@ -2117,6 +2117,12 @@ 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; > + } > + > err = _mesa_error_check_format_and_type(ctx, format, type); > if (err != GL_NO_ERROR) { > _mesa_error(ctx, err, > @@ -2145,12 +2151,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 (_mesa_format_no_online_compression(ctx, texImage->InternalFormat)) > { > _mesa_error(ctx, GL_INVALID_OPERATION, > -- > 2.4.6 > _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev