summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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() {
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) {