diff options
| author | 2022-10-27 19:19:40 -0700 | |
|---|---|---|
| committer | 2022-10-27 19:19:40 -0700 | |
| commit | 84d15c7f4724b50ea653196b8350e7603b3a7024 (patch) | |
| tree | 917fe6a5b6ac84116ab438a7b6fdea84f6fc6bd9 /src | |
| 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.gz yuzu-84d15c7f4724b50ea653196b8350e7603b3a7024.tar.xz yuzu-84d15c7f4724b50ea653196b8350e7603b3a7024.zip | |
Merge pull request #9127 from vonchenplus/vulkan_clear
video_core: Catch vulkan clear op not all channel need clear
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() { | |||
| 305 | } | 305 | } |
| 306 | } | 306 | } |
| 307 | 307 | ||
| 308 | scheduler.Record([color_attachment, clear_value, clear_rect](vk::CommandBuffer cmdbuf) { | 308 | if (regs.clear_surface.R && regs.clear_surface.G && regs.clear_surface.B && |
| 309 | const VkClearAttachment attachment{ | 309 | regs.clear_surface.A) { |
| 310 | .aspectMask = VK_IMAGE_ASPECT_COLOR_BIT, | 310 | scheduler.Record([color_attachment, clear_value, clear_rect](vk::CommandBuffer cmdbuf) { |
| 311 | .colorAttachment = color_attachment, | 311 | const VkClearAttachment attachment{ |
| 312 | .clearValue = clear_value, | 312 | .aspectMask = VK_IMAGE_ASPECT_COLOR_BIT, |
| 313 | }; | 313 | .colorAttachment = color_attachment, |
| 314 | cmdbuf.ClearAttachments(attachment, clear_rect); | 314 | .clearValue = clear_value, |
| 315 | }); | 315 | }; |
| 316 | cmdbuf.ClearAttachments(attachment, clear_rect); | ||
| 317 | }); | ||
| 318 | } else { | ||
| 319 | UNIMPLEMENTED_MSG("Unimplemented Clear only the specified channel"); | ||
| 320 | } | ||
| 316 | } | 321 | } |
| 317 | 322 | ||
| 318 | if (!use_depth && !use_stencil) { | 323 | if (!use_depth && !use_stencil) { |