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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 2348243002: Force CUBE_MAP_POSITIVE_X texture allocation before CopyTexImage2D on Intel Mac (Closed)
Patch Set: update expectation Created 4 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 13272 matching lines...) Expand 10 before | Expand all | Expand 10 after
13283 glCopyTexImage2D(dest_texture_target, level, final_internal_format, 0, 0, 13283 glCopyTexImage2D(dest_texture_target, level, final_internal_format, 0, 0,
13284 copyWidth, copyHeight, 0); 13284 copyWidth, copyHeight, 0);
13285 13285
13286 // Rebind source texture. 13286 // Rebind source texture.
13287 glFramebufferTexture2DEXT(framebuffer_target, GL_COLOR_ATTACHMENT0, 13287 glFramebufferTexture2DEXT(framebuffer_target, GL_COLOR_ATTACHMENT0,
13288 source_texture_target, 13288 source_texture_target,
13289 source_texture_service_id, 0); 13289 source_texture_service_id, 0);
13290 13290
13291 glDeleteTextures(1, &temp_texture); 13291 glDeleteTextures(1, &temp_texture);
13292 } else { 13292 } else {
13293 if (workarounds().do_texture_image_before_copy_texture_image &&
13294 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
13295 for (int i = 0; i < 6; ++i) {
13296 GLenum face = GL_TEXTURE_CUBE_MAP_POSITIVE_X + i;
13297 glTexImage2D(face, level, final_internal_format,
13298 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
13299 }
13300 }
13293 glCopyTexImage2D(target, level, final_internal_format, copyX, copyY, 13301 glCopyTexImage2D(target, level, final_internal_format, copyX, copyY,
13294 copyWidth, copyHeight, border); 13302 copyWidth, copyHeight, border);
13295 } 13303 }
13296 } 13304 }
13297 GLenum error = LOCAL_PEEK_GL_ERROR(func_name); 13305 GLenum error = LOCAL_PEEK_GL_ERROR(func_name);
13298 if (error == GL_NO_ERROR) { 13306 if (error == GL_NO_ERROR) {
13299 texture_manager()->SetLevelInfo(texture_ref, target, level, internal_format, 13307 texture_manager()->SetLevelInfo(texture_ref, target, level, internal_format,
13300 width, height, 1, border, format, 13308 width, height, 1, border, format,
13301 type, gfx::Rect(width, height)); 13309 type, gfx::Rect(width, height));
13302 texture->ApplyFormatWorkarounds(feature_info_.get()); 13310 texture->ApplyFormatWorkarounds(feature_info_.get());
(...skipping 4691 matching lines...) Expand 10 before | Expand all | Expand 10 after
17994 } 18002 }
17995 18003
17996 // Include the auto-generated part of this file. We split this because it means 18004 // Include the auto-generated part of this file. We split this because it means
17997 // we can easily edit the non-auto generated parts right here in this file 18005 // we can easily edit the non-auto generated parts right here in this file
17998 // instead of having to edit some template or the code generator. 18006 // instead of having to edit some template or the code generator.
17999 #include "base/macros.h" 18007 #include "base/macros.h"
18000 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 18008 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
18001 18009
18002 } // namespace gles2 18010 } // namespace gles2
18003 } // namespace gpu 18011 } // namespace gpu
OLDNEW
« no previous file with comments | « content/test/gpu/gpu_tests/webgl2_conformance_expectations.py ('k') | gpu/config/gpu_driver_bug_list_json.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698