Commit 2d87551d171bdefc8c4ff9649dc1310489c71288

Charlie Lao 2022-12-05T10:47:40

Vulkan: Make mLargestAllocatedIndex atomic TSAN is complaining mLargestAllocatedIndex not thread safe. This CL makes it atomic and make it mean " the largest queue index we have ever allocated/seen" so that it will be thread safe. It is impossible to use a queueIndex before it been allocated. But it is still possible that some mUse still referencing a queueIndex after it is been released. The only downside is that we may get into slightly less optimal code path for GetBatchCountUpToSerials if we ever get into more than 64 queueIndex and then get bellow 64 again, but that should not a real concern. Bug: angleproject:7860 Change-Id: I4c99bae24e9d72298253e43f8d108444a8f46ebc Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4080590 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>