mirror of
https://github.com/azahar-emu/azahar.git
synced 2026-06-07 19:23:39 -04:00
renderer_vulkan: Fix multisample ClearTextureWithRenderpass
Ensure that the multisample framebuffer is used rather than the usual one when using a render pass to clear the textures. That way, a MSAA-render AND resolve is used to clear the textures at the same time.
This commit is contained in:
parent
ac77eddba0
commit
c010d05d26
1 changed files with 5 additions and 2 deletions
|
|
@ -425,8 +425,11 @@ void TextureRuntime::ClearTextureWithRenderpass(Surface& surface,
|
|||
.src_image = surface.Image(),
|
||||
};
|
||||
|
||||
scheduler.Record([params, is_color, clear, render_pass,
|
||||
framebuffer = surface.Framebuffer()](vk::CommandBuffer cmdbuf) {
|
||||
// Ensure we get the MSAA framebuffer if we are are doing an MSAA texture
|
||||
const vk::Framebuffer framebuffer =
|
||||
surface.Framebuffer((surface.GetSampleCount() > 1) ? Type::MultiSampled : Type::Current);
|
||||
|
||||
scheduler.Record([params, is_color, clear, render_pass, framebuffer](vk::CommandBuffer cmdbuf) {
|
||||
const vk::AccessFlags access_flag =
|
||||
is_color ? vk::AccessFlagBits::eColorAttachmentRead |
|
||||
vk::AccessFlagBits::eColorAttachmentWrite
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue