Commit 4b4ea4be by Ethan Lee Committed by Commit Bot

Remove getIndexRange call from ValidateDrawRangeElementsBaseVertex

This is essentially the same commit as fed0dda1, but with the BaseVertex variant. Bug: angleproject:4373 Change-Id: I2d6fe46a0e8ce5faa8c92d4db6909f8cabd9692f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2032972Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarCharlie Lao <cclao@google.com> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent c5b227ba
...@@ -182,17 +182,6 @@ bool ValidateDrawRangeElementsBaseVertex(Context *context, ...@@ -182,17 +182,6 @@ bool ValidateDrawRangeElementsBaseVertex(Context *context,
return true; 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; 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