Hash :
c8db5292
Author :
Date :
2024-05-31T19:35:32
Remove locks from most glUniform* calls Note: only the Vulkan backend claims to be thread safe. glUniform1i and glUniform1iv are kept locked as they might set samplers, which is more complicated. glUniformBlockBinding is a more complex state change with notifications. Other glUniform functions simply call setUniformImpl() or setUniformMatrixfv() in the vulkan backend, which as https://crrev.com/c/5588853 and https://crrev.com/c/5592968 show only update mDefaultUniformBlocks and mDefaultUniformBlocksDirty. This should be thread-safe as long as the application is not creating race conditions itself such as by changing the same object in parallel. This should yield a significant improvement in the driver_overhead_2 benchmark which is heavy on such calls. Bug: angleproject:8666 Bug: b/335295728 Change-Id: Iad1577b9ab2eb57b6a4599ec6d70fa90eb518e8d Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5588385 Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Roman Lavrov <romanl@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>