summaryrefslogtreecommitdiff
path: root/opengl/libagl/texture.cpp
diff options
context:
space:
mode:
author Android (Google) Code Review <android-gerrit@google.com> 2009-10-19 17:31:52 -0400
committer Android (Google) Code Review <android-gerrit@google.com> 2009-10-19 17:31:52 -0400
commite614aeaf322d1ca2882f06d79ef621b4abb8889f (patch)
treecac357d448cd7229431763ad9e3bad972e16a8b4 /opengl/libagl/texture.cpp
parent5694da94a735725f66fe686a92f27134d0801a36 (diff)
parentd13e46158afd6ff23178f015285535e5bf00dd2c (diff)
Merge change Ide4c8cbc into eclair
* changes: fix [2151588] glTexSubImage2D() allows pixel format conversion
Diffstat (limited to 'opengl/libagl/texture.cpp')
-rw-r--r--opengl/libagl/texture.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/opengl/libagl/texture.cpp b/opengl/libagl/texture.cpp
index 90e6d2946a..13d078e2a3 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);