Repository navigation
fix(shaders): LDG/STG [URn+imm] with ordering bit 78 lower (2 compute programs) - #1778
Conversation
Two of OoT's compute programs load from a uniform address with bits 77 and 78 set and stopped as "native global load uniform addressing mode". Bit 77 alone was allowed, as in the register form: the load's memory ordering needs nothing from a Maxwell LDG. Bit 78 is the same field. Bit 76 and other unknown bits stay refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The second of those compute programs then stopped at a store of the same form, bits 77-79 set: "native global store uniform addressing mode". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # tests/run_all.py
|
Thanks, agreed. Bits 77-79 all set read as |
# Conflicts: # tests/run_all.py
Bits 77-79 all set are .STRONG.GPU, as the RED and ATOMG cases in this file carry them (hckrman101). A Maxwell LDG/STG has no ordering, so with bit 78 the access is fenced by MEMBAR.GL on both sides, as SUST.STRONG.GPU (0xb9b) is. The test checks two fences with bit 78 and none with bit 77 alone or neither. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Correction to my last comment: I didn't rebase this one. I saw your merge of main into the branch, so I kept it, merged the current main on top (the new |
…ed#1778 NotRexed#1789 NotRexed#1800 NotRexed#1806 NotRexed#1810 merged): to Fixed Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two of OoT's compute programs fail to translate ("does not lower ... native global load uniform addressing mode"), so their dispatches do nothing on every PC. Both load from a uniform-register address with memory-ordering bit 78 set beside bit 77, and the lowering only allowed 77.
The encodings (startup pipeline build, Linux; also in a Radeon 890M v2.0.13 log from #bug-reporting):
These are the uniform-address forms the lowering already handles (
0x081e8100for LDG,0x0810a100for STG, bit 79 set, bit 76 clear). The only extra is bit 78. Bit 77, in the same ordering field, is already ignored ("needs nothing extra from a Maxwell LDG"), because Maxwell's LDG/STG have no ordering qualifier. The second program got past its load and then stopped at the store, so the store is included here.Change (
lower_to_maxwell.h): bit 78 is allowed beside 77 in the uniform-address LDG (0x981) and STG (0x986). They lower to Maxwell LDG.E / STG.E of the uniform register pair plus the offset, as before. Bit 76 and other unknown bits in the uniform form stay refused, as do odd uniform registers.Tests
tests/test_lower_ldg_uniform_order.py(inrun_all.py): the three encodings lower to LDG.E / STG.E with the right destination or data, offset, size,.Eand an aligned address pair; bit 77 alone or neither lower as before; bit 76 is refused. It fails onmainand passes here.run_all.py: 246 passed, 0 failed.Ordering note: lowering a strong load or store to a plain one could matter only across workgroups, for example a spin on a flag another workgroup writes. I haven't disassembled these two programs to rule that out. Reviewers who know these passes may want to check. The register form has accepted bit 77 the same way.
🤖 Generated with Claude Code