summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-10-28 04:19:40 +0200
committerGitHub <noreply@github.com>2022-10-28 04:19:40 +0200
commit84d15c7f4724b50ea653196b8350e7603b3a7024 (patch)
tree917fe6a5b6ac84116ab438a7b6fdea84f6fc6bd9 /src
parentMerge pull request #9138 from liamwhite/hbl-stacktrace (diff)
parentvideo_core: Catch vulkan clear op not all channel need clear (diff)
downloadyuzu-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')
-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) {