OSDN Git Service

Fixed format validations
authorAlexis Hetu <sugoi@google.com>
Thu, 15 Oct 2015 21:22:57 +0000 (17:22 -0400)
committerAlexis Hétu <sugoi@google.com>
Fri, 18 Dec 2015 19:50:34 +0000 (19:50 +0000)
commitd9a2e7bf679864af9e19ee94bc0e268308e2f735
treea44f51c68af7a14ae2f0a78ad3f650a5cd096f74
parentd18c069d7c06fb011fcaa87a2b5905c5b61c6e46
Fixed format validations

Format validations were failing if the exact same format
wasn't used between different texture related calls to the
same texture, even when the formats were equivalent, so I
added a GetSizedInternalFormat function based on a format
map (courtesy of Angle). The validation checks were also
unified in utilities.cpp and used wherever texture formats
were used, to make sure Image objects used in Texture
objects always use the sized format, so that format
comparisons work properly.

Change-Id: I72fc8fb1b0f135ac679c274866e5b8e223541e7f
Reviewed-on: https://swiftshader-review.googlesource.com/4082
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
src/OpenGL/common/Image.cpp
src/OpenGL/libGL/Texture.cpp
src/OpenGL/libGLES_CM/Texture.cpp
src/OpenGL/libGLESv2/Texture.cpp
src/OpenGL/libGLESv2/libGLESv2.cpp
src/OpenGL/libGLESv2/libGLESv3.cpp
src/OpenGL/libGLESv2/utilities.cpp
src/OpenGL/libGLESv2/utilities.h