mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
vulkan: use subpass dependencies for layout transitions when switching canvases.
This commit is contained in:
@@ -49,12 +49,14 @@ namespace vulkan
|
||||
struct ColorAttachment
|
||||
{
|
||||
VkFormat format = VK_FORMAT_UNDEFINED;
|
||||
VkImageLayout layout = VK_IMAGE_LAYOUT_UNDEFINED;
|
||||
VkAttachmentLoadOp loadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
|
||||
VkSampleCountFlagBits msaaSamples = VK_SAMPLE_COUNT_1_BIT;
|
||||
|
||||
bool operator==(const ColorAttachment &attachment) const
|
||||
{
|
||||
return format == attachment.format &&
|
||||
return format == attachment.format &&
|
||||
layout == attachment.layout &&
|
||||
loadOp == attachment.loadOp &&
|
||||
msaaSamples == attachment.msaaSamples;
|
||||
}
|
||||
@@ -63,6 +65,7 @@ struct ColorAttachment
|
||||
struct DepthStencilAttachment
|
||||
{
|
||||
VkFormat format = VK_FORMAT_UNDEFINED;
|
||||
VkImageLayout layout = VK_IMAGE_LAYOUT_UNDEFINED;
|
||||
VkAttachmentLoadOp depthLoadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
|
||||
VkAttachmentLoadOp stencilLoadOp = VK_ATTACHMENT_LOAD_OP_LOAD;
|
||||
VkSampleCountFlagBits msaaSamples = VK_SAMPLE_COUNT_1_BIT;
|
||||
@@ -70,6 +73,7 @@ struct DepthStencilAttachment
|
||||
bool operator==(const DepthStencilAttachment &attachment) const
|
||||
{
|
||||
return format == attachment.format &&
|
||||
layout == attachment.layout &&
|
||||
depthLoadOp == attachment.depthLoadOp &&
|
||||
stencilLoadOp == attachment.stencilLoadOp &&
|
||||
msaaSamples == attachment.msaaSamples;
|
||||
@@ -196,7 +200,6 @@ struct RenderpassState
|
||||
RenderPassConfiguration renderPassConfiguration{};
|
||||
FramebufferConfiguration framebufferConfiguration{};
|
||||
VkPipeline pipeline = VK_NULL_HANDLE;
|
||||
std::vector<std::tuple<VkImage, PixelFormat, bool, VkImageLayout, VkImageLayout, int, int>> transitionImages;
|
||||
uint32_t numColorAttachments = 0;
|
||||
uint64 packedColorAttachmentFormats = 0;
|
||||
float width = 0.0f;
|
||||
|
||||
Reference in New Issue
Block a user