Files
test/source/blender/gpu
Jason Fielder 4fc2e1c842 Fix #129661: Wait for GPU to complete to avoid use-after-free issues.
In some cases the MTLContext was being destroyed before all GPU work was completed causing the (outstanding) command buffer completion event handler to update a command buffer that had already been freed. This behaviour was introduced by [this](https://projects.blender.org/blender/blender/commit/6da42e9c951b) change which updated the event handler to track the number of outstanding command buffers per context as well as system-wide.

Reproduced the issue with ASAN enabled and confirmed that waiting for the GPU to complete fixes the issue.

Also contains a minor fix for unitiiliased values in MTLAttachments identified by ASAN.

Authored by Apple: James McCarthy"

Co-authored-by: James McCarthy <jamesmccarthy@apple.com>
Pull Request: https://projects.blender.org/blender/blender/pulls/129686
2024-11-12 16:48:43 +01:00
..
2024-09-11 18:37:42 +02:00
2024-08-03 11:06:17 +02:00