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

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: rebase only 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 13355 matching lines...) Expand 10 before | Expand all | Expand 10 after
13366 glCopyTexImage2D(dest_texture_target, level, final_internal_format, 0, 0, 13366 glCopyTexImage2D(dest_texture_target, level, final_internal_format, 0, 0,
13367 copyWidth, copyHeight, 0); 13367 copyWidth, copyHeight, 0);
13368 13368
13369 // Rebind source texture. 13369 // Rebind source texture.
13370 glFramebufferTexture2DEXT(framebuffer_target, GL_COLOR_ATTACHMENT0, 13370 glFramebufferTexture2DEXT(framebuffer_target, GL_COLOR_ATTACHMENT0,
13371 source_texture_target, 13371 source_texture_target,
13372 source_texture_service_id, 0); 13372 source_texture_service_id, 0);
13373 13373
13374 glDeleteTextures(1, &temp_texture); 13374 glDeleteTextures(1, &temp_texture);
13375 } else { 13375 } else {
13376 if (workarounds().do_teximage_before_copyteximage_to_cube_map &&
13377 texture->target() == GL_TEXTURE_CUBE_MAP &&
13378 target != GL_TEXTURE_CUBE_MAP_POSITIVE_X) {
13379 TextureManager::DoTexImageArguments args = {
13380 target, level, final_internal_format, width, height, 1, border,
13381 format, type, nullptr, pixels_size, 0,
13382 TextureManager::DoTexImageArguments::kTexImage2D };
13383 texture_manager()->WorkaroundCopyTexImageCubeMap(&texture_state_,
13384 &state_, &framebuffer_state_, texture_ref, func_name, args);
13385 }
13376 glCopyTexImage2D(target, level, final_internal_format, copyX, copyY, 13386 glCopyTexImage2D(target, level, final_internal_format, copyX, copyY,
13377 copyWidth, copyHeight, border); 13387 copyWidth, copyHeight, border);
13378 } 13388 }
13379 } 13389 }
13380 GLenum error = LOCAL_PEEK_GL_ERROR(func_name); 13390 GLenum error = LOCAL_PEEK_GL_ERROR(func_name);
13381 if (error == GL_NO_ERROR) { 13391 if (error == GL_NO_ERROR) {
13382 texture_manager()->SetLevelInfo(texture_ref, target, level, internal_format, 13392 texture_manager()->SetLevelInfo(texture_ref, target, level, internal_format,
13383 width, height, 1, border, format, 13393 width, height, 1, border, format,
13384 type, gfx::Rect(width, height)); 13394 type, gfx::Rect(width, height));
13385 texture->ApplyFormatWorkarounds(feature_info_.get()); 13395 texture->ApplyFormatWorkarounds(feature_info_.get());
(...skipping 4691 matching lines...) Expand 10 before | Expand all | Expand 10 after
18077 } 18087 }
18078 18088
18079 // Include the auto-generated part of this file. We split this because it means 18089 // Include the auto-generated part of this file. We split this because it means
18080 // we can easily edit the non-auto generated parts right here in this file 18090 // we can easily edit the non-auto generated parts right here in this file
18081 // instead of having to edit some template or the code generator. 18091 // instead of having to edit some template or the code generator.
18082 #include "base/macros.h" 18092 #include "base/macros.h"
18083 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 18093 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
18084 18094
18085 } // namespace gles2 18095 } // namespace gles2
18086 } // namespace gpu 18096 } // namespace gpu
OLDNEW
« no previous file with comments | « content/test/gpu/gpu_tests/webgl2_conformance_expectations.py ('k') | gpu/command_buffer/service/texture_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698