GPU/HW: Clear host display texture on interlace switch

This commit is contained in:
Connor McLaughlin 2021-07-11 14:09:11 +10:00
parent 928b5694ed
commit c0352eb19f
3 changed files with 6 additions and 0 deletions

View file

@ -824,6 +824,8 @@ void GPU_HW_D3D11::ClearDisplay()
{
GPU_HW::ClearDisplay();
m_host_display->ClearDisplayTexture();
static constexpr std::array<float, 4> clear_color = {0.0f, 0.0f, 0.0f, 1.0f};
m_context->ClearRenderTargetView(m_display_texture.GetD3DRTV(), clear_color.data());
}

View file

@ -837,6 +837,8 @@ void GPU_HW_OpenGL::ClearDisplay()
{
GPU_HW::ClearDisplay();
m_host_display->ClearDisplayTexture();
m_display_texture.BindFramebuffer(GL_DRAW_FRAMEBUFFER);
glDisable(GL_SCISSOR_TEST);
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);

View file

@ -1298,6 +1298,8 @@ void GPU_HW_Vulkan::ClearDisplay()
GPU_HW::ClearDisplay();
EndRenderPass();
m_host_display->ClearDisplayTexture();
VkCommandBuffer cmdbuf = g_vulkan_context->GetCurrentCommandBuffer();
m_display_texture.TransitionToLayout(cmdbuf, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL);