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

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

Issue 2019453003: command_buffer: MAX/BASE_LEVEL fixes for GetTexParameter (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 4 years, 6 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 | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | gpu/config/gpu_driver_bug_list_json.cc » ('j') | 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 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after
1209 case GL_TEXTURE_MAG_FILTER: 1209 case GL_TEXTURE_MAG_FILTER:
1210 case GL_TEXTURE_WRAP_R: 1210 case GL_TEXTURE_WRAP_R:
1211 case GL_TEXTURE_WRAP_S: 1211 case GL_TEXTURE_WRAP_S:
1212 case GL_TEXTURE_WRAP_T: 1212 case GL_TEXTURE_WRAP_T:
1213 case GL_TEXTURE_COMPARE_FUNC: 1213 case GL_TEXTURE_COMPARE_FUNC:
1214 case GL_TEXTURE_COMPARE_MODE: 1214 case GL_TEXTURE_COMPARE_MODE:
1215 case GL_TEXTURE_BASE_LEVEL: 1215 case GL_TEXTURE_BASE_LEVEL:
1216 case GL_TEXTURE_MAX_LEVEL: 1216 case GL_TEXTURE_MAX_LEVEL:
1217 case GL_TEXTURE_USAGE_ANGLE: 1217 case GL_TEXTURE_USAGE_ANGLE:
1218 { 1218 {
1219 GLint iparam = static_cast<GLint>(param); 1219 GLint iparam = static_cast<GLint>(std::round(param));
1220 return SetParameteri(feature_info, pname, iparam); 1220 return SetParameteri(feature_info, pname, iparam);
1221 } 1221 }
1222 case GL_TEXTURE_MIN_LOD: 1222 case GL_TEXTURE_MIN_LOD:
1223 sampler_state_.min_lod = param; 1223 sampler_state_.min_lod = param;
1224 break; 1224 break;
1225 case GL_TEXTURE_MAX_LOD: 1225 case GL_TEXTURE_MAX_LOD:
1226 sampler_state_.max_lod = param; 1226 sampler_state_.max_lod = param;
1227 break; 1227 break;
1228 case GL_TEXTURE_MAX_ANISOTROPY_EXT: 1228 case GL_TEXTURE_MAX_ANISOTROPY_EXT:
1229 if (param < 1.f) { 1229 if (param < 1.f) {
(...skipping 2079 matching lines...) Expand 10 before | Expand all | Expand 10 after
3309 uint32_t TextureManager::GetServiceIdGeneration() const { 3309 uint32_t TextureManager::GetServiceIdGeneration() const {
3310 return current_service_id_generation_; 3310 return current_service_id_generation_;
3311 } 3311 }
3312 3312
3313 void TextureManager::IncrementServiceIdGeneration() { 3313 void TextureManager::IncrementServiceIdGeneration() {
3314 current_service_id_generation_++; 3314 current_service_id_generation_++;
3315 } 3315 }
3316 3316
3317 } // namespace gles2 3317 } // namespace gles2
3318 } // namespace gpu 3318 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | gpu/config/gpu_driver_bug_list_json.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698