2021-01-10 16:24:15 +00:00
|
|
|
#ifndef __QF_Vulkan_barrier_h
|
|
|
|
#define __QF_Vulkan_barrier_h
|
|
|
|
|
|
|
|
typedef struct {
|
2021-04-24 03:42:29 +00:00
|
|
|
VkPipelineStageFlags srcStages;
|
|
|
|
VkPipelineStageFlags dstStages;
|
|
|
|
VkImageMemoryBarrier barrier;
|
|
|
|
} qfv_imagebarrier_t;
|
2021-01-10 16:24:15 +00:00
|
|
|
|
2021-04-24 06:47:31 +00:00
|
|
|
typedef struct {
|
|
|
|
VkPipelineStageFlags srcStages;
|
|
|
|
VkPipelineStageFlags dstStages;
|
|
|
|
VkBufferMemoryBarrier barrier;
|
|
|
|
} qfv_bufferbarrier_t;
|
|
|
|
|
2021-12-16 13:53:19 +00:00
|
|
|
// image layout transitions
|
2021-01-10 16:24:15 +00:00
|
|
|
enum {
|
|
|
|
qfv_LT_Undefined_to_TransferDst,
|
2021-04-24 03:42:29 +00:00
|
|
|
qfv_LT_TransferDst_to_TransferSrc,
|
2021-01-10 16:24:15 +00:00
|
|
|
qfv_LT_TransferDst_to_ShaderReadOnly,
|
2021-04-24 03:42:29 +00:00
|
|
|
qfv_LT_TransferSrc_to_ShaderReadOnly,
|
2021-01-21 08:13:17 +00:00
|
|
|
qfv_LT_ShaderReadOnly_to_TransferDst,
|
2021-01-10 16:24:15 +00:00
|
|
|
qfv_LT_Undefined_to_DepthStencil,
|
|
|
|
qfv_LT_Undefined_to_Color,
|
|
|
|
};
|
|
|
|
|
2021-12-16 13:53:19 +00:00
|
|
|
// buffer barriers
|
2021-04-24 06:47:31 +00:00
|
|
|
enum {
|
|
|
|
qfv_BB_Unknown_to_TransferWrite,
|
|
|
|
qfv_BB_TransferWrite_to_VertexAttrRead,
|
|
|
|
qfv_BB_TransferWrite_to_IndexRead,
|
|
|
|
qfv_BB_TransferWrite_to_UniformRead,
|
|
|
|
};
|
|
|
|
|
2021-04-24 03:42:29 +00:00
|
|
|
extern const qfv_imagebarrier_t imageBarriers[];
|
2021-04-24 06:47:31 +00:00
|
|
|
extern const qfv_bufferbarrier_t bufferBarriers[];
|
2021-01-10 16:24:15 +00:00
|
|
|
|
|
|
|
#endif//__QF_Vulkan_barrier_h
|