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

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

Issue 1673113002: Move WebGL1 attachment image type / attachment point matching check to command buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | gpu/command_buffer/service/framebuffer_manager.h » ('j') | 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/feature_info.h" 5 #include "gpu/command_buffer/service/feature_info.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 546 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 if (enable_depth_texture) { 557 if (enable_depth_texture) {
558 validators_.texture_internal_format.AddValue(GL_DEPTH_STENCIL); 558 validators_.texture_internal_format.AddValue(GL_DEPTH_STENCIL);
559 validators_.texture_format.AddValue(GL_DEPTH_STENCIL); 559 validators_.texture_format.AddValue(GL_DEPTH_STENCIL);
560 validators_.pixel_type.AddValue(GL_UNSIGNED_INT_24_8); 560 validators_.pixel_type.AddValue(GL_UNSIGNED_INT_24_8);
561 validators_.texture_depth_renderable_internal_format.AddValue( 561 validators_.texture_depth_renderable_internal_format.AddValue(
562 GL_DEPTH_STENCIL); 562 GL_DEPTH_STENCIL);
563 validators_.texture_stencil_renderable_internal_format.AddValue( 563 validators_.texture_stencil_renderable_internal_format.AddValue(
564 GL_DEPTH_STENCIL); 564 GL_DEPTH_STENCIL);
565 } 565 }
566 validators_.render_buffer_format.AddValue(GL_DEPTH24_STENCIL8); 566 validators_.render_buffer_format.AddValue(GL_DEPTH24_STENCIL8);
567 if (context_type_ == CONTEXT_TYPE_WEBGL1) {
568 // For glFramebufferRenderbuffer and glFramebufferTexture2D calls with
569 // attachment == GL_DEPTH_STENCIL_ATTACHMENT, we always split into two
570 // calls, one with attachment == GL_DEPTH_ATTACHMENT, and one with
571 // attachment == GL_STENCIL_ATTACHMENT. So even if the underlying driver
572 // is ES2 where GL_DEPTH_STENCIL_ATTACHMENT isn't accepted, it is still
573 // OK.
574 validators_.attachment.AddValue(GL_DEPTH_STENCIL_ATTACHMENT);
575 }
567 } 576 }
568 577
569 if (gl_version_info_->is_es3 || 578 if (gl_version_info_->is_es3 ||
570 gl_version_info_->is_desktop_core_profile || 579 gl_version_info_->is_desktop_core_profile ||
571 extensions.Contains("GL_OES_vertex_array_object") || 580 extensions.Contains("GL_OES_vertex_array_object") ||
572 extensions.Contains("GL_ARB_vertex_array_object") || 581 extensions.Contains("GL_ARB_vertex_array_object") ||
573 extensions.Contains("GL_APPLE_vertex_array_object")) { 582 extensions.Contains("GL_APPLE_vertex_array_object")) {
574 feature_flags_.native_vertex_array_object = true; 583 feature_flags_.native_vertex_array_object = true;
575 } 584 }
576 585
(...skipping 841 matching lines...) Expand 10 before | Expand all | Expand 10 after
1418 if (pos == std::string::npos) { 1427 if (pos == std::string::npos) {
1419 extensions_ += (extensions_.empty() ? "" : " ") + str; 1428 extensions_ += (extensions_.empty() ? "" : " ") + str;
1420 } 1429 }
1421 } 1430 }
1422 1431
1423 FeatureInfo::~FeatureInfo() { 1432 FeatureInfo::~FeatureInfo() {
1424 } 1433 }
1425 1434
1426 } // namespace gles2 1435 } // namespace gles2
1427 } // namespace gpu 1436 } // namespace gpu
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/framebuffer_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698