From 288a9dd547cfa80a203a1fd5865d42c10abdc445 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Wed, 18 Dec 2019 22:48:15 +0000 Subject: [PATCH] [d3d9] Avoid rebinding viewports if the same one is re-set --- src/d3d9/d3d9_device.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/d3d9/d3d9_device.cpp b/src/d3d9/d3d9_device.cpp index 93ec575b8..ed38713d4 100644 --- a/src/d3d9/d3d9_device.cpp +++ b/src/d3d9/d3d9_device.cpp @@ -1477,6 +1477,9 @@ namespace dxvk { if (unlikely(ShouldRecord())) return m_recorder->SetViewport(&viewport); + if (m_state.viewport == viewport) + return D3D_OK; + m_state.viewport = viewport; m_flags.set(D3D9DeviceFlag::DirtyViewportScissor);