-
Notifications
You must be signed in to change notification settings - Fork 477
Open
Description
On my system (Apple M1 Pro, macOS 26.3, Vulkan SDK 1.4.341.1), I encounter a crash when using a buffer allocated for VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT in combination with indirect draw or dispatch calls.
Steps to reproduce:
- Create a buffer with VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT and retrieve its device address.
- Use vkCmdDrawIndirect or vkCmdDispatchIndirect to read data from this buffer in the shader via device address intrinsics.
- Submit the command buffer.
Observed behavior:
Immediately after the indirect draw/dispatch, MoltenVK reports:
[mvk-error] VK_ERROR_OUT_OF_DEVICE_MEMORY: Lost VkDevice after MTLCommandBuffer "vkQueuePresentKHR MTLCommandBuffer on Queue 0-0" execution failed (code 9): Invalid Resource (00000009:kIOGPUCommandBufferCallbackErrorInvalidResource)
The crash does not occur if I:
- Use direct draw/dispatch (no indirect), or
- Wait for a few frames after buffer creation before issuing indirect calls.
Notes:
- Reading the buffer via device address in a regular (non-indirect) draw or dispatch works correctly.
- The issue appears specific to indirect calls combined with device address reads.
Expected behavior:
It should be possible to read from a device address buffer in an indirect draw/dispatch without crashing, similar to how it works in direct draws/dispatches.
Environment:
- GPU: Apple M1 Pro
- OS: macOS 26.3
- Vulkan SDK: 1.4.341.1 (and 1.4.313.1)
- MoltenVK version: shipped with the Vulkan SDK
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels