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

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

Issue 1840743004: Turn on seamless cubemap by default on Desktop GL for ES3. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.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/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 3000 matching lines...) Expand 10 before | Expand all | Expand 10 after
3011 // variable in fragment shaders. 3011 // variable in fragment shaders.
3012 if (!feature_info_->gl_version_info().BehavesLikeGLES()) { 3012 if (!feature_info_->gl_version_info().BehavesLikeGLES()) {
3013 glEnable(GL_VERTEX_PROGRAM_POINT_SIZE); 3013 glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
3014 glEnable(GL_POINT_SPRITE); 3014 glEnable(GL_POINT_SPRITE);
3015 } else if (feature_info_->gl_version_info().is_desktop_core_profile) { 3015 } else if (feature_info_->gl_version_info().is_desktop_core_profile) {
3016 // The desktop core profile changed how program point size mode is 3016 // The desktop core profile changed how program point size mode is
3017 // enabled. 3017 // enabled.
3018 glEnable(GL_PROGRAM_POINT_SIZE); 3018 glEnable(GL_PROGRAM_POINT_SIZE);
3019 } 3019 }
3020 3020
3021 // ES3 requires seamless cubemap. ES2 does not.
3022 // However, when ES2 is implemented on top of DX11, seamless cubemap is
3023 // always enabled and there is no way to disable it.
3024 // Therefore, it seems OK to also always enable it on top of Desktop GL for
3025 // both ES2 and ES3 contexts.
3026 if (!feature_info_->workarounds().disable_texture_cube_map_seamless &&
3027 feature_info_->gl_version_info().IsAtLeastGL(3, 2)) {
3028 glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS);
3029 }
3030
3021 has_robustness_extension_ = 3031 has_robustness_extension_ =
3022 context->HasExtension("GL_ARB_robustness") || 3032 context->HasExtension("GL_ARB_robustness") ||
3023 context->HasExtension("GL_KHR_robustness") || 3033 context->HasExtension("GL_KHR_robustness") ||
3024 context->HasExtension("GL_EXT_robustness"); 3034 context->HasExtension("GL_EXT_robustness");
3025 3035
3026 if (!InitializeShaderTranslator()) { 3036 if (!InitializeShaderTranslator()) {
3027 return false; 3037 return false;
3028 } 3038 }
3029 3039
3030 GLint viewport_params[4] = { 0 }; 3040 GLint viewport_params[4] = { 0 };
(...skipping 13304 matching lines...) Expand 10 before | Expand all | Expand 10 after
16335 } 16345 }
16336 16346
16337 // Include the auto-generated part of this file. We split this because it means 16347 // Include the auto-generated part of this file. We split this because it means
16338 // we can easily edit the non-auto generated parts right here in this file 16348 // we can easily edit the non-auto generated parts right here in this file
16339 // instead of having to edit some template or the code generator. 16349 // instead of having to edit some template or the code generator.
16340 #include "base/macros.h" 16350 #include "base/macros.h"
16341 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 16351 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
16342 16352
16343 } // namespace gles2 16353 } // namespace gles2
16344 } // namespace gpu 16354 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698