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 e2bd8d8f0f5922b42fe5f2ed20d532429b35e77b..d293c0af5430e2c2d30cde09805aafad9d92995f 100644 |
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc |
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc |
@@ -13290,6 +13290,14 @@ void GLES2DecoderImpl::DoCopyTexImage2D( |
glDeleteTextures(1, &temp_texture); |
} else { |
+ if (workarounds().do_texture_image_before_copy_texture_image && |
+ target == GL_TEXTURE_CUBE_MAP_NEGATIVE_X) { |
piman
2016/09/19 20:33:13
Is it /really/ only GL_TEXTURE_CUBE_MAP_NEGATIVE_X
Ken Russell (switch to Gerrit)
2016/09/19 23:15:10
+1 to piman's comments -- also, if a separate work
qiankun
2016/09/20 11:34:16
Yes. They are similar. I used the same workaround
|
+ for (int i = 0; i < 6; ++i) { |
+ GLenum face = GL_TEXTURE_CUBE_MAP_POSITIVE_X + i; |
+ glTexImage2D(face, level, final_internal_format, |
+ width, height, border, format, type, 0); |
piman
2016/09/19 20:33:13
What if those were already defined? This would los
Ken Russell (switch to Gerrit)
2016/09/19 23:15:10
+1. Also, have you verified that it's necessary to
qiankun
2016/09/20 11:34:16
Do initialization for uninitialized GL_TEXTURE_CUB
|
+ } |
+ } |
glCopyTexImage2D(target, level, final_internal_format, copyX, copyY, |
copyWidth, copyHeight, border); |
} |