| 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 3016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3027 // ES3 requires seamless cubemap. ES2 does not. | 3027 // ES3 requires seamless cubemap. ES2 does not. |
| 3028 // However, when ES2 is implemented on top of DX11, seamless cubemap is | 3028 // However, when ES2 is implemented on top of DX11, seamless cubemap is |
| 3029 // always enabled and there is no way to disable it. | 3029 // always enabled and there is no way to disable it. |
| 3030 // Therefore, it seems OK to also always enable it on top of Desktop GL for | 3030 // Therefore, it seems OK to also always enable it on top of Desktop GL for |
| 3031 // both ES2 and ES3 contexts. | 3031 // both ES2 and ES3 contexts. |
| 3032 if (!feature_info_->workarounds().disable_texture_cube_map_seamless && | 3032 if (!feature_info_->workarounds().disable_texture_cube_map_seamless && |
| 3033 feature_info_->gl_version_info().IsAtLeastGL(3, 2)) { | 3033 feature_info_->gl_version_info().IsAtLeastGL(3, 2)) { |
| 3034 glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS); | 3034 glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS); |
| 3035 } | 3035 } |
| 3036 | 3036 |
| 3037 // ES3 requires sRGB-linear color space conversion if |
| 3038 // FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING for a buffer is sRGB, for situations |
| 3039 // like blending, clearing, etc. |
| 3040 // On Desktop GL, this is not enabled by default. |
| 3041 if (feature_info_->gl_version_info().IsAtLeastGL(3, 2)) { |
| 3042 glEnable(GL_FRAMEBUFFER_SRGB); |
| 3043 } |
| 3044 |
| 3037 has_robustness_extension_ = | 3045 has_robustness_extension_ = |
| 3038 context->HasExtension("GL_ARB_robustness") || | 3046 context->HasExtension("GL_ARB_robustness") || |
| 3039 context->HasExtension("GL_KHR_robustness") || | 3047 context->HasExtension("GL_KHR_robustness") || |
| 3040 context->HasExtension("GL_EXT_robustness"); | 3048 context->HasExtension("GL_EXT_robustness"); |
| 3041 | 3049 |
| 3042 if (!InitializeShaderTranslator()) { | 3050 if (!InitializeShaderTranslator()) { |
| 3043 return false; | 3051 return false; |
| 3044 } | 3052 } |
| 3045 | 3053 |
| 3046 GLint viewport_params[4] = { 0 }; | 3054 GLint viewport_params[4] = { 0 }; |
| (...skipping 13316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16363 } | 16371 } |
| 16364 | 16372 |
| 16365 // Include the auto-generated part of this file. We split this because it means | 16373 // Include the auto-generated part of this file. We split this because it means |
| 16366 // we can easily edit the non-auto generated parts right here in this file | 16374 // we can easily edit the non-auto generated parts right here in this file |
| 16367 // instead of having to edit some template or the code generator. | 16375 // instead of having to edit some template or the code generator. |
| 16368 #include "base/macros.h" | 16376 #include "base/macros.h" |
| 16369 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 16377 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
| 16370 | 16378 |
| 16371 } // namespace gles2 | 16379 } // namespace gles2 |
| 16372 } // namespace gpu | 16380 } // namespace gpu |
| OLD | NEW |