Skip to content

fix(shaders): ISBERD.O, a task program reading back its payload (12 failing pipelines) - #1789

Merged
hckrman101 merged 3 commits into
NotRexed:mainfrom
Joey-Magnus:fix/lower-isberd-output
Nov 10, 2026
Merged

hckrman101 merged 3 commits into
NotRexed:mainfrom
Joey-Magnus:fix/lower-isberd-output

Conversation

@Joey-Magnus

Copy link
Copy Markdown
Contributor

One of OoT's task programs fails to translate ("does not lower ... native stage buffer access mode") because it reads back its own task payload, and the lowering only took stage-buffer reads from the input region. Its mesh pipelines are behind 12 of the 17 programs that still fail in the startup pipeline build, so whatever they draw is missing on every PC.

The instruction (program 64ba846654e63ea4, task stage, +0x80):

ff057923 00001000 0000b800 000e2200   ISBERD.32.ATTR.O R5, [RZ+0x10]

Bits 75 (.32), 76-77 = 3 (.ATTR) and 79 (.O, the output buffer). The program reads word 4 of its payload, which it writes with ISBEWR.O.

Change

  • lower_to_maxwell.h (0x923/0x927): a read may now be of the output region. Writes are still always to it, and reads still only from the attribute region. The nx2 pseudo instruction already carries .O in bit 47.
  • internal_stage_buffer_entry_read.cpp: ISBE_nx2 decodes bit 47, and a read with it becomes the new IR op IsbeReadOutput.
  • emit_spirv_mesh.cpp: EmitIsbeReadOutput loads the word EmitIsbeWriteAttribute stores there: PayloadWord(index) in a task program, the shared attribute array (clamped, as the write) in a mesh program.
  • opcodes.inc / ir_emitter gain IsbeReadOutput. The hand-sized opcode tables in opcodes.cpp/opcodes.h go to 543 (test_lower_atomg_cas.py checks that).

Tests

No screenshot yet: I haven't identified which effect these task/mesh pipelines draw.

🤖 Generated with Claude Code

Joey Magnus and others added 2 commits November 10, 2026 11:43
…t region

One of OoT's task programs reads its own payload (ISBERD.32.ATTR.O) and stopped as
"native stage buffer access mode": the lowering took reads from the input region only.
The nx2 pseudo instruction already carries .O (bit 47); the frontend now reads it as a new
IsbeReadOutput, which the SPIR-V back end loads from the word IsbeWriteAttribute writes:
the task payload, or the mesh's shared attributes. Writes stay output-only, reads
attribute-region only. The opcode tables grow to 543.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hckrman101
hckrman101 merged commit 0904155 into NotRexed:main Nov 10, 2026
6 of 8 checks passed
Joey-Magnus pushed a commit to Joey-Magnus/Hookshot that referenced this pull request Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants