Commit fed0dda1 by Charlie Lao Committed by Commit Bot

Remove getIndexRange call from ValidateDrawRangeElements

The spec doesn't require implementation to validate indices against range. This extra validation is costing performance dearly, thus should be removed. Bug: angleproject:4373 Change-Id: I61b0628e75de368d9e869008b7c99c429222fd6f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2033495Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarTim Van Patten <timvp@google.com> Commit-Queue: Tobin Ehlis <tobine@google.com>
parent 49a53d68
......@@ -1489,17 +1489,6 @@ bool ValidateDrawRangeElements(Context *context,
return true;
}
// Note that resolving the index range is a bit slow. We should probably optimize this.
IndexRange indexRange;
ANGLE_VALIDATION_TRY(context->getState().getVertexArray()->getIndexRange(context, type, count,
indices, &indexRange));
if (indexRange.end > end || indexRange.start < start)
{
// GL spec says that behavior in this case is undefined - generating an error is fine.
context->validationError(GL_INVALID_OPERATION, kExceedsElementRange);
return false;
}
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment