OSDN Git Service

Fix glCopyTexImage support for BGRA color buffers.
authorNicolas Capens <capn@google.com>
Fri, 23 Feb 2018 02:53:39 +0000 (21:53 -0500)
committerAlexis Hétu <sugoi@google.com>
Mon, 26 Feb 2018 12:42:01 +0000 (12:42 +0000)
commit680bcf50597a8a6939f9023a4c8ebed597f9c4ae
tree20f220b5af4c905885f6e0c1465516026ece8730
parent92593eb2fedd8f39c518f532d014bba6e156030b
Fix glCopyTexImage support for BGRA color buffers.

Neither GL_EXT_texture_format_BGRA8888 nor
GL_APPLE_texture_format_BGRA8888 make mention of GL_BGRA_EXT
or GL_BGRA8_EXT being accepted as the internalformat parameter of
glCopyTexImage2D, but there's a reasonable assumption that textures
with BGRA format can be used as the read color buffer.
GL_EXT_texture_format_BGRA8888 does mention that the format is
color-renderable, and GL_APPLE_texture_format_BGRA8888 adds it to table
3.2 (but fails to mention changes to table 3.16).

Bug swiftshader:96

Change-Id: I6d18faeaded73164a2c6af87ae6109fc77825964
Reviewed-on: https://swiftshader-review.googlesource.com/17448
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
src/OpenGL/libGLES_CM/libGLES_CM.cpp
src/OpenGL/libGLESv2/utilities.cpp