diff options
author | grm <grm@eyesin.space> | 2025-01-03 02:14:17 +0200 |
---|---|---|
committer | grm <grm@eyesin.space> | 2025-01-03 02:14:17 +0200 |
commit | 67eec36945ed1706f23d0fe6d3017a09516dc42b (patch) | |
tree | f1cb425c31aee5d30a813a6fdf6e0df82394c9d5 /src/vksetup.h | |
parent | bbcc41762f335e90dc850dd9d4a6cc5e51631c7c (diff) | |
download | cgame-67eec36945ed1706f23d0fe6d3017a09516dc42b.tar.gz cgame-67eec36945ed1706f23d0fe6d3017a09516dc42b.tar.bz2 cgame-67eec36945ed1706f23d0fe6d3017a09516dc42b.zip |
Diffstat (limited to 'src/vksetup.h')
-rw-r--r-- | src/vksetup.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/vksetup.h b/src/vksetup.h index daa9148..923083b 100644 --- a/src/vksetup.h +++ b/src/vksetup.h @@ -213,8 +213,8 @@ typedef struct vks_frame_data { VkDescriptorSet vk_descriptor_set; /* compute stuff */ - /* VkDescriptorSet vk_compute_descriptor_set; */ - /* vks_buffer shader_storage_buffer; */ + VkDescriptorSet vk_compute_descriptor_set; + vks_buffer shader_storage_buffer; } vks_frame_data; /* Info structs */ @@ -1335,7 +1335,12 @@ vks_create_buffer(const vks_context vk, allocInfo.usage = VMA_MEMORY_USAGE_AUTO; allocInfo.flags = VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT; - vmaCreateBuffer(vk.allocator, &bufferInfo, &allocInfo, &buffer->handle, &buffer->allocation, NULL); + VK_CHECK(vmaCreateBuffer(vk.allocator, &bufferInfo, &allocInfo, &buffer->handle, &buffer->allocation, NULL)); + + VmaAllocationInfo info = {0}; + + vmaGetAllocationInfo(vk.allocator, buffer->allocation, &info); + buffer->memory = info.deviceMemory; } #endif /* VKSETUP_IMPLEMENTATION */ |