1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-20 19:54:19 +01:00

[dxvk] Use VK_IMAGE_LAYOUT_GENERAL for all render targets

This is a workaround for rendering issues in some games where render
targets get seemingly randomly cleared for unknown reasons. Fixes
Homefront.
This commit is contained in:
Philip Rebohle 2018-01-23 13:27:41 +01:00
parent 2c20bf4dcb
commit 21e9173415
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -78,8 +78,10 @@ namespace dxvk {
desc.initialLayout = depthFmt.initialLayout;
desc.finalLayout = depthFmt.finalLayout;
// TODO Using GENERAL is a workaround for bugs in either dxvk or
// RADV. Revert to VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL.
depthRef.attachment = attachments.size();
depthRef.layout = VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL;
depthRef.layout = VK_IMAGE_LAYOUT_GENERAL;
attachments.push_back(desc);
}
@ -102,8 +104,10 @@ namespace dxvk {
desc.initialLayout = colorFmt.initialLayout;
desc.finalLayout = colorFmt.finalLayout;
// TODO Using GENERAL is a workaround for bugs in either dxvk
// or RADV. Revert to VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL.
colorRef[i].attachment = attachments.size();
colorRef[i].layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
colorRef[i].layout = VK_IMAGE_LAYOUT_GENERAL;
attachments.push_back(desc);
}