1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-14 04:29:15 +01:00

[dxvk] Handle discard aspects correctly when performing clears

Should fix an Nvidia driver crash, see #2118.
This commit is contained in:
Philip Rebohle 2021-06-24 17:13:53 +02:00
parent 8a93bbd8fa
commit 87d32a234d
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -1817,7 +1817,7 @@ namespace dxvk {
VkPipelineStageFlags clearStages = 0;
VkAccessFlags clearAccess = 0;
if (clearAspects & VK_IMAGE_ASPECT_COLOR_BIT) {
if ((clearAspects | discardAspects) & VK_IMAGE_ASPECT_COLOR_BIT) {
clearStages |= VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
clearAccess |= VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT;