Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 2236123002: Fix CopyTextureCHROMIUM on core profile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index ceabff8aaa3c69d74399d1b7d302a8c201b7bc25..575770415d81ac717ae2cc67772c80be8a4a4b39 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -11538,8 +11538,11 @@ bool GLES2DecoderImpl::ClearLevel(Texture* texture,
GLint y = 0;
while (y < height) {
GLint h = y + tile_height > height ? height - y : tile_height;
- glTexSubImage2D(target, level, xoffset, yoffset + y, width, h, format, type,
- zero.get());
+ glTexSubImage2D(
+ target, level, xoffset, yoffset + y, width, h,
+ TextureManager::AdjustTexFormat(feature_info_.get(), format),
+ type,
+ zero.get());
y += tile_height;
}
TextureRef* bound_texture =
@@ -15017,9 +15020,18 @@ bool GLES2DecoderImpl::ValidateCopyTextureCHROMIUMInternalFormats(
source_internal_format == GL_BGRA8_EXT ||
source_internal_format == GL_RGB_YCBCR_420V_CHROMIUM ||
source_internal_format == GL_RGB_YCBCR_422_CHROMIUM;
- if (!valid_source_format || !valid_dest_format) {
+ if (!valid_source_format) {
+ std::string msg = "invalid source internal format " +
+ GLES2Util::GetStringEnum(source_internal_format);
LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, function_name,
- "invalid internal format");
+ msg.c_str());
+ return false;
+ }
+ if (!valid_dest_format) {
+ std::string msg = "invalid dest internal format " +
+ GLES2Util::GetStringEnum(dest_internal_format);
+ LOCAL_SET_GL_ERROR(GL_INVALID_OPERATION, function_name,
+ msg.c_str());
return false;
}
return true;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698