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 | 78811906c3a8a99a155543eda73f51914143277a (patch) | |
tree | d684be0e7901e24e72d212bdf0818c3cbb185ff8 /opengl | |
parent | 69fba87ac16d1c10da81fc3213ae169c755797f4 (diff) | |
download | frameworks_base-78811906c3a8a99a155543eda73f51914143277a.zip frameworks_base-78811906c3a8a99a155543eda73f51914143277a.tar.gz frameworks_base-78811906c3a8a99a155543eda73f51914143277a.tar.bz2 |
fix [2151588] glTexSubImage2D() allows pixel format conversion
Diffstat (limited to 'opengl')
-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); |