diff options
| author | Stenzek <stenzek@gmail.com> | 2017-04-29 00:53:32 +1000 |
|---|---|---|
| committer | Stenzek <stenzek@gmail.com> | 2017-04-29 13:46:43 +1000 |
| commit | cc851c41c11bdc1c192003021df6dc3c2d2b74fb (patch) | |
| tree | 35df546c2be195f456b8c85993c4549cdd176796 /Source/Core/VideoBackends/OGL/TextureCache.cpp | |
| parent | de348fc9527f640435d57676a60317a96d217dd8 (diff) | |
TextureCache: Move host texture utility functions to VideoCommon
The appropriate place for these would be AbstractTexture, once it is
finished.
Diffstat (limited to 'Source/Core/VideoBackends/OGL/TextureCache.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/OGL/TextureCache.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
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) { |
