diff options
| author | IlyassRS <ilyassroussi2000@gmail.com> | 2026-11-25 13:46:01 +0100 |
|---|---|---|
| committer | IlyassRS <ilyassroussi2000@gmail.com> | 2026-11-25 13:46:01 +0100 |
| commit | 9428f57da22a4693885a5671c61789ddd8bd664d (patch) | |
| tree | 3ec4d90ed8219986c4f34751ed45fb39f47e1a1e /runtime/src/thread_stacks.cpp | |
| parent | 0d80bc5df7c873f40965f34f185cb96913786765 (diff) | |
runtime: share indirect clamp buffers across queue families and fix safety bugs
Pass device queue families into IndirectArgumentClamp and its ScratchBuffers so both clamped-argument scratch chunks and HostArea counter buffers are created with VK_SHARING_MODE_CONCURRENT when graphics and async-compute families differ (matching enable_copy_scratch).
Also fix four safety/correctness issues in runtime/src/vulkan_indirect_clamp.h:
- Free VkDeviceMemory before retrying the next memory type when vkBindBufferMemory fails in make_area(), and guard vector push_back against allocation failure.
- Zero released HostArea counter words after reading them so a later aborted/unsubmitted batch reusing the same slot never double-counts prior counters.
- Reject non-4-byte-aligned argument_offset and count_offset in prepare() (the compute clamp reads uint32 words via BDA).
- Read areas_[slot.area].buffer under mutex_ in prepare().
Item ID: RT-INDIRECT-CLAMP-SHARING-AND-SAFETY
Claim: https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7162686562
Diffstat (limited to 'runtime/src/thread_stacks.cpp')
0 files changed, 0 insertions, 0 deletions