From c281e76baccb8b38eda51f73297075f88d0799a6 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Mon, 14 Oct 2019 01:39:54 +0200 Subject: [PATCH] [d3d11] Don't get private references for state objects Otherwise we will end up deleting the objects even though they aren't explicitly heap-allocated. Whoops... --- src/d3d11/d3d11_context.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/d3d11/d3d11_context.cpp b/src/d3d11/d3d11_context.cpp index 0a76c739f..1eb20ef27 100644 --- a/src/d3d11/d3d11_context.cpp +++ b/src/d3d11/d3d11_context.cpp @@ -3213,7 +3213,7 @@ namespace dxvk { void D3D11DeviceContext::ApplyBlendState() { if (m_state.om.cbState != nullptr) { EmitCs([ - cBlendState = m_state.om.cbState.prvRef(), + cBlendState = m_state.om.cbState.ptr(), cSampleMask = m_state.om.sampleMask ] (DxvkContext* ctx) { cBlendState->BindToContext(ctx, cSampleMask); @@ -3251,7 +3251,7 @@ namespace dxvk { void D3D11DeviceContext::ApplyDepthStencilState() { if (m_state.om.dsState != nullptr) { EmitCs([ - cDepthStencilState = m_state.om.dsState.prvRef() + cDepthStencilState = m_state.om.dsState.ptr() ] (DxvkContext* ctx) { cDepthStencilState->BindToContext(ctx); }); @@ -3278,7 +3278,7 @@ namespace dxvk { void D3D11DeviceContext::ApplyRasterizerState() { if (m_state.rs.state != nullptr) { EmitCs([ - cRasterizerState = m_state.rs.state.prvRef() + cRasterizerState = m_state.rs.state.ptr() ] (DxvkContext* ctx) { cRasterizerState->BindToContext(ctx); });