mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-30 01:25:51 +00:00
HostDisplay: Fix cursor texture leak
This commit is contained in:
parent
9e9b0e223f
commit
befbc7bc2e
|
@ -32,6 +32,11 @@ RenderAPI HostDisplay::GetPreferredAPI()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void HostDisplay::DestroyResources()
|
||||||
|
{
|
||||||
|
m_cursor_texture.reset();
|
||||||
|
}
|
||||||
|
|
||||||
bool HostDisplay::UpdateTexture(GPUTexture* texture, u32 x, u32 y, u32 width, u32 height, const void* data, u32 pitch)
|
bool HostDisplay::UpdateTexture(GPUTexture* texture, u32 x, u32 y, u32 width, u32 height, const void* data, u32 pitch)
|
||||||
{
|
{
|
||||||
void* map_ptr;
|
void* map_ptr;
|
||||||
|
|
|
@ -81,7 +81,7 @@ public:
|
||||||
virtual bool SetFullscreen(bool fullscreen, u32 width, u32 height, float refresh_rate) = 0;
|
virtual bool SetFullscreen(bool fullscreen, u32 width, u32 height, float refresh_rate) = 0;
|
||||||
virtual AdapterAndModeList GetAdapterAndModeList() = 0;
|
virtual AdapterAndModeList GetAdapterAndModeList() = 0;
|
||||||
virtual bool CreateResources() = 0;
|
virtual bool CreateResources() = 0;
|
||||||
virtual void DestroyResources() = 0;
|
virtual void DestroyResources();
|
||||||
|
|
||||||
virtual bool SetPostProcessingChain(const std::string_view& config) = 0;
|
virtual bool SetPostProcessingChain(const std::string_view& config) = 0;
|
||||||
|
|
||||||
|
|
|
@ -633,6 +633,8 @@ bool D3D11HostDisplay::CreateResources()
|
||||||
|
|
||||||
void D3D11HostDisplay::DestroyResources()
|
void D3D11HostDisplay::DestroyResources()
|
||||||
{
|
{
|
||||||
|
HostDisplay::DestroyResources();
|
||||||
|
|
||||||
m_post_processing_chain.ClearStages();
|
m_post_processing_chain.ClearStages();
|
||||||
m_post_processing_input_texture.Destroy();
|
m_post_processing_input_texture.Destroy();
|
||||||
m_post_processing_stages.clear();
|
m_post_processing_stages.clear();
|
||||||
|
|
|
@ -545,6 +545,8 @@ bool D3D12HostDisplay::CreateResources()
|
||||||
|
|
||||||
void D3D12HostDisplay::DestroyResources()
|
void D3D12HostDisplay::DestroyResources()
|
||||||
{
|
{
|
||||||
|
HostDisplay::DestroyResources();
|
||||||
|
|
||||||
m_post_processing_cbuffer.Destroy(false);
|
m_post_processing_cbuffer.Destroy(false);
|
||||||
m_post_processing_chain.ClearStages();
|
m_post_processing_chain.ClearStages();
|
||||||
m_post_processing_input_texture.Destroy();
|
m_post_processing_input_texture.Destroy();
|
||||||
|
|
|
@ -617,6 +617,8 @@ void main()
|
||||||
|
|
||||||
void OpenGLHostDisplay::DestroyResources()
|
void OpenGLHostDisplay::DestroyResources()
|
||||||
{
|
{
|
||||||
|
HostDisplay::DestroyResources();
|
||||||
|
|
||||||
m_post_processing_chain.ClearStages();
|
m_post_processing_chain.ClearStages();
|
||||||
m_post_processing_input_texture.Destroy();
|
m_post_processing_input_texture.Destroy();
|
||||||
m_post_processing_ubo.reset();
|
m_post_processing_ubo.reset();
|
||||||
|
|
|
@ -545,6 +545,8 @@ void main()
|
||||||
|
|
||||||
void VulkanHostDisplay::DestroyResources()
|
void VulkanHostDisplay::DestroyResources()
|
||||||
{
|
{
|
||||||
|
HostDisplay::DestroyResources();
|
||||||
|
|
||||||
Vulkan::Util::SafeDestroyPipelineLayout(m_post_process_pipeline_layout);
|
Vulkan::Util::SafeDestroyPipelineLayout(m_post_process_pipeline_layout);
|
||||||
Vulkan::Util::SafeDestroyPipelineLayout(m_post_process_ubo_pipeline_layout);
|
Vulkan::Util::SafeDestroyPipelineLayout(m_post_process_ubo_pipeline_layout);
|
||||||
Vulkan::Util::SafeDestroyDescriptorSetLayout(m_post_process_descriptor_set_layout);
|
Vulkan::Util::SafeDestroyDescriptorSetLayout(m_post_process_descriptor_set_layout);
|
||||||
|
|
Loading…
Reference in a new issue