<div dir="ltr"><div>Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br><br></div>I also ran it through our CI system and it didn't find any problems.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 12, 2016 at 2:34 PM, Haixia Shi <span dir="ltr"><<a href="mailto:hshi@chromium.org" target="_blank">hshi@chromium.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">The GL_BGR and GL_UNSIGNED_SHORT_5_6_5_REV are not defined anywhere in<br>
OpenGL ES 3.2 (or earlier) specification, and there are no known extensions<br>
in the Khronos registry that would add these enums as valid responses for<br>
glGetIntegerv(GL_<wbr>IMPLEMENTATION_COLOR_READ_<wbr>TYPE) and<br>
glGetIntegerv(GL_<wbr>IMPLEMENTATION_COLOR_READ_<wbr>FORMAT) queries.<br>
<br>
</span>Note that this patch does not change the bit layout returned by the query. As<br>
defined by the GL spec, the bit layout of GL_RGB + GL_UNSIGNED_SHORT_5_6_5 and<br>
GL_BGR + GL_UNSIGNED_SHORT_5_6_5_REV are identical.<br>
<br>
TEST=dEQP-GLES3.functional.<wbr>state_query.integers.*<br>
<div class="HOEnZb"><div class="h5"><br>
Signed-off-by: Haixia Shi <<a href="mailto:hshi@chromium.org">hshi@chromium.org</a>><br>
Cc: Chad Versace <<a href="mailto:chadversary@chromium.org">chadversary@chromium.org</a>><br>
Cc: Stéphane Marchesin <<a href="mailto:marcheu@chromium.org">marcheu@chromium.org</a>><br>
<br>
Change-Id: I81bbc8ccdc7e125edaeae443baf6f<wbr>a8fdefcc6b6<br>
---<br>
src/mesa/main/framebuffer.c | 4 ++--<br>
1 file changed, 2 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c<br>
index 38bd680..f024f5e 100644<br>
--- a/src/mesa/main/framebuffer.c<br>
+++ b/src/mesa/main/framebuffer.c<br>
@@ -857,7 +857,7 @@ _mesa_get_color_read_format(<wbr>struct gl_context *ctx)<br>
if (format == MESA_FORMAT_B8G8R8A8_UNORM)<br>
return GL_BGRA;<br>
else if (format == MESA_FORMAT_B5G6R5_UNORM)<br>
- return GL_BGR;<br>
+ return GL_RGB;<br>
else if (format == MESA_FORMAT_R_UNORM8)<br>
return GL_RED;<br>
<br>
@@ -892,7 +892,7 @@ _mesa_get_color_read_type(<wbr>struct gl_context *ctx)<br>
const GLenum data_type = _mesa_get_format_datatype(<wbr>format);<br>
<br>
if (format == MESA_FORMAT_B5G6R5_UNORM)<br>
- return GL_UNSIGNED_SHORT_5_6_5_REV;<br>
+ return GL_UNSIGNED_SHORT_5_6_5;<br>
<br>
switch (data_type) {<br>
case GL_SIGNED_NORMALIZED:<br>
</div></div><div class="HOEnZb"><div class="h5">--<br>
2.8.0.rc3.226.g39d4020<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">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/<wbr>mailman/listinfo/mesa-dev</a><br>
</div></div></blockquote></div><br></div>