mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-18 13:54:16 +01:00
[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:
parent
cdf6ffb9bc
commit
c223e35608
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user