diff options
| author | iwubcode <iwubcode@users.noreply.github.com> | 2017-09-29 00:31:08 -0500 |
|---|---|---|
| committer | iwubcode <iwubcode@users.noreply.github.com> | 2017-11-17 22:11:32 -0600 |
| commit | 4964fc87ae15600252cea8a07df5799e91c11875 (patch) | |
| tree | dfd067d59541079078dae594dcd2476db854a168 /Source/Core/VideoBackends/Vulkan | |
| parent | a129a53e56cdff93e2fd092fd56f3e0726408a60 (diff) | |
Video Backends: Remove the right of the xfb region for games where the
VI stride does not match the VI width
Diffstat (limited to 'Source/Core/VideoBackends/Vulkan')
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/Renderer.cpp | 9 | ||||
| -rw-r--r-- | Source/Core/VideoBackends/Vulkan/Renderer.h | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/Source/Core/VideoBackends/Vulkan/Renderer.cpp b/Source/Core/VideoBackends/Vulkan/Renderer.cpp index af0bfba451..d5d105ff6b 100644 --- a/Source/Core/VideoBackends/Vulkan/Renderer.cpp +++ b/Source/Core/VideoBackends/Vulkan/Renderer.cpp @@ -481,7 +481,7 @@ void Renderer::ReinterpretPixelData(unsigned int convtype) BindEFBToStateTracker(); } -void Renderer::SwapImpl(AbstractTexture* texture, const EFBRectangle& rc, u64 ticks, float Gamma) +void Renderer::SwapImpl(AbstractTexture* texture, const EFBRectangle& xfb_region, u64 ticks, float Gamma) { // Pending/batched EFB pokes should be included in the final image. FramebufferManager::GetInstance()->FlushEFBPokes(); @@ -504,7 +504,7 @@ void Renderer::SwapImpl(AbstractTexture* texture, const EFBRectangle& rc, u64 ti // Draw to the screen if we have a swap chain. if (m_swap_chain) { - DrawScreen(xfb_texture); + DrawScreen(xfb_texture, xfb_region); // Submit the current command buffer, signaling rendering finished semaphore when it's done // Because this final command buffer is rendering to the swap chain, we need to wait for @@ -552,7 +552,7 @@ void Renderer::SwapImpl(AbstractTexture* texture, const EFBRectangle& rc, u64 ti g_shader_cache->RetrieveAsyncShaders(); } -void Renderer::DrawScreen(VKTexture* xfb_texture) +void Renderer::DrawScreen(VKTexture* xfb_texture, const EFBRectangle& xfb_region) { VkResult res; if (!g_command_buffer_mgr->CheckLastPresentFail()) @@ -605,7 +605,8 @@ void Renderer::DrawScreen(VKTexture* xfb_texture) // Draw TargetRectangle source_rc = xfb_texture->GetConfig().GetRect(); - BlitScreen(m_swap_chain->GetRenderPass(), GetTargetRectangle(), source_rc, xfb_texture->GetRawTexIdentifier()); + BlitScreen(m_swap_chain->GetRenderPass(), GetTargetRectangle(), xfb_region, + xfb_texture->GetRawTexIdentifier()); // Draw OSD Util::SetViewportAndScissor(g_command_buffer_mgr->GetCurrentCommandBuffer(), 0, 0, diff --git a/Source/Core/VideoBackends/Vulkan/Renderer.h b/Source/Core/VideoBackends/Vulkan/Renderer.h index a94d44138b..2fbf240122 100644 --- a/Source/Core/VideoBackends/Vulkan/Renderer.h +++ b/Source/Core/VideoBackends/Vulkan/Renderer.h @@ -86,7 +86,7 @@ private: void DestroyShaders(); // Draw the frame, as well as the OSD to the swap chain. - void DrawScreen(VKTexture* xfb_texture); + void DrawScreen(VKTexture* xfb_texture, const EFBRectangle& xfb_region); // Copies/scales an image to the currently-bound framebuffer. void BlitScreen(VkRenderPass render_pass, const TargetRectangle& dst_rect, |
