[d3d11] Do not keep a strong reference to the swap chain back buffer

Fixes crash in Yakuza 0 with fullscreen mode enabled. SEGA, please,
stop being lazy and learn to use reference counting correctly.
This commit is contained in:
Philip Rebohle 2018-08-05 16:40:03 +02:00
parent cdf6ffb9bc
commit c223e35608
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 14 additions and 3 deletions

View File

@ -4,6 +4,17 @@
namespace dxvk {
D3D11VkBackBuffer::D3D11VkBackBuffer(D3D11Texture2D* pTexture)
: m_texture(pTexture) {
m_texture->AddRefPrivate();
}
D3D11VkBackBuffer::~D3D11VkBackBuffer() {
m_texture->ReleasePrivate();
}
HRESULT STDMETHODCALLTYPE D3D11VkBackBuffer::QueryInterface(REFIID riid, void** ppvObject) {
return m_texture->QueryInterface(riid, ppvObject);
}

View File

@ -14,8 +14,8 @@ namespace dxvk {
public:
D3D11VkBackBuffer(D3D11Texture2D* pTexture)
: m_texture(pTexture) { }
D3D11VkBackBuffer(D3D11Texture2D* pTexture);
~D3D11VkBackBuffer();
HRESULT STDMETHODCALLTYPE QueryInterface(
REFIID riid,
@ -25,7 +25,7 @@ namespace dxvk {
public:
Com<D3D11Texture2D> m_texture;
D3D11Texture2D* m_texture;
};