<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 15, 2015 at 12:13 AM, Tapani Pälli <span dir="ltr"><<a href="mailto:tapani.palli@intel.com" target="_blank">tapani.palli@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">OpenGL ES 3.0 spec 3.7.2 "Transfer of Pixel Rectangles" specifies<br>
DEPTH_COMPONENT, UNSIGNED_INT as a valid couple, validation for<br>
internal format is checked by is_float_depth().<br>
<br>
Fix regression caused by 81d2fd9 in following CTS test:<br>
ES3-CTS.gtf.GL3Tests.packed_pixels.packed_pixels<br>
<br>
Test uses GL_DEPTH_COMPONENT, UNSIGNED_INT only when GL_NV_read_depth<br>
extension is present.<br>
<br>
Signed-off-by: Tapani Pälli <<a href="mailto:tapani.palli@intel.com">tapani.palli@intel.com</a>><br>
Bugzilla: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=92009" rel="noreferrer" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=92009</a><br>
---<br>
src/mesa/main/glformats.c | 6 ++++--<br>
src/mesa/main/readpix.c | 1 +<br>
2 files changed, 5 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c<br>
index c1d3c7d..d1f9f67 100644<br>
--- a/src/mesa/main/glformats.c<br>
+++ b/src/mesa/main/glformats.c<br>
@@ -494,7 +494,8 @@ _mesa_bytes_per_pixel(GLenum format, GLenum type)<br>
else<br>
return -1;<br>
case GL_UNSIGNED_INT_24_8_EXT:<br>
- if (format == GL_DEPTH_STENCIL_EXT)<br>
+ if (format == GL_DEPTH_COMPONENT ||<br>
+ format == GL_DEPTH_STENCIL_EXT)<br>
return sizeof(GLuint);<br>
else<br>
return -1;<br>
@@ -1789,7 +1790,8 @@ _mesa_error_check_format_and_type(const struct gl_context *ctx,<br>
return GL_INVALID_OPERATION;<br>
<br>
case GL_UNSIGNED_INT_24_8:<br>
- if (format != GL_DEPTH_STENCIL) {<br>
+ if (format != GL_DEPTH_COMPONENT &&<br>
+ format != GL_DEPTH_STENCIL) {<br>
return GL_INVALID_OPERATION;<br>
}<br>
return GL_NO_ERROR;<br>
diff --git a/src/mesa/main/readpix.c b/src/mesa/main/readpix.c<br>
index 76ef8ee..81bb912 100644<br>
--- a/src/mesa/main/readpix.c<br>
+++ b/src/mesa/main/readpix.c<br>
@@ -963,6 +963,7 @@ read_pixels_es3_error_check(GLenum format, GLenum type,<br>
return GL_NO_ERROR;<br>
break;<br>
case GL_UNSIGNED_SHORT:<br>
+ case GL_UNSIGNED_INT:<br>
case GL_UNSIGNED_INT_24_8:<br>
if (!is_float_depth)<br>
return GL_NO_ERROR;<br>
<span class=""><font color="#888888">--<br>
2.4.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" rel="noreferrer" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div><div class="gmail_extra">Reviewed-by: Anuj Phogat <<a href="mailto:anuj.phogat@gmail.com">anuj.phogat@gmail.com</a>><br></div></div>