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

Unified Diff: gpu/command_buffer/service/vertex_attrib_manager.cc

Issue 2950423002: Remove WebGL2 constraint that requires draw*Instanced() calls to fail when no vertex attrib has zer… (Closed)
Patch Set: one more entry Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/test/gpu/gpu_tests/webgl2_conformance_expectations.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/vertex_attrib_manager.cc
diff --git a/gpu/command_buffer/service/vertex_attrib_manager.cc b/gpu/command_buffer/service/vertex_attrib_manager.cc
index a48c678d28a8e3f4a3293644fe9fa32b71b16a3f..30d3fa1b3df2c8a2ef198049d86e8f18fed9c53e 100644
--- a/gpu/command_buffer/service/vertex_attrib_manager.cc
+++ b/gpu/command_buffer/service/vertex_attrib_manager.cc
@@ -272,11 +272,14 @@ bool VertexAttribManager::ValidateBindings(
}
}
- // Instanced drawing needs at least one enabled attribute with divisor zero.
+ // Due to D3D9 limitation, in ES2/WebGL1, instanced drawing needs at least
+ // one enabled attribute with divisor zero. This does not apply to D3D11,
+ // therefore, it also does not apply to ES3/WebGL2.
// Non-instanced drawing is fine with having no attributes at all, but if
// there are attributes, at least one should have divisor zero.
// (See ANGLE_instanced_arrays spec)
- if (!divisor0 && (instanced || have_enabled_active_attribs)) {
+ if (feature_info->IsWebGL1OrES2Context() && !divisor0 &&
+ (instanced || have_enabled_active_attribs)) {
ERRORSTATE_SET_GL_ERROR(
error_state, GL_INVALID_OPERATION, function_name,
"attempt to draw with all attributes having non-zero divisors");
« no previous file with comments | « content/test/gpu/gpu_tests/webgl2_conformance_expectations.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698