From 9fa26624b02562fb8626c93c45acf2015fc06f40 Mon Sep 17 00:00:00 2001 From: Scott Mansell Date: Sun, 10 Oct 2021 08:16:15 +1300 Subject: BPMemory: Refactor/consolidate TexUnit Addressing Currently the logic for addressing the individual TexUnits is splattered all across dolphin's codebase, this commit attempts to consolidate it all into a single place and formalise it using our new TexUnitAddress struct. --- Source/Core/VideoCommon/TextureCacheBase.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Source/Core/VideoCommon/TextureCacheBase.cpp') diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp index 766c017915..e113f15832 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/TextureCacheBase.cpp @@ -970,8 +970,7 @@ void TextureCacheBase::DumpTexture(TCacheEntry* entry, std::string basename, uns static void SetSamplerState(u32 index, float custom_tex_scale, bool custom_tex, bool has_arbitrary_mips) { - const FourTexUnits& tex = bpmem.tex[index / 4]; - const TexMode0& tm0 = tex.texMode0[index % 4]; + const TexMode0& tm0 = bpmem.tex.GetUnit(index).texMode0; SamplerState state = {}; state.Generate(bpmem, index); -- cgit v1.2.3