diff options
author | Mathias Agopian <mathias@google.com> | 2009-10-16 18:34:31 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2009-10-19 14:23:02 -0700 |
commit | d13e46158afd6ff23178f015285535e5bf00dd2c (patch) | |
tree | 50d4744156610078e47139d0490e5197aa1073ec /opengl/libagl | |
parent | 031a1dc6d8dd4ed150d4887405cc4100b4106116 (diff) | |
download | frameworks_native-d13e46158afd6ff23178f015285535e5bf00dd2c.zip frameworks_native-d13e46158afd6ff23178f015285535e5bf00dd2c.tar.gz frameworks_native-d13e46158afd6ff23178f015285535e5bf00dd2c.tar.bz2 |
fix [2151588] glTexSubImage2D() allows pixel format conversion
Diffstat (limited to 'opengl/libagl')
-rw-r--r-- | opengl/libagl/texture.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/opengl/libagl/texture.cpp b/opengl/libagl/texture.cpp index 90e6d29..13d078e 100644 --- a/opengl/libagl/texture.cpp +++ b/opengl/libagl/texture.cpp @@ -1252,6 +1252,11 @@ void glTexSubImage2D( ogles_error(c, GL_INVALID_OPERATION); return; } + + if (format != tex->internalformat) { + ogles_error(c, GL_INVALID_OPERATION); + return; + } if ((xoffset + width > GLsizei(surface.width)) || (yoffset + height > GLsizei(surface.height))) { ogles_error(c, GL_INVALID_VALUE); |