| 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 3073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3084 | 3084 |
| 3085 // In theory |needs_emulation| needs to be true on Desktop GL 4.1 or lower. | 3085 // In theory |needs_emulation| needs to be true on Desktop GL 4.1 or lower. |
| 3086 // However, we set it to true everywhere, not to trust drivers to handle | 3086 // However, we set it to true everywhere, not to trust drivers to handle |
| 3087 // out-of-bounds buffer accesses. | 3087 // out-of-bounds buffer accesses. |
| 3088 bool needs_emulation = true; | 3088 bool needs_emulation = true; |
| 3089 transform_feedback_manager_.reset(new TransformFeedbackManager( | 3089 transform_feedback_manager_.reset(new TransformFeedbackManager( |
| 3090 group_->max_transform_feedback_separate_attribs(), needs_emulation)); | 3090 group_->max_transform_feedback_separate_attribs(), needs_emulation)); |
| 3091 | 3091 |
| 3092 if (feature_info_->IsWebGL2OrES3Context()) { | 3092 if (feature_info_->IsWebGL2OrES3Context()) { |
| 3093 if (!feature_info_->IsES3Capable()) { | 3093 if (!feature_info_->IsES3Capable()) { |
| 3094 LOG(ERROR) << "Underlying driver does not support ES3."; | 3094 LOG(ERROR) << "ES3 is blacklisted/disabled/unsupported by driver."; |
| 3095 Destroy(true); | 3095 Destroy(true); |
| 3096 return false; | 3096 return false; |
| 3097 } | 3097 } |
| 3098 feature_info_->EnableES3Validators(); | 3098 feature_info_->EnableES3Validators(); |
| 3099 set_unsafe_es3_apis_enabled(true); | 3099 set_unsafe_es3_apis_enabled(true); |
| 3100 | 3100 |
| 3101 frag_depth_explicitly_enabled_ = true; | 3101 frag_depth_explicitly_enabled_ = true; |
| 3102 draw_buffers_explicitly_enabled_ = true; | 3102 draw_buffers_explicitly_enabled_ = true; |
| 3103 // TODO(zmo): Look into shader_texture_lod_explicitly_enabled_ situation. | 3103 // TODO(zmo): Look into shader_texture_lod_explicitly_enabled_ situation. |
| 3104 | 3104 |
| (...skipping 15655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 18760 } | 18760 } |
| 18761 | 18761 |
| 18762 // Include the auto-generated part of this file. We split this because it means | 18762 // Include the auto-generated part of this file. We split this because it means |
| 18763 // we can easily edit the non-auto generated parts right here in this file | 18763 // we can easily edit the non-auto generated parts right here in this file |
| 18764 // instead of having to edit some template or the code generator. | 18764 // instead of having to edit some template or the code generator. |
| 18765 #include "base/macros.h" | 18765 #include "base/macros.h" |
| 18766 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 18766 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
| 18767 | 18767 |
| 18768 } // namespace gles2 | 18768 } // namespace gles2 |
| 18769 } // namespace gpu | 18769 } // namespace gpu |
| OLD | NEW |