mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-13 00:58:29 +02:00
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.
This commit is contained in:
@ -163,13 +163,12 @@ static void InitSlope(Slope* slope, float f1, float f2, float f3, float DX31, fl
|
||||
|
||||
static inline void CalculateLOD(s32* lodp, bool* linear, u32 texmap, u32 texcoord)
|
||||
{
|
||||
const FourTexUnits& texUnit = bpmem.tex[(texmap >> 2) & 1];
|
||||
const u8 subTexmap = texmap & 3;
|
||||
auto texUnit = bpmem.tex.GetUnit(texmap);
|
||||
|
||||
// LOD calculation requires data from the texture mode for bias, etc.
|
||||
// it does not seem to use the actual texture size
|
||||
const TexMode0& tm0 = texUnit.texMode0[subTexmap];
|
||||
const TexMode1& tm1 = texUnit.texMode1[subTexmap];
|
||||
const TexMode0& tm0 = texUnit.texMode0;
|
||||
const TexMode1& tm1 = texUnit.texMode1;
|
||||
|
||||
float sDelta, tDelta;
|
||||
if (tm0.diag_lod == LODType::Diagonal)
|
||||
|
Reference in New Issue
Block a user