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 2724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2735 LOG(ERROR) << "Underlying driver does not support ES3."; | 2735 LOG(ERROR) << "Underlying driver does not support ES3."; |
2736 Destroy(true); | 2736 Destroy(true); |
2737 return false; | 2737 return false; |
2738 } | 2738 } |
2739 feature_info_->EnableES3Validators(); | 2739 feature_info_->EnableES3Validators(); |
2740 set_unsafe_es3_apis_enabled(true); | 2740 set_unsafe_es3_apis_enabled(true); |
2741 | 2741 |
2742 frag_depth_explicitly_enabled_ = true; | 2742 frag_depth_explicitly_enabled_ = true; |
2743 draw_buffers_explicitly_enabled_ = true; | 2743 draw_buffers_explicitly_enabled_ = true; |
2744 // TODO(zmo): Look into shader_texture_lod_explicitly_enabled_ situation. | 2744 // TODO(zmo): Look into shader_texture_lod_explicitly_enabled_ situation. |
2745 | |
2746 // TEXTURE_CUBE_MAP_SEAMLESS is available on Desktop GL 3.2 or above. | |
2747 // ES3 requires it to be always supported. | |
2748 // We don't support ES3 on Desktop GL lower than 3.2. | |
2749 if (!feature_info_->gl_version_info().BehavesLikeGLES()) { | |
2750 glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS); | |
2751 } | |
piman
2016/03/24 22:24:06
Let's just turn it on always, even for es2 context
| |
2745 } | 2752 } |
2746 | 2753 |
2747 state_.attrib_values.resize(group_->max_vertex_attribs()); | 2754 state_.attrib_values.resize(group_->max_vertex_attribs()); |
2748 vertex_array_manager_.reset(new VertexArrayManager()); | 2755 vertex_array_manager_.reset(new VertexArrayManager()); |
2749 | 2756 |
2750 GLuint default_vertex_attrib_service_id = 0; | 2757 GLuint default_vertex_attrib_service_id = 0; |
2751 if (features().native_vertex_array_object) { | 2758 if (features().native_vertex_array_object) { |
2752 glGenVertexArraysOES(1, &default_vertex_attrib_service_id); | 2759 glGenVertexArraysOES(1, &default_vertex_attrib_service_id); |
2753 glBindVertexArrayOES(default_vertex_attrib_service_id); | 2760 glBindVertexArrayOES(default_vertex_attrib_service_id); |
2754 } | 2761 } |
(...skipping 13578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
16333 } | 16340 } |
16334 | 16341 |
16335 // Include the auto-generated part of this file. We split this because it means | 16342 // 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 | 16343 // 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. | 16344 // instead of having to edit some template or the code generator. |
16338 #include "base/macros.h" | 16345 #include "base/macros.h" |
16339 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 16346 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
16340 | 16347 |
16341 } // namespace gles2 | 16348 } // namespace gles2 |
16342 } // namespace gpu | 16349 } // namespace gpu |
OLD | NEW |