<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 6, 2014 at 4:57 PM, Anuj Phogat <span dir="ltr"><<a href="mailto:anuj.phogat@gmail.com" target="_blank">anuj.phogat@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Fixes few failures in gles3 Khronos CTS test: packed_pixels<br>
<br>
Cc: "10.2" <<a href="mailto:mesa-stable@lists.freedesktop.org" target="_blank">mesa-stable@lists.freedesktop.org</a>><br>
Signed-off-by: Anuj Phogat <<a href="mailto:anuj.phogat@gmail.com" target="_blank">anuj.phogat@gmail.com</a>><br>
---<br>
src/mesa/main/teximage.c | 11 +++++++++++<br>
1 file changed, 11 insertions(+)<br>
<br>
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c<br>
index 03ebbd8..6474dba 100644<br>
--- a/src/mesa/main/teximage.c<br>
+++ b/src/mesa/main/teximage.c<br>
@@ -2667,6 +2667,17 @@ copytexture_error_check( struct gl_context *ctx, GLuint dimensions,<br>
"glCopyTexImage%dD(srgb usage mismatch)", dimensions);<br>
return GL_TRUE;<br>
}<br>
+<br>
+ /* Page 139, Table 3.15 of OpenGL ES 3.0 spec does not define ReadPixels<br>
+ * types for SNORM formats. Also, conversion to SNORM formats is not<br>
+ * allowed by Table 3.2 on Page 110.<br>
+ */<br>
+ if(_mesa_is_enum_format_snorm(internalFormat)) {<br>
+ _mesa_error(ctx, GL_INVALID_OPERATION,<br>
+ "glCopyTexImage%dD(internalFormat=%s)", dimensions,<br>
+ _mesa_lookup_enum_by_nr(internalFormat));<br>
+ return GL_TRUE;<br>
+ }<br></blockquote><div><br></div><div>I think I'm missing something. How does this not completely prevent the user from using CopyTexImage on SNORM formats? Shouldn't they still be able to do CopyTexImage between two RG8_SNORM textures for instance?<br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
}<br>
<br>
if (!_mesa_source_buffer_exists(ctx, baseFormat)) {<br>
<span><font color="#888888">--<br>
1.8.3.1<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="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></div>