mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-07 08:39:00 +00:00
VertexLoaderTest: Add test for skipped texture coordinates
Jimmie Johnson's Anything with an Engine is known to use texture coordinate 7 (and only texture coordinate 7) in some cases. There are a lot of possible edge-cases, so this test brute-forces all combinations with coordinates 0, 1, and 2.
This commit is contained in:
parent
530590d162
commit
1ee6824324
2 changed files with 274 additions and 0 deletions
|
@ -575,6 +575,102 @@ struct VAT
|
|||
return 0;
|
||||
}
|
||||
}
|
||||
void SetTexElements(size_t idx, TexComponentCount value)
|
||||
{
|
||||
switch (idx)
|
||||
{
|
||||
case 0:
|
||||
g0.Tex0CoordElements = value;
|
||||
return;
|
||||
case 1:
|
||||
g1.Tex1CoordElements = value;
|
||||
return;
|
||||
case 2:
|
||||
g1.Tex2CoordElements = value;
|
||||
return;
|
||||
case 3:
|
||||
g1.Tex3CoordElements = value;
|
||||
return;
|
||||
case 4:
|
||||
g1.Tex4CoordElements = value;
|
||||
return;
|
||||
case 5:
|
||||
g2.Tex5CoordElements = value;
|
||||
return;
|
||||
case 6:
|
||||
g2.Tex6CoordElements = value;
|
||||
return;
|
||||
case 7:
|
||||
g2.Tex7CoordElements = value;
|
||||
return;
|
||||
default:
|
||||
PanicAlertFmt("Invalid tex coord index {}", idx);
|
||||
}
|
||||
}
|
||||
void SetTexFormat(size_t idx, ComponentFormat value)
|
||||
{
|
||||
switch (idx)
|
||||
{
|
||||
case 0:
|
||||
g0.Tex0CoordFormat = value;
|
||||
return;
|
||||
case 1:
|
||||
g1.Tex1CoordFormat = value;
|
||||
return;
|
||||
case 2:
|
||||
g1.Tex2CoordFormat = value;
|
||||
return;
|
||||
case 3:
|
||||
g1.Tex3CoordFormat = value;
|
||||
return;
|
||||
case 4:
|
||||
g1.Tex4CoordFormat = value;
|
||||
return;
|
||||
case 5:
|
||||
g2.Tex5CoordFormat = value;
|
||||
return;
|
||||
case 6:
|
||||
g2.Tex6CoordFormat = value;
|
||||
return;
|
||||
case 7:
|
||||
g2.Tex7CoordFormat = value;
|
||||
return;
|
||||
default:
|
||||
PanicAlertFmt("Invalid tex coord index {}", idx);
|
||||
}
|
||||
}
|
||||
void SetTexFrac(size_t idx, u8 value)
|
||||
{
|
||||
switch (idx)
|
||||
{
|
||||
case 0:
|
||||
g0.Tex0Frac = value;
|
||||
return;
|
||||
case 1:
|
||||
g1.Tex1Frac = value;
|
||||
return;
|
||||
case 2:
|
||||
g1.Tex2Frac = value;
|
||||
return;
|
||||
case 3:
|
||||
g1.Tex3Frac = value;
|
||||
return;
|
||||
case 4:
|
||||
g2.Tex4Frac = value;
|
||||
return;
|
||||
case 5:
|
||||
g2.Tex5Frac = value;
|
||||
return;
|
||||
case 6:
|
||||
g2.Tex6Frac = value;
|
||||
return;
|
||||
case 7:
|
||||
g2.Tex7Frac = value;
|
||||
return;
|
||||
default:
|
||||
PanicAlertFmt("Invalid tex coord index {}", idx);
|
||||
}
|
||||
}
|
||||
};
|
||||
template <>
|
||||
struct fmt::formatter<VAT>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue