diff options
| author | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2024-01-22 00:32:52 -0500 |
|---|---|---|
| committer | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2024-01-22 00:32:52 -0500 |
| commit | f167f18ed0b8ff3c8aa81d804ee303a5c3e337ca (patch) | |
| tree | 6a6598a389e3e86bbb8b9d561cc978d7a1463dca /include/JSystem/J3DGraphBase | |
| parent | 60bf02dc90ca374fd01bda7f2c76181a27e2897c (diff) | |
J3DMatBlock: fix setChanCtrlMacro codegen
Diffstat (limited to 'include/JSystem/J3DGraphBase')
| -rw-r--r-- | include/JSystem/J3DGraphBase/J3DMatBlock.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/JSystem/J3DGraphBase/J3DMatBlock.h b/include/JSystem/J3DGraphBase/J3DMatBlock.h index 5fea0a90..11b31c04 100644 --- a/include/JSystem/J3DGraphBase/J3DMatBlock.h +++ b/include/JSystem/J3DGraphBase/J3DMatBlock.h @@ -945,8 +945,9 @@ inline u16 calcColorChanID(u16 enable, u8 matSrc, u8 lightMask, u8 diffuseFn, u8 } inline u32 setChanCtrlMacro(u8 enable, GXColorSrc ambSrc, GXColorSrc matSrc, u32 lightMask, GXDiffuseFn diffuseFn, GXAttnFn attnFn) { + u32 ret = matSrc << 0; // Putting this as a separate statement fixes codegen, but regalloc is still wrong return - matSrc << 0 | + ret | enable << 1 | (lightMask & 0x0F) << 2 | ambSrc << 6 | |
