1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-31 05:52:11 +01:00

[d3d9] Use base texture for subresource refs

Fixes a crash when running d3d9-triangle
This commit is contained in:
Joshua Ashton 2020-05-25 13:29:56 +01:00
parent 9ee4add77e
commit 4d70d59ea4

View File

@ -32,15 +32,15 @@ namespace dxvk {
}
ULONG STDMETHODCALLTYPE AddRef() final {
if (m_container != nullptr)
return m_container->AddRef();
if (m_baseTexture != nullptr)
return m_baseTexture->AddRef();
return D3D9Resource<Type...>::AddRef();
}
ULONG STDMETHODCALLTYPE Release() final {
if (m_container != nullptr)
return m_container->Release();
if (m_baseTexture != nullptr)
return m_baseTexture->Release();
return D3D9Resource<Type...>::Release();
}