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,7 +887,9 @@ namespace dxvk {
if (pRenderTarget != nullptr) {
D3D8Surface* surf = static_cast<D3D8Surface*>(pRenderTarget);
if (likely(m_renderTarget != surf)) {
// This will always be a state change and needs to be forwarded to
// D3D9, even when the same render target is set, as the viewport
// needs to be readjusted and reset.
StateChange();
res = GetD3D9()->SetRenderTarget(0, D3D8Surface::GetD3D9Nullable(surf));
@ -895,7 +897,6 @@ namespace dxvk {
m_renderTarget = surf;
}
}
// SetDepthStencilSurface is a separate call
D3D8Surface* zStencil = static_cast<D3D8Surface*>(pNewZStencil);