<div dir="ltr">Reviewed-by: Jason Ekstrand <<a href="mailto:jason.ekstrand@intel.com" target="_blank">jason.ekstrand@intel.com</a>><br></div><div class="gmail_extra"><br><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">Cc: <<a href="mailto:mesa-stable@lists.freedesktop.org">mesa-stable@lists.freedesktop.org</a>><br>
Signed-off-by: Anuj Phogat <<a href="mailto:anuj.phogat@gmail.com">anuj.phogat@gmail.com</a>><br>
---<br>
src/mesa/main/teximage.c | 9 ++++++++-<br>
1 file changed, 8 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c<br>
index b8627a3..03ebbd8 100644<br>
--- a/src/mesa/main/teximage.c<br>
+++ b/src/mesa/main/teximage.c<br>
@@ -2262,7 +2262,14 @@ compressed_texture_error_check(struct gl_context *ctx, GLint dimensions,<br>
<br>
if (!_mesa_target_can_be_compressed(ctx, target, internalFormat)) {<br>
reason = "target";<br>
- error = GL_INVALID_ENUM;<br>
+ /* From section 3.8.6, page 146 of OpenGL ES 3.0 spec:<br>
+ *<br>
+ * "The ETC2/EAC texture compression algorithm supports only<br>
+ * two-dimensional images. If internalformat is an ETC2/EAC format,<br>
+ * CompressedTexImage3D will generate an INVALID_OPERATION error if<br>
+ * target is not TEXTURE_2D_ARRAY."<br>
+ */<br>
+ error = _mesa_is_desktop_gl(ctx) ? GL_INVALID_ENUM : GL_INVALID_OPERATION;<br>
goto error;<br>
}<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
1.8.3.1<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>