mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +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 {
|
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) {
|
HRESULT STDMETHODCALLTYPE D3D11VkBackBuffer::QueryInterface(REFIID riid, void** ppvObject) {
|
||||||
return m_texture->QueryInterface(riid, ppvObject);
|
return m_texture->QueryInterface(riid, ppvObject);
|
||||||
}
|
}
|
||||||
|
@ -14,8 +14,8 @@ namespace dxvk {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
D3D11VkBackBuffer(D3D11Texture2D* pTexture)
|
D3D11VkBackBuffer(D3D11Texture2D* pTexture);
|
||||||
: m_texture(pTexture) { }
|
~D3D11VkBackBuffer();
|
||||||
|
|
||||||
HRESULT STDMETHODCALLTYPE QueryInterface(
|
HRESULT STDMETHODCALLTYPE QueryInterface(
|
||||||
REFIID riid,
|
REFIID riid,
|
||||||
@ -25,7 +25,7 @@ namespace dxvk {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
Com<D3D11Texture2D> m_texture;
|
D3D11Texture2D* m_texture;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user