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

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

Issue 23464034: Set MaxDrawBuffers to 1 if WEBGL_draw_buffers is not enabled in WebGL. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stdio.h> 7 #include <stdio.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <list> 10 #include <list>
(...skipping 2465 matching lines...) Expand 10 before | Expand all | Expand 10 after
2476 GetShaderPrecisionFormatImpl(GL_FRAGMENT_SHADER, GL_HIGH_FLOAT, 2476 GetShaderPrecisionFormatImpl(GL_FRAGMENT_SHADER, GL_HIGH_FLOAT,
2477 range, &precision); 2477 range, &precision);
2478 resources.FragmentPrecisionHigh = 2478 resources.FragmentPrecisionHigh =
2479 PrecisionMeetsSpecForHighpFloat(range[0], range[1], precision); 2479 PrecisionMeetsSpecForHighpFloat(range[0], range[1], precision);
2480 #endif 2480 #endif
2481 2481
2482 if (force_webgl_glsl_validation_) { 2482 if (force_webgl_glsl_validation_) {
2483 resources.OES_standard_derivatives = derivatives_explicitly_enabled_; 2483 resources.OES_standard_derivatives = derivatives_explicitly_enabled_;
2484 resources.EXT_frag_depth = frag_depth_explicitly_enabled_; 2484 resources.EXT_frag_depth = frag_depth_explicitly_enabled_;
2485 resources.EXT_draw_buffers = draw_buffers_explicitly_enabled_; 2485 resources.EXT_draw_buffers = draw_buffers_explicitly_enabled_;
2486 if (!draw_buffers_explicitly_enabled_)
2487 resources.MaxDrawBuffers = 1;
2486 } else { 2488 } else {
2487 resources.OES_standard_derivatives = 2489 resources.OES_standard_derivatives =
2488 features().oes_standard_derivatives ? 1 : 0; 2490 features().oes_standard_derivatives ? 1 : 0;
2489 resources.ARB_texture_rectangle = 2491 resources.ARB_texture_rectangle =
2490 features().arb_texture_rectangle ? 1 : 0; 2492 features().arb_texture_rectangle ? 1 : 0;
2491 resources.OES_EGL_image_external = 2493 resources.OES_EGL_image_external =
2492 features().oes_egl_image_external ? 1 : 0; 2494 features().oes_egl_image_external ? 1 : 0;
2493 resources.EXT_draw_buffers = 2495 resources.EXT_draw_buffers =
2494 features().ext_draw_buffers ? 1 : 0; 2496 features().ext_draw_buffers ? 1 : 0;
2495 resources.EXT_frag_depth = 2497 resources.EXT_frag_depth =
(...skipping 7768 matching lines...) Expand 10 before | Expand all | Expand 10 after
10264 return error::kNoError; 10266 return error::kNoError;
10265 } 10267 }
10266 10268
10267 // Include the auto-generated part of this file. We split this because it means 10269 // Include the auto-generated part of this file. We split this because it means
10268 // we can easily edit the non-auto generated parts right here in this file 10270 // we can easily edit the non-auto generated parts right here in this file
10269 // instead of having to edit some template or the code generator. 10271 // instead of having to edit some template or the code generator.
10270 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 10272 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
10271 10273
10272 } // namespace gles2 10274 } // namespace gles2
10273 } // namespace gpu 10275 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698