2020-02-10 06:07:35 +00:00
|
|
|
#ifndef __QF_Vulkan_buffer_h
|
|
|
|
#define __QF_Vulkan_buffer_h
|
|
|
|
|
2020-02-17 11:29:35 +00:00
|
|
|
#include "QF/darray.h"
|
2020-02-10 06:07:35 +00:00
|
|
|
|
|
|
|
typedef struct qfv_buffertransition_s {
|
2020-02-17 11:29:35 +00:00
|
|
|
VkBuffer buffer;
|
2020-02-10 06:07:35 +00:00
|
|
|
VkAccessFlags srcAccess;
|
|
|
|
VkAccessFlags dstAccess;
|
2020-02-17 11:29:35 +00:00
|
|
|
uint32_t srcQueueFamily;
|
|
|
|
uint32_t dstQueueFamily;
|
2020-02-10 09:17:58 +00:00
|
|
|
VkDeviceSize offset;
|
|
|
|
VkDeviceSize size;
|
2020-02-17 11:29:35 +00:00
|
|
|
} qfv_buffertransition_t;
|
|
|
|
|
|
|
|
typedef struct qfv_buffertransitionset_s
|
|
|
|
DARRAY_TYPE (qfv_buffertransition_t) qfv_buffertransitionset_t;
|
|
|
|
typedef struct qfv_bufferbarrierset_s
|
|
|
|
DARRAY_TYPE (VkBufferMemoryBarrier) qfv_bufferbarrierset_t;
|
2020-02-10 09:17:58 +00:00
|
|
|
|
2020-02-10 06:07:35 +00:00
|
|
|
struct qfv_device_s;
|
2020-02-17 11:29:35 +00:00
|
|
|
VkBuffer QFV_CreateBuffer (struct qfv_device_s *device,
|
|
|
|
VkDeviceSize size,
|
|
|
|
VkBufferUsageFlags usage);
|
2020-02-10 06:07:35 +00:00
|
|
|
|
2020-02-17 11:29:35 +00:00
|
|
|
VkDeviceMemory QFV_AllocBufferMemory (struct qfv_device_s *device,
|
|
|
|
VkBuffer buffer,
|
|
|
|
VkMemoryPropertyFlags properties,
|
|
|
|
VkDeviceSize size, VkDeviceSize offset);
|
2020-02-10 06:07:35 +00:00
|
|
|
|
2020-02-17 11:29:35 +00:00
|
|
|
int QFV_BindBufferMemory (struct qfv_device_s *device,
|
|
|
|
VkBuffer buffer, VkDeviceMemory object,
|
2020-02-10 06:07:35 +00:00
|
|
|
VkDeviceSize offset);
|
|
|
|
|
|
|
|
qfv_bufferbarrierset_t *
|
2020-02-17 11:29:35 +00:00
|
|
|
QFV_CreateBufferTransitions (qfv_buffertransition_t *transitions,
|
|
|
|
int numTransitions);
|
2020-02-11 00:37:04 +00:00
|
|
|
|
2020-02-17 11:29:35 +00:00
|
|
|
VkBufferView QFV_CreateBufferView (struct qfv_device_s *device,
|
|
|
|
VkBuffer buffer, VkFormat format,
|
|
|
|
VkDeviceSize offset, VkDeviceSize size);
|
2020-02-11 00:37:04 +00:00
|
|
|
|
2020-02-10 06:07:35 +00:00
|
|
|
#endif//__QF_Vulkan_buffer_h
|