TextureCache: don't create texture decoding resources if not enabled

This commit is contained in:
Michael M 2017-10-21 22:20:54 -07:00
parent 78d5dbe032
commit 82129d30c9
1 changed files with 4 additions and 2 deletions

View File

@ -69,6 +69,7 @@ TextureCache::TextureCache()
glBindTexture(GL_TEXTURE_BUFFER, m_palette_resolv_texture); glBindTexture(GL_TEXTURE_BUFFER, m_palette_resolv_texture);
glTexBuffer(GL_TEXTURE_BUFFER, GL_R16UI, m_palette_stream_buffer->m_buffer); glTexBuffer(GL_TEXTURE_BUFFER, GL_R16UI, m_palette_stream_buffer->m_buffer);
if (g_ActiveConfig.backend_info.bSupportsGPUTextureDecoding)
CreateTextureDecodingResources(); CreateTextureDecodingResources();
} }
} }
@ -76,6 +77,7 @@ TextureCache::TextureCache()
TextureCache::~TextureCache() TextureCache::~TextureCache()
{ {
DeleteShaders(); DeleteShaders();
if (g_ActiveConfig.backend_info.bSupportsGPUTextureDecoding)
DestroyTextureDecodingResources(); DestroyTextureDecodingResources();
if (g_ActiveConfig.backend_info.bSupportsPaletteConversion) if (g_ActiveConfig.backend_info.bSupportsPaletteConversion)