mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-12-26 11:22:33 -06:00
video_core: Catch vulkan clear op not all channel need clear
This commit is contained in:
parent
fa913a702f
commit
0ec1801bc1
1 changed files with 13 additions and 8 deletions
|
@ -305,14 +305,19 @@ void RasterizerVulkan::Clear() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
scheduler.Record([color_attachment, clear_value, clear_rect](vk::CommandBuffer cmdbuf) {
|
if (regs.clear_surface.R && regs.clear_surface.G && regs.clear_surface.B &&
|
||||||
const VkClearAttachment attachment{
|
regs.clear_surface.A) {
|
||||||
.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT,
|
scheduler.Record([color_attachment, clear_value, clear_rect](vk::CommandBuffer cmdbuf) {
|
||||||
.colorAttachment = color_attachment,
|
const VkClearAttachment attachment{
|
||||||
.clearValue = clear_value,
|
.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT,
|
||||||
};
|
.colorAttachment = color_attachment,
|
||||||
cmdbuf.ClearAttachments(attachment, clear_rect);
|
.clearValue = clear_value,
|
||||||
});
|
};
|
||||||
|
cmdbuf.ClearAttachments(attachment, clear_rect);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
UNIMPLEMENTED_MSG("Unimplemented Clear only the specified channel");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!use_depth && !use_stencil) {
|
if (!use_depth && !use_stencil) {
|
||||||
|
|
Loading…
Reference in a new issue