diff --git a/src/d3d11/d3d11_buffer.cpp b/src/d3d11/d3d11_buffer.cpp index 5b8ea4e9..6c6f8bf6 100644 --- a/src/d3d11/d3d11_buffer.cpp +++ b/src/d3d11/d3d11_buffer.cpp @@ -35,7 +35,7 @@ namespace dxvk { void D3D11Buffer::GetDevice(ID3D11Device** ppDevice) { - *ppDevice = m_device.ref(); + *ppDevice = ref(m_device); } diff --git a/src/d3d11/d3d11_buffer.h b/src/d3d11/d3d11_buffer.h index 19d12c64..18c713d2 100644 --- a/src/d3d11/d3d11_buffer.h +++ b/src/d3d11/d3d11_buffer.h @@ -35,7 +35,7 @@ namespace dxvk { private: - Com m_device; + D3D11Device* const m_device; Com m_resource; D3D11_BUFFER_DESC m_desc; diff --git a/src/d3d11/d3d11_shader.h b/src/d3d11/d3d11_shader.h index e327b06c..bfda2bcd 100644 --- a/src/d3d11/d3d11_shader.h +++ b/src/d3d11/d3d11_shader.h @@ -70,7 +70,7 @@ namespace dxvk { } void GetDevice(ID3D11Device **ppDevice) final { - *ppDevice = m_device.ref(); + *ppDevice = ref(m_device); } const D3D11ShaderModule& GetShaderModule() const { @@ -79,8 +79,8 @@ namespace dxvk { private: - Com m_device; - D3D11ShaderModule m_module; + D3D11Device* const m_device; + D3D11ShaderModule m_module; }; diff --git a/src/d3d11/d3d11_state_rs.cpp b/src/d3d11/d3d11_state_rs.cpp index 41acafbc..e94c8b87 100644 --- a/src/d3d11/d3d11_state_rs.cpp +++ b/src/d3d11/d3d11_state_rs.cpp @@ -76,7 +76,7 @@ namespace dxvk { void D3D11RasterizerState::GetDevice(ID3D11Device** ppDevice) { - *ppDevice = m_device.ref(); + *ppDevice = ref(m_device); } diff --git a/src/d3d11/d3d11_state_rs.h b/src/d3d11/d3d11_state_rs.h index 8a1ddda9..4ad7c25a 100644 --- a/src/d3d11/d3d11_state_rs.h +++ b/src/d3d11/d3d11_state_rs.h @@ -35,8 +35,7 @@ namespace dxvk { private: - Com m_device; - + D3D11Device* const m_device; D3D11_RASTERIZER_DESC m_desc; Rc m_state; diff --git a/src/d3d11/d3d11_texture.cpp b/src/d3d11/d3d11_texture.cpp index a33250ff..0616eb15 100644 --- a/src/d3d11/d3d11_texture.cpp +++ b/src/d3d11/d3d11_texture.cpp @@ -35,7 +35,7 @@ namespace dxvk { void D3D11Texture2D::GetDevice(ID3D11Device** ppDevice) { - *ppDevice = m_device.ref(); + *ppDevice = ref(m_device); } diff --git a/src/d3d11/d3d11_texture.h b/src/d3d11/d3d11_texture.h index 623542a8..26ba1506 100644 --- a/src/d3d11/d3d11_texture.h +++ b/src/d3d11/d3d11_texture.h @@ -41,7 +41,7 @@ namespace dxvk { private: - Com m_device; + D3D11Device* const m_device; Com m_resource; D3D11_TEXTURE2D_DESC m_desc; diff --git a/src/d3d11/d3d11_view.cpp b/src/d3d11/d3d11_view.cpp index 534089cf..5f32a96a 100644 --- a/src/d3d11/d3d11_view.cpp +++ b/src/d3d11/d3d11_view.cpp @@ -33,7 +33,7 @@ namespace dxvk { void D3D11RenderTargetView::GetDevice(ID3D11Device** ppDevice) { - *ppDevice = m_device.ref(); + *ppDevice = ref(m_device); } diff --git a/src/d3d11/d3d11_view.h b/src/d3d11/d3d11_view.h index 0b6bbf7b..307f4e20 100644 --- a/src/d3d11/d3d11_view.h +++ b/src/d3d11/d3d11_view.h @@ -36,7 +36,7 @@ namespace dxvk { private: - Com m_device; + D3D11Device* const m_device; Com m_resource; D3D11_RENDER_TARGET_VIEW_DESC m_desc;