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

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

Issue 2678483003: Fix EXT_draw_buffers detection on some GL ES 3 contexts (Closed)
Patch Set: remove nv_draw_buffers entirely Created 3 years, 10 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
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 3807 matching lines...) Expand 10 before | Expand all | Expand 10 after
3818 ShShaderSpec shader_spec; 3818 ShShaderSpec shader_spec;
3819 switch (feature_info_->context_type()) { 3819 switch (feature_info_->context_type()) {
3820 case CONTEXT_TYPE_WEBGL1: 3820 case CONTEXT_TYPE_WEBGL1:
3821 shader_spec = SH_WEBGL_SPEC; 3821 shader_spec = SH_WEBGL_SPEC;
3822 resources.OES_standard_derivatives = derivatives_explicitly_enabled_; 3822 resources.OES_standard_derivatives = derivatives_explicitly_enabled_;
3823 resources.EXT_frag_depth = frag_depth_explicitly_enabled_; 3823 resources.EXT_frag_depth = frag_depth_explicitly_enabled_;
3824 resources.EXT_draw_buffers = draw_buffers_explicitly_enabled_; 3824 resources.EXT_draw_buffers = draw_buffers_explicitly_enabled_;
3825 if (!draw_buffers_explicitly_enabled_) 3825 if (!draw_buffers_explicitly_enabled_)
3826 resources.MaxDrawBuffers = 1; 3826 resources.MaxDrawBuffers = 1;
3827 resources.EXT_shader_texture_lod = shader_texture_lod_explicitly_enabled_; 3827 resources.EXT_shader_texture_lod = shader_texture_lod_explicitly_enabled_;
3828 resources.NV_draw_buffers =
3829 draw_buffers_explicitly_enabled_ && features().nv_draw_buffers;
3830 break; 3828 break;
3831 case CONTEXT_TYPE_WEBGL2: 3829 case CONTEXT_TYPE_WEBGL2:
3832 shader_spec = SH_WEBGL2_SPEC; 3830 shader_spec = SH_WEBGL2_SPEC;
3833 break; 3831 break;
3834 case CONTEXT_TYPE_OPENGLES2: 3832 case CONTEXT_TYPE_OPENGLES2:
3835 shader_spec = SH_GLES2_SPEC; 3833 shader_spec = SH_GLES2_SPEC;
3836 resources.OES_standard_derivatives = 3834 resources.OES_standard_derivatives =
3837 features().oes_standard_derivatives ? 1 : 0; 3835 features().oes_standard_derivatives ? 1 : 0;
3838 resources.ARB_texture_rectangle = 3836 resources.ARB_texture_rectangle =
3839 features().arb_texture_rectangle ? 1 : 0; 3837 features().arb_texture_rectangle ? 1 : 0;
3840 resources.OES_EGL_image_external = 3838 resources.OES_EGL_image_external =
3841 features().oes_egl_image_external ? 1 : 0; 3839 features().oes_egl_image_external ? 1 : 0;
3842 resources.NV_EGL_stream_consumer_external = 3840 resources.NV_EGL_stream_consumer_external =
3843 features().nv_egl_stream_consumer_external ? 1 : 0; 3841 features().nv_egl_stream_consumer_external ? 1 : 0;
3844 resources.EXT_draw_buffers = 3842 resources.EXT_draw_buffers =
3845 features().ext_draw_buffers ? 1 : 0; 3843 features().ext_draw_buffers ? 1 : 0;
3846 resources.EXT_frag_depth = 3844 resources.EXT_frag_depth =
3847 features().ext_frag_depth ? 1 : 0; 3845 features().ext_frag_depth ? 1 : 0;
3848 resources.EXT_shader_texture_lod = 3846 resources.EXT_shader_texture_lod =
3849 features().ext_shader_texture_lod ? 1 : 0; 3847 features().ext_shader_texture_lod ? 1 : 0;
3850 resources.NV_draw_buffers =
3851 features().nv_draw_buffers ? 1 : 0;
3852 resources.EXT_blend_func_extended = 3848 resources.EXT_blend_func_extended =
3853 features().ext_blend_func_extended ? 1 : 0; 3849 features().ext_blend_func_extended ? 1 : 0;
3854 break; 3850 break;
3855 case CONTEXT_TYPE_OPENGLES3: 3851 case CONTEXT_TYPE_OPENGLES3:
3856 shader_spec = SH_GLES3_SPEC; 3852 shader_spec = SH_GLES3_SPEC;
3857 resources.ARB_texture_rectangle = 3853 resources.ARB_texture_rectangle =
3858 features().arb_texture_rectangle ? 1 : 0; 3854 features().arb_texture_rectangle ? 1 : 0;
3859 resources.OES_EGL_image_external = 3855 resources.OES_EGL_image_external =
3860 features().oes_egl_image_external ? 1 : 0; 3856 features().oes_egl_image_external ? 1 : 0;
3861 resources.NV_EGL_stream_consumer_external = 3857 resources.NV_EGL_stream_consumer_external =
(...skipping 15389 matching lines...) Expand 10 before | Expand all | Expand 10 after
19251 } 19247 }
19252 19248
19253 // Include the auto-generated part of this file. We split this because it means 19249 // Include the auto-generated part of this file. We split this because it means
19254 // we can easily edit the non-auto generated parts right here in this file 19250 // we can easily edit the non-auto generated parts right here in this file
19255 // instead of having to edit some template or the code generator. 19251 // instead of having to edit some template or the code generator.
19256 #include "base/macros.h" 19252 #include "base/macros.h"
19257 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 19253 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
19258 19254
19259 } // namespace gles2 19255 } // namespace gles2
19260 } // namespace gpu 19256 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698