Basically, two different target error checks are chained consecutively, and the second one is executed regardless the result of the first one. This produces an incorrect error if the first check fails but is overrided by the second.
This patch conditions the execution of the second check to a successful pass of the first one. Fixes 1 dEQP test: * dEQP-GLES3.functional.negative_api.texture.compressedtexsubimage3d --- src/mesa/main/teximage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 9f7e10c..1af2896 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -4598,7 +4598,7 @@ compressed_subtexture_target_check(struct gl_context *ctx, GLenum target, * non-zero, or the effective target for the texture is not * TEXTURE_2D_ARRAY." */ - if (target != GL_TEXTURE_2D_ARRAY) { + if (targetOK && target != GL_TEXTURE_2D_ARRAY) { bool invalidformat; switch (format) { /* These came from _mesa_is_compressed_format in glformats.c. */ -- 2.1.3 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev