diff options
author | FengChen <vonchenplus@gmail.com> | 2022-10-25 16:39:29 +0200 |
---|---|---|
committer | FengChen <vonchenplus@gmail.com> | 2022-10-25 16:39:29 +0200 |
commit | 0ec1801bc1e07e0630e9be55ef123294c8155b6a (patch) | |
tree | eb9e2eba2db4d80960d011e5beab72b8667bd6c5 /src | |
parent | Merge pull request #9112 from vonchenplus/deferred_draw (diff) | |
download | yuzu-0ec1801bc1e07e0630e9be55ef123294c8155b6a.tar yuzu-0ec1801bc1e07e0630e9be55ef123294c8155b6a.tar.gz yuzu-0ec1801bc1e07e0630e9be55ef123294c8155b6a.tar.bz2 yuzu-0ec1801bc1e07e0630e9be55ef123294c8155b6a.tar.lz yuzu-0ec1801bc1e07e0630e9be55ef123294c8155b6a.tar.xz yuzu-0ec1801bc1e07e0630e9be55ef123294c8155b6a.tar.zst yuzu-0ec1801bc1e07e0630e9be55ef123294c8155b6a.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_rasterizer.cpp | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index 9f05a7a18..6ab68892c 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp @@ -305,14 +305,19 @@ void RasterizerVulkan::Clear() { } } - scheduler.Record([color_attachment, clear_value, clear_rect](vk::CommandBuffer cmdbuf) { - const VkClearAttachment attachment{ - .aspectMask = VK_IMAGE_ASPECT_COLOR_BIT, - .colorAttachment = color_attachment, - .clearValue = clear_value, - }; - cmdbuf.ClearAttachments(attachment, clear_rect); - }); + if (regs.clear_surface.R && regs.clear_surface.G && regs.clear_surface.B && + regs.clear_surface.A) { + scheduler.Record([color_attachment, clear_value, clear_rect](vk::CommandBuffer cmdbuf) { + const VkClearAttachment attachment{ + .aspectMask = VK_IMAGE_ASPECT_COLOR_BIT, + .colorAttachment = color_attachment, + .clearValue = clear_value, + }; + cmdbuf.ClearAttachments(attachment, clear_rect); + }); + } else { + UNIMPLEMENTED_MSG("Unimplemented Clear only the specified channel"); + } } if (!use_depth && !use_stencil) { |