1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-21 22:54:16 +01:00

[d3d8] Always forward SetRenderTarget calls to D3D9

This commit is contained in:
WinterSnowfall 2024-10-05 21:44:12 +03:00 committed by Philip Rebohle
parent 8c54969552
commit 66bd9ec4dd

View File

@ -887,14 +887,15 @@ namespace dxvk {
if (pRenderTarget != nullptr) { if (pRenderTarget != nullptr) {
D3D8Surface* surf = static_cast<D3D8Surface*>(pRenderTarget); D3D8Surface* surf = static_cast<D3D8Surface*>(pRenderTarget);
if (likely(m_renderTarget != surf)) { // This will always be a state change and needs to be forwarded to
StateChange(); // D3D9, even when the same render target is set, as the viewport
res = GetD3D9()->SetRenderTarget(0, D3D8Surface::GetD3D9Nullable(surf)); // needs to be readjusted and reset.
StateChange();
res = GetD3D9()->SetRenderTarget(0, D3D8Surface::GetD3D9Nullable(surf));
if (unlikely(FAILED(res))) return res; if (unlikely(FAILED(res))) return res;
m_renderTarget = surf; m_renderTarget = surf;
}
} }
// SetDepthStencilSurface is a separate call // SetDepthStencilSurface is a separate call