From cc851c41c11bdc1c192003021df6dc3c2d2b74fb Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sat, 29 Apr 2017 00:53:32 +1000 Subject: TextureCache: Move host texture utility functions to VideoCommon The appropriate place for these would be AbstractTexture, once it is finished. --- Source/Core/VideoBackends/OGL/TextureCache.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'Source/Core/VideoBackends/OGL/TextureCache.cpp') diff --git a/Source/Core/VideoBackends/OGL/TextureCache.cpp b/Source/Core/VideoBackends/OGL/TextureCache.cpp index 05261f1d33..2031d7e220 100644 --- a/Source/Core/VideoBackends/OGL/TextureCache.cpp +++ b/Source/Core/VideoBackends/OGL/TextureCache.cpp @@ -88,11 +88,6 @@ bool SaveTexture(const std::string& filename, u32 textarget, u32 tex, int virtua return TextureToPng(data.data(), width * 4, filename, width, height, true); } -static bool IsCompressedTextureFormat(HostTextureFormat format) -{ - return format >= HostTextureFormat::DXT1 && format <= HostTextureFormat::DXT5; -} - static GLenum GetGLInternalFormatForTextureFormat(HostTextureFormat format, bool storage) { switch (format) @@ -204,7 +199,7 @@ TextureCache::TCacheEntryBase* TextureCache::CreateTexture(const TCacheEntryConf if (config.rendertarget) { // We can't render to compressed formats. - _assert_(!IsCompressedTextureFormat(config.format)); + _assert_(!IsCompressedHostTextureFormat(config.format)); if (!g_ogl_config.bSupportsTextureStorage) { for (u32 level = 0; level < config.levels; level++) @@ -276,7 +271,7 @@ void TextureCache::TCacheEntry::Load(u32 level, u32 width, u32 height, u32 row_l glPixelStorei(GL_UNPACK_ROW_LENGTH, row_length); GLenum gl_internal_format = GetGLInternalFormatForTextureFormat(config.format, false); - if (IsCompressedTextureFormat(config.format)) + if (IsCompressedHostTextureFormat(config.format)) { if (g_ogl_config.bSupportsTextureStorage) { -- cgit v1.2.3