From a0dba6bbf998242798c2a5cde98f3de7acafae68 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Thu, 7 Nov 2019 20:21:27 +0100 Subject: [PATCH] [d3d11] Hold reference to DxvkInstance Hack to keep the instance alive which owns the adapters. Should fix #1240 for now, but we should fix this properly later on. --- src/d3d11/d3d11_device.cpp | 1 + src/d3d11/d3d11_device.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/d3d11/d3d11_device.cpp b/src/d3d11/d3d11_device.cpp index 7800a5d30..a02f497fb 100644 --- a/src/d3d11/d3d11_device.cpp +++ b/src/d3d11/d3d11_device.cpp @@ -2464,6 +2464,7 @@ namespace dxvk { D3D_FEATURE_LEVEL FeatureLevel, UINT FeatureFlags) : m_dxgiAdapter (pAdapter), + m_dxvkInstance (pDxvkAdapter->instance()), m_dxvkAdapter (pDxvkAdapter), m_dxvkDevice (CreateDevice(FeatureLevel)), m_d3d11Device (this, FeatureLevel, FeatureFlags), diff --git a/src/d3d11/d3d11_device.h b/src/d3d11/d3d11_device.h index 3614adbb9..e409f6843 100644 --- a/src/d3d11/d3d11_device.h +++ b/src/d3d11/d3d11_device.h @@ -641,6 +641,7 @@ namespace dxvk { Com m_dxgiAdapter; + Rc m_dxvkInstance; Rc m_dxvkAdapter; Rc m_dxvkDevice;