upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src/vulkan_scratch.h
diff options
context:
space:
mode:
authorTauwni <102470988+Tauwni@users.noreply.github.com>2026-11-26 12:19:12 +0100
committerTauwni <102470988+Tauwni@users.noreply.github.com>2026-11-26 12:19:12 +0100
commitbeffaa9a476ca1b3dfd9cfa55e39eafbb1f5eec6 (patch)
tree32877805bf4eb46d9a89d5753db6b5a2b06dc845 /runtime/src/vulkan_scratch.h
parentf29ca7bacae9507f83e8c56abdb604bd4efb4cf1 (diff)
parenta73a57e1339be072baf5522351c8ec7f1482b56b (diff)
Merge main into fix/null-descriptor-generated-dir
Diffstat (limited to 'runtime/src/vulkan_scratch.h')
-rw-r--r--runtime/src/vulkan_scratch.h7
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 }