Files
PS2Recomp/ps2xTest
Shane Michael Mathews (Personal Account) d50ed4e300 test(gs): H-format shared-plane texture regression coverage (T8H/T4HL/T4HH) (#155)
Add byte-level regression tests for the GS "high" indexed texture formats,
which store their index in the alpha byte of a shared PSMCT32 word -- T4HL in
bits 24-27, T4HH in bits 28-31, T8H in the full byte 24-31. The format-aware
VRAM path (the #140 refactor) already implements these at main; these tests
pin the plane-separation and over-transfer behavior so it can't silently
regress.

- Plane separation: uploading distinct T4HL then T4HH patterns to the same dbp
  leaves both planes intact (RMW into the shared CT32 word), cross-checked
  against GSMem::ReadP4HL/ReadP4HH.
- T8H coverage: uploads the full byte into bits 24-31 via a real BITBLTBUF+GIF
  IMAGE transfer (one byte per texel through WriteP8H) and round-trips it via
  GSMem::ReadP8H. T8H takes the plain byte-store branch of
  PixelStorageTraits::Write and its own upload loop, distinct from the
  T4HL/T4HH nibble RMW path, so it needs independent coverage.
- Clobber interaction: a T4HL nibble upload over a prior T8H byte overwrites
  bits 24-27 with the nibble and preserves bits 28-31 (the T8H byte's high
  nibble) -- the hardware-modeled RMW outcome.
- Sampled channels: each plane resolves through its own 16-entry CT32 CLUT to
  the expected RGBA, with distractor CLUT entries so a cross-plane nibble read
  produces a non-matching color.
- Over-transfer hard-stop: an ~8x oversized T4HL IMAGE payload writes only
  rrw*rrh texels and deactivates the transfer (trxdir=3), and a subsequent
  transfer to a different dbp is byte-correct.

Test-only; no product code change. ps2x_tests: 299/299.
2026-07-10 12:06:20 -03:00
..
2026-07-07 21:48:26 -03:00