gsrc: Add convenience macros for masking VF operations (#3824)

Migrates all code, there should be no change in the compilation output
(linter should check this)

At first i was considering making these builtins, which short of a bunch
of code generation, would require some sort of dynamic definition in
`Atoms.cpp`. This isn't hard but, i figured it would be better to keep
it simple and just generate the OG macros.

Fixes https://github.com/open-goal/jak-project/issues/233
This commit is contained in:
Tyler Wilding
2025-01-11 12:16:05 -05:00
committed by GitHub
parent e836f09212
commit 6f093f98ff
419 changed files with 8186 additions and 5708 deletions
+3 -3
View File
@@ -52,10 +52,10 @@ Most functions take a boolean as their first argument. If the boolean is set to
(.add.mul.z.vf vf5 vf3 vf5 acc)
(.div.vf Q vf9 vf5 :fsf #b0 :ftf #b11)
(.wait.vf)
(.mul.vf vf5 vf5 Q :mask #b111)
(.mul.vf.xyz vf5 vf5 Q)
(.add.vf vf5 vf5 vf8)
(.max.x.vf vf5 vf5 vf0 :mask #b1000)
(.min.x.vf vf5 vf5 vf6 :mask #b1000)
(.max.x.vf.w vf5 vf5 vf0)
(.min.x.vf.w vf5 vf5 vf6)
(vftoi4.xyzw vf5 vf5)
(.svf (&-> out quad) vf5)
out