2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

Merge pull request #9127 from vonchenplus/vulkan_clear

video_core: Catch vulkan clear op not all channel need clear
This commit is contained in:
bunnei 2022-10-27 19:19:40 -07:00 committed by GitHub
commit 84d15c7f47
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -305,6 +305,8 @@ void RasterizerVulkan::Clear() {
}
}
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,
@ -313,6 +315,9 @@ void RasterizerVulkan::Clear() {
};
cmdbuf.ClearAttachments(attachment, clear_rect);
});
} else {
UNIMPLEMENTED_MSG("Unimplemented Clear only the specified channel");
}
}
if (!use_depth && !use_stencil) {