Skip to content

Commit 10efe46

Browse files
committed
Fix double ShaderResourceView creation for some cases in R3 and R4.
1 parent 7ee472f commit 10efe46

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Layers/xrRenderDX10/dx10SH_Texture.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,10 +547,11 @@ void CTexture::Load()
547547
// pSurface->SetPriority (PRIORITY_NORMAL);
548548
flags.MemoryUsage = mem;
549549
}
550+
551+
if (pSurface && bCreateView)
552+
CHK_DX(HW.pDevice->CreateShaderResourceView(pSurface, NULL, &m_pSRView));
550553
}
551554

552-
if (pSurface && bCreateView)
553-
CHK_DX(HW.pDevice->CreateShaderResourceView(pSurface, NULL, &m_pSRView));
554555
PostLoad();
555556
}
556557

0 commit comments

Comments
 (0)