<div dir="ltr"><div>Looks correct to me.<br><br></div>Reviewed-by: Laura Ekstrand <<a href="mailto:laura@jlekstrand.net">laura@jlekstrand.net</a>><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 23, 2015 at 4:30 AM, Eduardo Lima Mitev <span dir="ltr"><<a href="mailto:elima@igalia.com" target="_blank">elima@igalia.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Basically, two different target error checks are chained consecutively, and the<br>
second one is executed regardless the result of the first one. This<br>
produces an incorrect error if the first check fails but is overrided by the<br>
second.<br>
<br>
This patch conditions the execution of the second check to a successful pass<br>
of the first one.<br>
<br>
Fixes 1 dEQP test:<br>
* dEQP-GLES3.functional.negative_api.texture.compressedtexsubimage3d<br>
---<br>
 src/mesa/main/teximage.c | 2 +-<br>
 1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c<br>
index 9f7e10c..1af2896 100644<br>
--- a/src/mesa/main/teximage.c<br>
+++ b/src/mesa/main/teximage.c<br>
@@ -4598,7 +4598,7 @@ compressed_subtexture_target_check(struct gl_context *ctx, GLenum target,<br>
        *    non-zero, or the effective target for the texture is not<br>
        *    TEXTURE_2D_ARRAY."<br>
        */<br>
-      if (target != GL_TEXTURE_2D_ARRAY) {<br>
+      if (targetOK && target != GL_TEXTURE_2D_ARRAY) {<br>
          bool invalidformat;<br>
          switch (format) {<br>
             /* These came from _mesa_is_compressed_format in glformats.c. */<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.1.3<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div>