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

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

Issue 1831833006: 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, 9 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_->gl_version_info().IsAtLeastGL(3, 2)) {
3027 glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS);
3028 }
3029
3021 has_robustness_extension_ = 3030 has_robustness_extension_ =
3022 context->HasExtension("GL_ARB_robustness") || 3031 context->HasExtension("GL_ARB_robustness") ||
3023 context->HasExtension("GL_KHR_robustness") || 3032 context->HasExtension("GL_KHR_robustness") ||
3024 context->HasExtension("GL_EXT_robustness"); 3033 context->HasExtension("GL_EXT_robustness");
3025 3034
3026 if (!InitializeShaderTranslator()) { 3035 if (!InitializeShaderTranslator()) {
3027 return false; 3036 return false;
3028 } 3037 }
3029 3038
3030 GLint viewport_params[4] = { 0 }; 3039 GLint viewport_params[4] = { 0 };
(...skipping 13302 matching lines...) Expand 10 before | Expand all | Expand 10 after
16333 } 16342 }
16334 16343
16335 // Include the auto-generated part of this file. We split this because it means 16344 // Include the auto-generated part of this file. We split this because it means
16336 // we can easily edit the non-auto generated parts right here in this file 16345 // we can easily edit the non-auto generated parts right here in this file
16337 // instead of having to edit some template or the code generator. 16346 // instead of having to edit some template or the code generator.
16338 #include "base/macros.h" 16347 #include "base/macros.h"
16339 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 16348 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
16340 16349
16341 } // namespace gles2 16350 } // namespace gles2
16342 } // namespace gpu 16351 } // 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