diff options
| author | Tauwni <102470988+Tauwni@users.noreply.github.com> | 2026-11-26 12:19:12 +0100 |
|---|---|---|
| committer | Tauwni <102470988+Tauwni@users.noreply.github.com> | 2026-11-26 12:19:12 +0100 |
| commit | beffaa9a476ca1b3dfd9cfa55e39eafbb1f5eec6 (patch) | |
| tree | 32877805bf4eb46d9a89d5753db6b5a2b06dc845 /runtime/src/vulkan_scratch.h | |
| parent | f29ca7bacae9507f83e8c56abdb604bd4efb4cf1 (diff) | |
| parent | a73a57e1339be072baf5522351c8ec7f1482b56b (diff) | |
Merge main into fix/null-descriptor-generated-dir
Diffstat (limited to 'runtime/src/vulkan_scratch.h')
| -rw-r--r-- | runtime/src/vulkan_scratch.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/runtime/src/vulkan_scratch.h b/runtime/src/vulkan_scratch.h index 3e6a8eab8..958f27ca5 100644 --- a/runtime/src/vulkan_scratch.h +++ b/runtime/src/vulkan_scratch.h | |||
| @@ -44,10 +44,13 @@ public: | |||
| 44 | 44 | ||
| 45 | // `usage` is what the chunks are created with. A chunk that declares VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT | 45 | // `usage` is what the chunks are created with. A chunk that declares VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT |
| 46 | // gets its device address from get() as well, and its memory must have been allocated with | 46 | // gets its device address from get() as well, and its memory must have been allocated with |
| 47 | // VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT (the allocate callback's job). | 47 | // VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT (the allocate callback's job). `families` keeps retired chunks shareable |
| 48 | // across queue families (graphics + async compute). | ||
| 48 | ScratchBuffers(PFN_vkGetDeviceProcAddr get, VkDevice device, Allocate allocate, | 49 | ScratchBuffers(PFN_vkGetDeviceProcAddr get, VkDevice device, Allocate allocate, |
| 49 | DeviceFaultDiagnostics* diagnostics, VkBufferUsageFlags usage) | 50 | DeviceFaultDiagnostics* diagnostics, VkBufferUsageFlags usage, |
| 51 | std::vector<std::uint32_t> families = {}) | ||
| 50 | : device_(device), diagnostics_(diagnostics), allocate_(std::move(allocate)), usage_(usage), | 52 | : device_(device), diagnostics_(diagnostics), allocate_(std::move(allocate)), usage_(usage), |
| 53 | families_(std::move(families)), | ||
| 51 | addressable_((usage & VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT) != 0) { | 54 | addressable_((usage & VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT) != 0) { |
| 52 | loaded_ = vk_.load(get, device, addressable_); | 55 | loaded_ = vk_.load(get, device, addressable_); |
| 53 | } | 56 | } |