assembler/fs: TEX: swap a/rgb order in write mask

This commit is contained in:
Zack Buhman 2025-10-28 14:17:57 -05:00
parent e8da0190fc
commit efd9a85ce2
3 changed files with 9 additions and 9 deletions

View File

@ -1,5 +1,5 @@
TEX TEX_SEM_WAIT TEX_SEM_ACQUIRE
temp[0].argb = LD tex[0].rgba temp[0].rgaa ;
temp[0].rgba = LD tex[0].rgba temp[0].rgaa ;
OUT TEX_SEM_WAIT
src0.a = temp[0], src0.rgb = temp[0] :

View File

@ -64,13 +64,13 @@ def validate_mask_swizzle(token) -> tuple[AlphaMask, RGBMask]:
(b"rb" , (AlphaMask.NONE, RGBMask.RB)),
(b"gb" , (AlphaMask.NONE, RGBMask.GB)),
(b"rgb" , (AlphaMask.NONE, RGBMask.RGB)),
(b"ar" , (AlphaMask.A, RGBMask.R)),
(b"ag" , (AlphaMask.A, RGBMask.G)),
(b"arg" , (AlphaMask.A, RGBMask.RG)),
(b"ab" , (AlphaMask.A, RGBMask.B)),
(b"arb" , (AlphaMask.A, RGBMask.RB)),
(b"agb" , (AlphaMask.A, RGBMask.GB)),
(b"argb" , (AlphaMask.A, RGBMask.RGB)),
(b"ra" , (AlphaMask.A, RGBMask.R)),
(b"ga" , (AlphaMask.A, RGBMask.G)),
(b"rga" , (AlphaMask.A, RGBMask.RG)),
(b"ba" , (AlphaMask.A, RGBMask.B)),
(b"rba" , (AlphaMask.A, RGBMask.RB)),
(b"gba" , (AlphaMask.A, RGBMask.GB)),
(b"rgba" , (AlphaMask.A, RGBMask.RGB)),
])
if token.lexeme not in argb_masks:
raise ValidatorError("invalid destination mask", token)

View File

@ -420,7 +420,7 @@ def disassemble_tex_dest(code):
a_wmask, a_wmask_str, _ = US_CMN_INST._ALPHA_WMASK(code)
wmask_bool = rgb_wmask != 0 or a_wmask != 0
rgba_wmask = (a_wmask_str if a_wmask else "") + (rgb_wmask_str if rgb_wmask else "")
rgba_wmask = (rgb_wmask_str if rgb_wmask else "") + (a_wmask_str if a_wmask else "")
temp_str = f"temp[{dst_addr}].{rgba_wmask.lower().ljust(4)} = " if wmask_bool else ""