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

[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...
This commit is contained in:
Philip Rebohle 2019-10-14 01:39:54 +02:00
parent 9c6209fbf5
commit c281e76bac
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -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);
});