summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFengChen <vonchenplus@gmail.com>2022-10-25 16:39:29 +0200
committerFengChen <vonchenplus@gmail.com>2022-10-25 16:39:29 +0200
commit0ec1801bc1e07e0630e9be55ef123294c8155b6a (patch)
treeeb9e2eba2db4d80960d011e5beab72b8667bd6c5
parentMerge pull request #9112 from vonchenplus/deferred_draw (diff)
downloadyuzu-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
-rw-r--r--src/video_core/renderer_vulkan/vk_rasterizer.cpp21
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) {