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