<p dir="ltr">Reviewed-by: Jason Ekstrand <<a href="mailto:jason.ekstrand@intel.com">jason.ekstrand@intel.com</a>></p>
<div class="gmail_quote">On Aug 15, 2014 6:43 AM, "Brian Paul" <<a href="mailto:brianp@vmware.com">brianp@vmware.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Generate a GL error and return rather than crashing on a null<br>
ctx->Driver.CopyImageSubData pointer (gallium).  This allows apitraces<br>
with glCopyImageSubData() calls to continue rather than crash.<br>
<br>
Plus, fix a comment typo.<br>
---<br>
 src/mesa/main/copyimage.c |    8 +++++++-<br>
 1 file changed, 7 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/src/mesa/main/copyimage.c b/src/mesa/main/copyimage.c<br>
index dcbc83d..df7d7c2 100644<br>
--- a/src/mesa/main/copyimage.c<br>
+++ b/src/mesa/main/copyimage.c<br>
@@ -277,6 +277,12 @@ _mesa_CopyImageSubData(GLuint srcName, GLenum srcTarget, GLint srcLevel,<br>
                   dstX, dstY, dstZ,<br>
                   srcWidth, srcHeight, srcWidth);<br>
<br>
+   if (!ctx->Extensions.ARB_copy_image) {<br>
+      _mesa_error(ctx, GL_INVALID_OPERATION,<br>
+                  "glCopyImageSubData(extension not available)");<br>
+      return;<br>
+   }<br>
+<br>
    if (!prepare_target(ctx, srcName, &srcTarget, srcLevel,<br>
                        &srcTexObj, &srcTexImage, &tmpTexNames[0], "src"))<br>
       goto cleanup;<br>
@@ -328,7 +334,7 @@ _mesa_CopyImageSubData(GLuint srcName, GLenum srcTarget, GLint srcLevel,<br>
                                                    srcTexImage->InternalFormat,<br>
                                                    dstTexImage->InternalFormat)) {<br>
    } else {<br>
-      return; /* Error loged by _mesa_texture_view_compatible_format */<br>
+      return; /* Error logged by _mesa_texture_view_compatible_format */<br>
    }<br>
<br>
    for (i = 0; i < srcDepth; ++i) {<br>
--<br>
1.7.10.4<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>
</blockquote></div>