summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/TextureCacheBase.cpp
diff options
context:
space:
mode:
authorJordan Woyak <jordan.woyak@gmail.com>2025-03-07 14:43:39 -0600
committerJordan Woyak <jordan.woyak@gmail.com>2025-03-09 01:42:45 -0600
commitc18c039089bdc27cbccf92a9053ed80bb161a9b9 (patch)
treeeaaaa442e14441bd678c0c433d5765fa84c549d4 /Source/Core/VideoCommon/TextureCacheBase.cpp
parent99e686de34c2c862a01ee3859abb4b3256f04a63 (diff)
VideoCommon: Move backend_info out of VideoConfig struct.
Diffstat (limited to 'Source/Core/VideoCommon/TextureCacheBase.cpp')
-rw-r--r--Source/Core/VideoCommon/TextureCacheBase.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp
index 61882476d7..bbecc6437c 100644
--- a/Source/Core/VideoCommon/TextureCacheBase.cpp
+++ b/Source/Core/VideoCommon/TextureCacheBase.cpp
@@ -285,7 +285,7 @@ bool TextureCacheBase::DidLinkedAssetsChange(const TCacheEntry& entry)
RcTcacheEntry TextureCacheBase::ApplyPaletteToEntry(RcTcacheEntry& entry, const u8* palette,
TLUTFormat tlutfmt)
{
- DEBUG_ASSERT(g_ActiveConfig.backend_info.bSupportsPaletteConversion);
+ DEBUG_ASSERT(g_backend_info.bSupportsPaletteConversion);
const AbstractPipeline* pipeline = g_shader_cache->GetPaletteConversionPipeline(tlutfmt);
if (!pipeline)
@@ -404,7 +404,7 @@ void TextureCacheBase::ScaleTextureCacheEntryTo(RcTcacheEntry& entry, u32 new_wi
return;
}
- const u32 max = g_ActiveConfig.backend_info.MaxTextureSize;
+ const u32 max = g_backend_info.MaxTextureSize;
if (max < new_width || max < new_height)
{
ERROR_LOG_FMT(VIDEO, "Texture too big, width = {}, height = {}", new_width, new_height);
@@ -1416,7 +1416,7 @@ RcTcacheEntry TextureCacheBase::GetTexture(const int textureCacheSafetyColorSamp
// EFB copies have slightly different rules as EFB copy formats have different
// meanings from texture formats.
if ((base_hash == entry->hash &&
- (!texture_info.GetPaletteSize() || g_Config.backend_info.bSupportsPaletteConversion)) ||
+ (!texture_info.GetPaletteSize() || g_backend_info.bSupportsPaletteConversion)) ||
IsPlayingBackFifologWithBrokenEFBCopies)
{
// The texture format in VRAM must match the format that the copy was created with. Some
@@ -1451,7 +1451,7 @@ RcTcacheEntry TextureCacheBase::GetTexture(const int textureCacheSafetyColorSamp
// TODO: We should check width/height/levels for EFB copies. I'm not sure what effect
// checking width/height/levels would have.
- if (!texture_info.GetPaletteSize() || !g_Config.backend_info.bSupportsPaletteConversion)
+ if (!texture_info.GetPaletteSize() || !g_backend_info.bSupportsPaletteConversion)
return entry;
// Note that we found an unconverted EFB copy, then continue. We'll
@@ -2239,8 +2239,7 @@ void TextureCacheBase::CopyRenderTargetToTexture(
// Disadvantage of all methods: Calling this function requires the GPU to perform a pipeline flush
// which stalls any further CPU processing.
const bool is_xfb_copy = !is_depth_copy && !isIntensity && dstFormat == EFBCopyFormat::XFB;
- bool copy_to_vram =
- g_ActiveConfig.backend_info.bSupportsCopyToVram && !g_ActiveConfig.bDisableCopyToVRAM;
+ bool copy_to_vram = g_backend_info.bSupportsCopyToVram && !g_ActiveConfig.bDisableCopyToVRAM;
bool copy_to_ram =
!(is_xfb_copy ? g_ActiveConfig.bSkipXFBCopyToRam : g_ActiveConfig.bSkipEFBCopyToRam) ||
!copy_to_vram;
@@ -2851,7 +2850,7 @@ bool TextureCacheBase::CreateUtilityTextures()
if (!m_efb_encoding_framebuffer)
return false;
- if (g_ActiveConfig.backend_info.bSupportsGPUTextureDecoding)
+ if (g_backend_info.bSupportsGPUTextureDecoding)
{
constexpr TextureConfig decoding_texture_config(
1024, 1024, 1, 1, 1, AbstractTextureFormat::RGBA8, AbstractTextureFlag_ComputeImage,