OSDN Git Service

Reject copying from GL_RGB10_A2 to unsized formats.
authorNicolas Capens <capn@google.com>
Thu, 5 Jul 2018 16:13:56 +0000 (12:13 -0400)
committerNicolas Capens <nicolascapens@google.com>
Thu, 5 Jul 2018 17:13:23 +0000 (17:13 +0000)
commite1fa9ea70faa6931505bce64f5d97539c88712e9
treeb490c971faf751a723628ee7659051538444baa1
parentc4972610c38bcf8478016572a92843f165d9bfb4
Reject copying from GL_RGB10_A2 to unsized formats.

glCopyTexImage2D() with an framebuffer format of GL_RGB10_A2 and
internalformat of GL_LUMINANCE_ALPHA was hitting the UNIMPLEMENTED()
assert.

The spec states that:
If an effective internal format exists that has
   * the same component sizes as,
   * component sizes greater than or equal to, or
   * component sizes smaller than or equal to
 those of the source buffer's effective internal format (for all
 matching components in <internalformat>), that format is chosen for
 the new image array and this is the effective internal format of the
 new texel array.

There is no unorm luminance+alpha format that has all components either
greater or smaller, so this operation is invalid.

Also see https://www.khronos.org/members/login/bugzilla/show_bug.cgi?id=9807#c56

Bug chromium:853424

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