Support GL_BGRA_EXT readback for all normalized formats. Bug swiftshader:38 Change-Id: Ice466d96e4d71d546e5770551cc4188f8364edd0 Reviewed-on: https://swiftshader-review.googlesource.com/9029 Tested-by: Nicolas Capens <capn@google.com> Reviewed-by: Alexis Hétu <sugoi@google.com> Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/src/OpenGL/libGLESv2/utilities.cpp b/src/OpenGL/libGLESv2/utilities.cpp index f3c190d..8452dae 100644 --- a/src/OpenGL/libGLESv2/utilities.cpp +++ b/src/OpenGL/libGLESv2/utilities.cpp
@@ -636,6 +636,17 @@ { return true; } + + // GL_EXT_read_format_bgra combinations. + if(format == GL_BGRA_EXT) + { + if(type == GL_UNSIGNED_BYTE || + type == GL_UNSIGNED_SHORT_4_4_4_4_REV_EXT || + type == GL_UNSIGNED_SHORT_1_5_5_5_REV_EXT) + { + return true; + } + } } else if(sw::Surface::isFloatFormat(internalformat)) {