1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-11-29 19:24:10 +01:00

[dxvk] Fix uninitialized depth attachment reference

Also don't redundantly null color attachment refs for cosmetic reasons.
This commit is contained in:
Philip Rebohle 2019-10-26 23:37:46 +02:00
parent 6888a98c89
commit 9361f19da6
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -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;