Skip to content

Commit

Permalink
[d3d8] Properly cache depth stencil buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
AlpyneDreams committed Jul 7, 2024
1 parent 622a18c commit 1dddc17
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/d3d8/d3d8_device.h
Original file line number Diff line number Diff line change
Expand Up @@ -368,9 +368,8 @@ namespace dxvk {
if (pRenderTarget != NULL) {
D3D8Surface* surf = static_cast<D3D8Surface*>(pRenderTarget);
res = GetD3D9()->SetRenderTarget(0, surf->GetD3D9());

if (FAILED(res))
return res;

if (FAILED(res)) return res;

m_renderTarget = ref(surf);
}
Expand All @@ -379,6 +378,9 @@ namespace dxvk {
D3D8Surface* zStencil = static_cast<D3D8Surface*>(pNewZStencil);
res = GetD3D9()->SetDepthStencilSurface(D3D8Surface::GetD3D9Nullable(zStencil));

if (FAILED(res)) return res;

m_depthStencil = ref(zStencil);
return res;
}

Expand Down

0 comments on commit 1dddc17

Please sign in to comment.