<div dir="ltr"><div>Reviewed-by: Marek Olšák <<a href="mailto:marek.olsak@amd.com">marek.olsak@amd.com</a>></div><div><br></div><div>Marek<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Sep 2, 2019 at 7:40 PM Ilia Mirkin <<a href="mailto:imirkin@alum.mit.edu">imirkin@alum.mit.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">We were previously not doing at least some of the checks. This uses the<br>
same logic that is used in glTexImage*.<br>
<br>
Signed-off-by: Ilia Mirkin <<a href="mailto:imirkin@alum.mit.edu" target="_blank">imirkin@alum.mit.edu</a>><br>
---<br>
<br>
This seems to leave the Intel CI happy -<br>
<br>
<a href="https://mesa-ci.01.org/imirkin/builds/32/group/63a9f0ea7bb98050796b649e85481845" rel="noreferrer" target="_blank">https://mesa-ci.01.org/imirkin/builds/32/group/63a9f0ea7bb98050796b649e85481845</a><br>
<br>
And fixes things for the teximage-errors updates I sent in for piglit.<br>
<br>
src/mesa/main/teximage.c | 9 +++++++++<br>
1 file changed, 9 insertions(+)<br>
<br>
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c<br>
index f90765f40fa..e55e435779f 100644<br>
--- a/src/mesa/main/teximage.c<br>
+++ b/src/mesa/main/teximage.c<br>
@@ -2205,6 +2205,15 @@ texsubimage_error_check(struct gl_context *ctx, GLuint dimensions,<br>
return GL_TRUE;<br>
}<br>
<br>
+ if (!texture_formats_agree(texImage->InternalFormat, format)) {<br>
+ _mesa_error(ctx, GL_INVALID_OPERATION,<br>
+ "%s(incompatible internalFormat = %s, format = %s)",<br>
+ callerName,<br>
+ _mesa_enum_to_string(texImage->InternalFormat),<br>
+ _mesa_enum_to_string(format));<br>
+ return GL_TRUE;<br>
+ }<br>
+<br>
GLenum internalFormat = _mesa_is_gles(ctx) ?<br>
oes_float_internal_format(ctx, texImage->InternalFormat, type) :<br>
texImage->InternalFormat;<br>
-- <br>
2.21.0<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a></blockquote></div>