Changing render attachment sharing
This commit is contained in:
@@ -19,7 +19,7 @@ Framebuffer::Framebuffer(PGraphics graphics, PRenderPass renderPass, Gfx::Render
|
||||
uint32 height = 0;
|
||||
for (auto inputAttachment : layout.inputAttachments)
|
||||
{
|
||||
PTexture2D vkInputAttachment = inputAttachment->getTexture().cast<Texture2D>();
|
||||
PTexture2D vkInputAttachment = inputAttachment.getTexture().cast<Texture2D>();
|
||||
attachments.add(vkInputAttachment->getView());
|
||||
description.inputAttachments[description.numInputAttachments++] = vkInputAttachment->getView();
|
||||
width = std::max(width, vkInputAttachment->getWidth());
|
||||
@@ -27,7 +27,7 @@ Framebuffer::Framebuffer(PGraphics graphics, PRenderPass renderPass, Gfx::Render
|
||||
}
|
||||
for (auto colorAttachment : layout.colorAttachments)
|
||||
{
|
||||
PTexture2D vkColorAttachment = colorAttachment->getTexture().cast<Texture2D>();
|
||||
PTexture2D vkColorAttachment = colorAttachment.getTexture().cast<Texture2D>();
|
||||
attachments.add(vkColorAttachment->getView());
|
||||
description.colorAttachments[description.numColorAttachments++] = vkColorAttachment->getView();
|
||||
width = std::max(width, vkColorAttachment->getWidth());
|
||||
@@ -35,23 +35,23 @@ Framebuffer::Framebuffer(PGraphics graphics, PRenderPass renderPass, Gfx::Render
|
||||
}
|
||||
for (auto resolveAttachment : layout.resolveAttachments)
|
||||
{
|
||||
PTexture2D vkResolveAttachment = resolveAttachment->getTexture().cast<Texture2D>();
|
||||
PTexture2D vkResolveAttachment = resolveAttachment.getTexture().cast<Texture2D>();
|
||||
attachments.add(vkResolveAttachment->getView());
|
||||
description.resolveAttachments[description.numResolveAttachments++] = vkResolveAttachment->getView();
|
||||
width = std::max(width, vkResolveAttachment->getWidth());
|
||||
height = std::max(height, vkResolveAttachment->getHeight());
|
||||
}
|
||||
if (layout.depthAttachment != nullptr)
|
||||
if (layout.depthAttachment.getTexture() != nullptr)
|
||||
{
|
||||
PTexture2D vkDepthAttachment = layout.depthAttachment->getTexture().cast<Texture2D>();
|
||||
PTexture2D vkDepthAttachment = layout.depthAttachment.getTexture().cast<Texture2D>();
|
||||
attachments.add(vkDepthAttachment->getView());
|
||||
description.depthAttachment = vkDepthAttachment->getView();
|
||||
width = std::max(width, vkDepthAttachment->getWidth());
|
||||
height = std::max(height, vkDepthAttachment->getHeight());
|
||||
}
|
||||
if (layout.depthResolveAttachment != nullptr)
|
||||
if (layout.depthResolveAttachment.getTexture() != nullptr)
|
||||
{
|
||||
PTexture2D vkDepthAttachment = layout.depthResolveAttachment->getTexture().cast<Texture2D>();
|
||||
PTexture2D vkDepthAttachment = layout.depthResolveAttachment.getTexture().cast<Texture2D>();
|
||||
attachments.add(vkDepthAttachment->getView());
|
||||
description.depthResolveAttachment = vkDepthAttachment->getView();
|
||||
width = std::max(width, vkDepthAttachment->getWidth());
|
||||
|
||||
Reference in New Issue
Block a user