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

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

Issue 2369313002: Work around CopyTexImage2D issue on Intel Mac OSX 10.12 (Closed)
Patch Set: rebase only Created 4 years, 2 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 | gpu/config/gpu_driver_bug_list_json.cc » ('j') | 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 1770676b97c1a866d26d95ae41c95c1e72aa2ff7..b0891db4337b4cd396917e38dba49436311fdee5 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -13658,6 +13658,18 @@ void GLES2DecoderImpl::DoCopyTexImage2D(
} else {
GLenum final_internal_format = TextureManager::AdjustTexInternalFormat(
feature_info_.get(), internal_format);
+ if (workarounds().init_two_cube_map_levels_before_copyteximage &&
+ texture->target() == GL_TEXTURE_CUBE_MAP &&
+ target != GL_TEXTURE_CUBE_MAP_POSITIVE_X) {
+ for (int i = 0; i < 2; ++i) {
+ TextureManager::DoTexImageArguments args = {
+ target, i, final_internal_format, 1, 1, 1, border,
+ format, type, nullptr, 1, 0,
+ TextureManager::DoTexImageArguments::kTexImage2D };
+ texture_manager()->WorkaroundCopyTexImageCubeMap(&texture_state_,
+ &state_, &framebuffer_state_, texture_ref, func_name, args);
+ }
+ }
// The service id and target of the texture attached to READ_FRAMEBUFFER.
GLuint source_texture_service_id = 0;
@@ -13713,7 +13725,7 @@ void GLES2DecoderImpl::DoCopyTexImage2D(
glDeleteTextures(1, &temp_texture);
} else {
- if (workarounds().do_teximage_before_copyteximage_to_cube_map &&
+ if (workarounds().init_one_cube_map_level_before_copyteximage &&
texture->target() == GL_TEXTURE_CUBE_MAP &&
target != GL_TEXTURE_CUBE_MAP_POSITIVE_X) {
TextureManager::DoTexImageArguments args = {
« no previous file with comments | « no previous file | gpu/config/gpu_driver_bug_list_json.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698