Merge commit 'b263450f7a5b6ff3c8be8cd4b16aa2f65978f657' into eclair-mr2-plus-aosp * commit 'b263450f7a5b6ff3c8be8cd4b16aa2f65978f657': fix [2151588] glTexSubImage2D() allows pixel format conversion
This commit is contained in:
@@ -1252,6 +1252,11 @@ void glTexSubImage2D(
|
|||||||
ogles_error(c, GL_INVALID_OPERATION);
|
ogles_error(c, GL_INVALID_OPERATION);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (format != tex->internalformat) {
|
||||||
|
ogles_error(c, GL_INVALID_OPERATION);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if ((xoffset + width > GLsizei(surface.width)) ||
|
if ((xoffset + width > GLsizei(surface.width)) ||
|
||||||
(yoffset + height > GLsizei(surface.height))) {
|
(yoffset + height > GLsizei(surface.height))) {
|
||||||
ogles_error(c, GL_INVALID_VALUE);
|
ogles_error(c, GL_INVALID_VALUE);
|
||||||
|
|||||||
Reference in New Issue
Block a user