Backends: Metal: use a dedicated bufferCacheLock to avoid crashing when bufferCache is replaced by a new object while being used for synchronize(). (#9367)

This also removes the dispatch onto main when adding the finished buffers back into the cache. This operation should be fine to run on any thread as long as it's inside the sync block.
This commit is contained in:
Andy Grundman
2026-04-13 19:16:15 -04:00
committed by ocornut
parent ed4dd679f1
commit 4b80d409e7
2 changed files with 13 additions and 10 deletions
+3 -1
View File
@@ -89,8 +89,10 @@ Other Changes:
- Misc:
- Minor optimization: reduce redudant label scanning in common widgets.
- Backends:
- Metal: avoid redundant vertex buffer bind in SetupRenderState, which leads
- Metal: avoid redundant vertex buffer bind in `SetupRenderState()`, which leads
to validation issue. (#9343) [@Hunam6]
- Metal: use a dedicated `bufferCacheLock` to avoid crashing when `bufferCache` is
replaced by a new object while being used for `@synchronize()`. (#9367) [@andygrundman]
-----------------------------------------------------------------------