mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-20 10:56:58 +02:00
Support layered PS5 image alias transitions
This commit is contained in:
@@ -19,32 +19,49 @@ struct DepthStencilVulkanImage;
|
||||
struct VulkanSwapchain;
|
||||
|
||||
struct BufferImageCopy {
|
||||
uint32_t offset;
|
||||
uint32_t pitch;
|
||||
uint32_t dst_level;
|
||||
uint32_t width;
|
||||
uint32_t height;
|
||||
uint32_t copy_height = 0;
|
||||
uint32_t dst_layer = 0;
|
||||
int dst_x;
|
||||
int dst_y;
|
||||
int dst_z = 0;
|
||||
uint32_t offset;
|
||||
uint32_t pitch;
|
||||
uint32_t dst_level;
|
||||
uint32_t width;
|
||||
uint32_t height;
|
||||
uint32_t copy_height = 0;
|
||||
uint32_t dst_layer = 0;
|
||||
int dst_x;
|
||||
int dst_y;
|
||||
int dst_z = 0;
|
||||
VkImageAspectFlags aspect = VK_IMAGE_ASPECT_COLOR_BIT;
|
||||
};
|
||||
|
||||
struct ImageBufferCopy {
|
||||
uint32_t offset;
|
||||
uint32_t pitch;
|
||||
uint32_t src_level;
|
||||
uint32_t width;
|
||||
uint32_t height;
|
||||
uint32_t copy_height = 0;
|
||||
uint32_t src_layer = 0;
|
||||
int src_x;
|
||||
int src_y;
|
||||
int src_z = 0;
|
||||
VkImageAspectFlags aspect = VK_IMAGE_ASPECT_COLOR_BIT;
|
||||
};
|
||||
|
||||
struct ImageImageCopy {
|
||||
VulkanImage* src_image;
|
||||
uint32_t src_level;
|
||||
uint32_t dst_level;
|
||||
uint32_t width;
|
||||
uint32_t height;
|
||||
uint32_t src_layer = 0;
|
||||
uint32_t dst_layer = 0;
|
||||
int src_x;
|
||||
int src_y;
|
||||
int src_z = 0;
|
||||
int dst_x;
|
||||
int dst_y;
|
||||
int dst_z = 0;
|
||||
VulkanImage* src_image;
|
||||
uint32_t src_level;
|
||||
uint32_t dst_level;
|
||||
uint32_t width;
|
||||
uint32_t height;
|
||||
uint32_t src_layer = 0;
|
||||
uint32_t dst_layer = 0;
|
||||
VkImageAspectFlags src_aspect = VK_IMAGE_ASPECT_COLOR_BIT;
|
||||
VkImageAspectFlags dst_aspect = VK_IMAGE_ASPECT_COLOR_BIT;
|
||||
int src_x;
|
||||
int src_y;
|
||||
int src_z = 0;
|
||||
int dst_x;
|
||||
int dst_y;
|
||||
int dst_z = 0;
|
||||
};
|
||||
|
||||
enum class StagingBufferType { Texture, Vertex, ReadBack };
|
||||
@@ -79,6 +96,9 @@ void UtilFillImage(GraphicContext* ctx, std::span<const ImageImageCopy> regions,
|
||||
void UtilFillBuffer(GraphicContext* ctx, void* dst_data, uint64_t size, uint32_t dst_pitch,
|
||||
VulkanImage* src_image, uint64_t src_layout,
|
||||
VkImageAspectFlags aspect = VK_IMAGE_ASPECT_COLOR_BIT);
|
||||
void UtilFillBuffer(GraphicContext* ctx, void* dst_data, uint64_t size,
|
||||
std::span<const ImageBufferCopy> regions, VulkanImage* src_image,
|
||||
uint64_t src_layout);
|
||||
void UtilUploadBuffer(GraphicContext* ctx, StagingBufferType type, VulkanBuffer* dst_buffer,
|
||||
uint64_t dst_offset, const void* src_data, uint64_t size);
|
||||
void UtilCopyBuffer(VulkanBuffer* src_buffer, VulkanBuffer* dst_buffer, uint64_t size);
|
||||
|
||||
Reference in New Issue
Block a user