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

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

Issue 1813163003: Fix PRIMITIVE_RESTART_FIXED_INDEX handling in command buffer and WebGL 2.0. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
Index: gpu/command_buffer/service/gles2_cmd_decoder.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 5e1ec96deb2db0e2627a09fcd24820b653c90b71..57a7ddac863599656377fb2e1e0bc5f0327b1e8b 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -8282,7 +8282,9 @@ error::Error GLES2DecoderImpl::DoDrawElements(const char* function_name,
state_.vertex_attrib_manager->element_array_buffer();
if (!element_array_buffer->GetMaxValueForRange(
- offset, count, type, &max_vertex_accessed)) {
+ offset, count, type,
+ state_.GetEnabled(GL_PRIMITIVE_RESTART_FIXED_INDEX),
piman 2016/03/19 00:56:11 nit: state_.enable_flags.primitive_restart_fixed_i
Ken Russell (switch to Gerrit) 2016/03/19 04:06:53 Done here and below.
+ &max_vertex_accessed)) {
LOCAL_SET_GL_ERROR(
GL_INVALID_OPERATION, function_name, "range out of bounds for buffer");
return error::kNoError;
@@ -8380,7 +8382,9 @@ GLuint GLES2DecoderImpl::DoGetMaxValueInBufferCHROMIUM(
GL_INVALID_VALUE, "GetMaxValueInBufferCHROMIUM", "unknown buffer");
} else {
if (!buffer->GetMaxValueForRange(
- offset, count, type, &max_vertex_accessed)) {
+ offset, count, type,
+ state_.GetEnabled(GL_PRIMITIVE_RESTART_FIXED_INDEX),
piman 2016/03/19 00:56:11 This is used by the client side, for client-side b
Ken Russell (switch to Gerrit) 2016/03/19 04:06:53 Added a comment about how this value is used and w
+ &max_vertex_accessed)) {
// TODO(gman): Should this be a GL error or a command buffer error?
LOCAL_SET_GL_ERROR(
GL_INVALID_OPERATION,

Powered by Google App Engine
This is Rietveld 408576698