diff --git a/src/d3d11/d3d11_state.h b/src/d3d11/d3d11_state.h index e9f6a098..e3d92aeb 100644 --- a/src/d3d11/d3d11_state.h +++ b/src/d3d11/d3d11_state.h @@ -50,7 +50,7 @@ namespace dxvk { Com result = new T(device, desc); m_objects.insert({ desc, result }); - return result.ptr(); + return result.ref(); } private: diff --git a/src/d3d11/d3d11_state_rs.cpp b/src/d3d11/d3d11_state_rs.cpp index da2d3c04..9616b420 100644 --- a/src/d3d11/d3d11_state_rs.cpp +++ b/src/d3d11/d3d11_state_rs.cpp @@ -78,7 +78,7 @@ namespace dxvk { void D3D11RasterizerState::GetDevice(ID3D11Device** ppDevice) { - *ppDevice = m_device.ref(); + *ppDevice = m_device; } diff --git a/src/d3d11/d3d11_state_rs.h b/src/d3d11/d3d11_state_rs.h index 356cfba3..6aadf7a7 100644 --- a/src/d3d11/d3d11_state_rs.h +++ b/src/d3d11/d3d11_state_rs.h @@ -35,9 +35,9 @@ namespace dxvk { private: - Com m_device; - D3D11_RASTERIZER_DESC m_desc; - DxvkRasterizerState m_state; + D3D11Device* const m_device; + D3D11_RASTERIZER_DESC m_desc; + DxvkRasterizerState m_state; }; diff --git a/src/util/com/com_object.h b/src/util/com/com_object.h index e3939225..2bb2fa9f 100644 --- a/src/util/com/com_object.h +++ b/src/util/com/com_object.h @@ -12,7 +12,7 @@ return S_OK; \ } \ } while (0) -#include + namespace dxvk { template