summaryrefslogtreecommitdiffstats
path: root/src/vksetup.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/vksetup.h')
-rw-r--r--src/vksetup.h11
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 */