mirror of
https://github.com/open-goal/jak-project
synced 2026-09-09 20:21:28 -04:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user