18#ifndef INCLUDED_RENDERER_BACKEND_VULKAN_UTILITIES
19#define INCLUDED_RENDERER_BACKEND_VULKAN_UTILITIES
23#include <glad/vulkan.h>
25#define ENSURE_VK_SUCCESS(EXPR) \
28 const VkResult result = (EXPR); \
29 if (result != VK_SUCCESS) \
31 LOGERROR(#EXPR " returned %d (%s) instead of VK_SUCCESS", static_cast<int>(result), Utilities::GetVkResultName(result)); \
32 ENSURE(false && #EXPR); \
54 VkCommandBuffer commandBuffer,
CTexture* texture,
55 const VkImageLayout oldLayout,
const VkImageLayout newLayout,
56 const VkAccessFlags srcAccessMask,
const VkAccessFlags dstAccessMask,
57 const VkPipelineStageFlags srcStageMask,
const VkPipelineStageFlags dstStageMask);
60 VkCommandBuffer commandBuffer, VkImage image,
const uint32_t level,
const uint32_t layer,
61 const VkAccessFlags srcAccessMask,
const VkAccessFlags dstAccessMask,
62 const VkImageLayout oldLayout,
const VkImageLayout newLayout,
63 const VkPipelineStageFlags srcStageMask,
const VkPipelineStageFlags dstStageMask,
64 const VkImageAspectFlags aspectMask = VK_IMAGE_ASPECT_COLOR_BIT);
67 VkCommandBuffer commandBuffer, CBuffer* buffer,
68 const VkDeviceSize offset,
const VkDeviceSize size,
69 const VkAccessFlags srcAccessMask,
const VkAccessFlags dstAccessMask,
70 const VkPipelineStageFlags srcStageMask,
const VkPipelineStageFlags dstStageMask);
73 VkCommandBuffer commandBuffer,
74 const VkAccessFlags srcAccessMask,
const VkAccessFlags dstAccessMask,
75 const VkPipelineStageFlags srcStageMask,
const VkPipelineStageFlags dstStageMask);
78 VkCommandBuffer commandBuffer,
79 const VkPipelineStageFlags srcStageMask,
const VkPipelineStageFlags dstStageMask);
Represents a texture object.
Definition: TextureManager.h:262
void SubmitImageMemoryBarrier(VkCommandBuffer commandBuffer, VkImage image, const uint32_t level, const uint32_t layer, const VkAccessFlags srcAccessMask, const VkAccessFlags dstAccessMask, const VkImageLayout oldLayout, const VkImageLayout newLayout, const VkPipelineStageFlags srcStageMask, const VkPipelineStageFlags dstStageMask, const VkImageAspectFlags aspectMask)
Definition: Utilities.cpp:70
void SubmitDebugSyncMemoryBarrier(VkCommandBuffer commandBuffer)
Definition: Utilities.cpp:141
void SubmitMemoryBarrier(VkCommandBuffer commandBuffer, const VkAccessFlags srcAccessMask, const VkAccessFlags dstAccessMask, const VkPipelineStageFlags srcStageMask, const VkPipelineStageFlags dstStageMask)
Definition: Utilities.cpp:118
void SubmitBufferMemoryBarrier(VkCommandBuffer commandBuffer, CBuffer *buffer, const VkDeviceSize offset, const VkDeviceSize size, const VkAccessFlags srcAccessMask, const VkAccessFlags dstAccessMask, const VkPipelineStageFlags srcStageMask, const VkPipelineStageFlags dstStageMask)
Definition: Utilities.cpp:97
void SubmitPipelineBarrier(VkCommandBuffer commandBuffer, const VkPipelineStageFlags srcStageMask, const VkPipelineStageFlags dstStageMask)
Definition: Utilities.cpp:132
void SetTextureLayout(VkCommandBuffer commandBuffer, CTexture *texture, const VkImageLayout oldLayout, const VkImageLayout newLayout, const VkAccessFlags srcAccessMask, const VkAccessFlags dstAccessMask, const VkPipelineStageFlags srcStageMask, const VkPipelineStageFlags dstStageMask)
Definition: Utilities.cpp:39
const char * GetVkResultName(const VkResult result)
Definition: Utilities.cpp:164
Backend
Definition: Backend.h:28
Definition: VideoMode.h:29
unsigned int uint32_t
Definition: wposix_types.h:53