diff options
author | bunnei <bunneidev@gmail.com> | 2022-10-28 04:19:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-28 04:19:40 +0200 |
commit | 84d15c7f4724b50ea653196b8350e7603b3a7024 (patch) | |
tree | 917fe6a5b6ac84116ab438a7b6fdea84f6fc6bd9 /src/video_core | |
parent | Merge pull request #9138 from liamwhite/hbl-stacktrace (diff) | |
parent | video_core: Catch vulkan clear op not all channel need clear (diff) | |
download | yuzu-84d15c7f4724b50ea653196b8350e7603b3a7024.tar yuzu-84d15c7f4724b50ea653196b8350e7603b3a7024.tar.gz yuzu-84d15c7f4724b50ea653196b8350e7603b3a7024.tar.bz2 yuzu-84d15c7f4724b50ea653196b8350e7603b3a7024.tar.lz yuzu-84d15c7f4724b50ea653196b8350e7603b3a7024.tar.xz yuzu-84d15c7f4724b50ea653196b8350e7603b3a7024.tar.zst yuzu-84d15c7f4724b50ea653196b8350e7603b3a7024.zip |
Diffstat (limited to 'src/video_core')
-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) { |