OSDN Git Service

Validate unsized internal formats.
authorNicolas Capens <capn@google.com>
Fri, 8 Dec 2017 18:09:16 +0000 (13:09 -0500)
committerNicolas Capens <nicolascapens@google.com>
Fri, 8 Dec 2017 21:32:03 +0000 (21:32 +0000)
commitf15fd5a1594d758b328e1e8dc51f9f17ba855160
treec861e21a64d4e9689393dbead5fc45f68a4478e7
parent3be576c091d4dd99f8b24f0a8740fe76301de965
Validate unsized internal formats.

If the format and internalformat parameters are the same, only the
combinations in Table 3.3 of the OpenGL ES 3.0 specification are valid.

GL_RGB10_A2 and GL_RGB10_A2UI have GL_UNSIGNED_INT_2_10_10_10_REV type.
GL_OES_vertex_type_10_10_10_2 is a vertex attribute type, part of the
GL_OES_vertex_type_10_10_10_2 extension.

GL_RGB10_A2 internal format is valid for glReadPixels with a
combination of format GL_RGBA and type GL_UNSIGNED_INT_2_10_10_10_REV.

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