Commit f1150231f174a421c93f6d174985ec1c962cde2a

Geoff Lang 2024-01-16T16:28:36

Track WebGL buffer type in gl::Buffer state. WebGL has special validation that disallows buffers from changing "WebGL buffer type". Once a buffer is marked as having index data it cannot be bound as any other type of buffer except the copy binding points to copy to other index buffers. This disallows any GPU writes to buffers used for index data. Use this rule to shadow index buffer data when the driver is unable to give us robust access. Index range computation can be done much faster when the buffer does not need to be read back. Bug: angleproject:8434 Change-Id: I059eff732bb2f43234f61d9ef5528289f7698b38 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5200242 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>