mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-02 01:24:11 +01:00
[dxvk] Fix uninitialized depth attachment reference
Also don't redundantly null color attachment refs for cosmetic reasons.
This commit is contained in:
parent
6888a98c89
commit
9361f19da6
@ -82,9 +82,6 @@ namespace dxvk {
|
||||
// Render passes may not require the previous
|
||||
// contents of the attachments to be preserved.
|
||||
for (uint32_t i = 0; i < MaxNumRenderTargets; i++) {
|
||||
colorRef[i].attachment = VK_ATTACHMENT_UNUSED;
|
||||
colorRef[i].layout = VK_IMAGE_LAYOUT_UNDEFINED;
|
||||
|
||||
if (m_format.color[i].format != VK_FORMAT_UNDEFINED) {
|
||||
VkAttachmentDescription desc;
|
||||
desc.flags = 0;
|
||||
@ -101,6 +98,9 @@ namespace dxvk {
|
||||
colorRef[i].layout = m_format.color[i].layout;
|
||||
|
||||
attachments.push_back(desc);
|
||||
} else {
|
||||
colorRef[i].attachment = VK_ATTACHMENT_UNUSED;
|
||||
colorRef[i].layout = VK_IMAGE_LAYOUT_UNDEFINED;
|
||||
}
|
||||
}
|
||||
|
||||
@ -120,6 +120,9 @@ namespace dxvk {
|
||||
depthRef.layout = m_format.depth.layout;
|
||||
|
||||
attachments.push_back(desc);
|
||||
} else {
|
||||
depthRef.attachment = VK_ATTACHMENT_UNUSED;
|
||||
depthRef.layout = VK_IMAGE_LAYOUT_UNDEFINED;
|
||||
}
|
||||
|
||||
VkSubpassDescription subpass;
|
||||
|
Loading…
Reference in New Issue
Block a user