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

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

Issue 2166083002: texture_manager: disable cubemap workaround on ES3 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: texture_manager: disable cubemap workaround on ES3 Created 4 years, 5 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
« no previous file with comments | « content/test/gpu/gpu_tests/webgl2_conformance_expectations.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/texture_manager.h" 5 #include "gpu/command_buffer/service/texture_manager.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 2365 matching lines...) Expand 10 before | Expand all | Expand 10 after
2376 TextureRef* texture_ref; 2376 TextureRef* texture_ref;
2377 if (!ValidateTexImage(state, function_name, args, &texture_ref)) { 2377 if (!ValidateTexImage(state, function_name, args, &texture_ref)) {
2378 return; 2378 return;
2379 } 2379 }
2380 2380
2381 Buffer* buffer = state->bound_pixel_unpack_buffer.get(); 2381 Buffer* buffer = state->bound_pixel_unpack_buffer.get();
2382 2382
2383 // ValidateTexImage is passed already. 2383 // ValidateTexImage is passed already.
2384 Texture* texture = texture_ref->texture(); 2384 Texture* texture = texture_ref->texture();
2385 bool need_cube_map_workaround = 2385 bool need_cube_map_workaround =
2386 !feature_info_->IsES3Enabled() &&
2386 texture->target() == GL_TEXTURE_CUBE_MAP && 2387 texture->target() == GL_TEXTURE_CUBE_MAP &&
2387 (texture_state->force_cube_complete || 2388 (texture_state->force_cube_complete ||
2388 (texture_state->force_cube_map_positive_x_allocation && 2389 (texture_state->force_cube_map_positive_x_allocation &&
2389 args.target != GL_TEXTURE_CUBE_MAP_POSITIVE_X)); 2390 args.target != GL_TEXTURE_CUBE_MAP_POSITIVE_X));
2390 if (need_cube_map_workaround && !buffer) { 2391 if (need_cube_map_workaround && !buffer) {
2391 // TODO(zmo): The following code does not work with an unpack buffer bound. 2392 // TODO(zmo): The following code does not work with an unpack buffer bound.
2392 std::vector<GLenum> undefined_faces; 2393 std::vector<GLenum> undefined_faces;
2393 if (texture_state->force_cube_complete) { 2394 if (texture_state->force_cube_complete) {
2394 int width = 0; 2395 int width = 0;
2395 int height = 0; 2396 int height = 0;
(...skipping 982 matching lines...) Expand 10 before | Expand all | Expand 10 after
3378 uint32_t TextureManager::GetServiceIdGeneration() const { 3379 uint32_t TextureManager::GetServiceIdGeneration() const {
3379 return current_service_id_generation_; 3380 return current_service_id_generation_;
3380 } 3381 }
3381 3382
3382 void TextureManager::IncrementServiceIdGeneration() { 3383 void TextureManager::IncrementServiceIdGeneration() {
3383 current_service_id_generation_++; 3384 current_service_id_generation_++;
3384 } 3385 }
3385 3386
3386 } // namespace gles2 3387 } // namespace gles2
3387 } // namespace gpu 3388 } // namespace gpu
OLDNEW
« no previous file with comments | « content/test/gpu/gpu_tests/webgl2_conformance_expectations.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698