aboutsummaryrefslogtreecommitdiffstats
path: root/include/vk-api.hpp
diff options
context:
space:
mode:
authorladevieq <ladevie.quentin@gmail.com>2021-03-04 20:48:29 +0100
committerladevieq <ladevie.quentin@gmail.com>2021-03-04 20:48:29 +0100
commit4460f6d85730cb630dda4be2ebe47fcf13478d58 (patch)
treeec8c851be638a72e0090c05b4468de39276e935e /include/vk-api.hpp
parent09dda7038ad78b5305169de7fdae74bdfe53eff6 (diff)
Attempt at synchronizing memory write
Diffstat (limited to 'include/vk-api.hpp')
-rw-r--r--include/vk-api.hpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/vk-api.hpp b/include/vk-api.hpp
index feefdd9..c113d6c 100644
--- a/include/vk-api.hpp
+++ b/include/vk-api.hpp
@@ -8,9 +8,9 @@
#include "vk-context.hpp"
struct Buffer {
- VmaAllocation alloc;
- VkBuffer handle;
- void* mapped_ptr;
+ VmaAllocation alloc;
+ VmaAllocationInfo alloc_info;
+ VkBuffer handle;
};
struct Pipeline {
@@ -24,10 +24,10 @@ struct Image {
VkImage handle;
VkImageView view;
VmaAllocation alloc;
+ VmaAllocationInfo alloc_info;
VkImageSubresourceRange subresource_range;
VkFormat format;
VkExtent3D size;
- void* mapped_ptr;
};
struct Swapchain {
@@ -46,11 +46,11 @@ class vkapi {
vkapi();
~vkapi();
- Buffer create_buffer(size_t data_size, VkBufferUsageFlags buffer_usage, VmaMemoryUsage mem_usage, void* ptr);
+ Buffer create_buffer(size_t data_size, VkBufferUsageFlags buffer_usage, VmaMemoryUsage mem_usage);
void destroy_buffer(Buffer& buffer);
- Image create_image(VkExtent3D size, VkFormat format, VkImageUsageFlags usages, void* ptr);
+ Image create_image(VkExtent3D size, VkFormat format, VkImageUsageFlags usages);
void destroy_image(Image &image);
std::vector<Image> create_images(VkExtent3D size, VkFormat format, VkImageUsageFlags usages, size_t image_count);
void destroy_images(std::vector<Image> &images);