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

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: fix unpack buffer 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_teximage_before_copyteximage_to_cube_map &&
13294 texture->target() == GL_TEXTURE_CUBE_MAP &&
13295 target != GL_TEXTURE_CUBE_MAP_POSITIVE_X) {
13296 TextureManager::DoTexImageArguments args = {
13297 target, level, final_internal_format, width, height, 1, border,
13298 format, type, nullptr, pixels_size, 0,
13299 TextureManager::DoTexImageArguments::kTexImage2D };
13300 texture_manager()->WorkaroundCopyTexImageCubeMap(&texture_state_,
13301 &state_, &framebuffer_state_, texture_ref, func_name, args);
13302 }
13293 glCopyTexImage2D(target, level, final_internal_format, copyX, copyY, 13303 glCopyTexImage2D(target, level, final_internal_format, copyX, copyY,
13294 copyWidth, copyHeight, border); 13304 copyWidth, copyHeight, border);
13295 } 13305 }
13296 } 13306 }
13297 GLenum error = LOCAL_PEEK_GL_ERROR(func_name); 13307 GLenum error = LOCAL_PEEK_GL_ERROR(func_name);
13298 if (error == GL_NO_ERROR) { 13308 if (error == GL_NO_ERROR) {
13299 texture_manager()->SetLevelInfo(texture_ref, target, level, internal_format, 13309 texture_manager()->SetLevelInfo(texture_ref, target, level, internal_format,
13300 width, height, 1, border, format, 13310 width, height, 1, border, format,
13301 type, gfx::Rect(width, height)); 13311 type, gfx::Rect(width, height));
13302 texture->ApplyFormatWorkarounds(feature_info_.get()); 13312 texture->ApplyFormatWorkarounds(feature_info_.get());
(...skipping 4691 matching lines...) Expand 10 before | Expand all | Expand 10 after
17994 } 18004 }
17995 18005
17996 // Include the auto-generated part of this file. We split this because it means 18006 // 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 18007 // 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. 18008 // instead of having to edit some template or the code generator.
17999 #include "base/macros.h" 18009 #include "base/macros.h"
18000 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 18010 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
18001 18011
18002 } // namespace gles2 18012 } // namespace gles2
18003 } // namespace gpu 18013 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698