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

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

Issue 1827693002: Revert of 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 73b81668aa398adb8e314a740e1a38d6a499be55..ac7209792314dad5e0dbf7002e85e9847d9e71ca 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -8283,9 +8283,7 @@
state_.vertex_attrib_manager->element_array_buffer();
if (!element_array_buffer->GetMaxValueForRange(
- offset, count, type,
- state_.enable_flags.primitive_restart_fixed_index,
- &max_vertex_accessed)) {
+ offset, count, type, &max_vertex_accessed)) {
LOCAL_SET_GL_ERROR(
GL_INVALID_OPERATION, function_name, "range out of bounds for buffer");
return error::kNoError;
@@ -8382,18 +8380,8 @@
LOCAL_SET_GL_ERROR(
GL_INVALID_VALUE, "GetMaxValueInBufferCHROMIUM", "unknown buffer");
} else {
- // The max value is used here to emulate client-side vertex
- // arrays, by uploading enough vertices into buffer objects to
- // cover the DrawElements call. Baking the primitive restart bit
- // into this result isn't strictly correct in all cases; the
- // client side code should pass down the bit and decide how to use
- // the result. However, the only caller makes the draw call
- // immediately afterward, so the state won't change between this
- // query and the draw call.
if (!buffer->GetMaxValueForRange(
- offset, count, type,
- state_.enable_flags.primitive_restart_fixed_index,
- &max_vertex_accessed)) {
+ offset, count, type, &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