D005 - Three NGG facts first seen in a decrypted module are kept, cited to the open sources

Status: decided Date: 2026-09-14

What happened

On 2026-09-14, while the GL cube's vertex shader still launched no pixel waves, /system/sys/AgcCompositor.elf was pulled from the console and its NGG vertex shader was run through llvm-mc --disassemble. A module read from a jailbroken console's filesystem is decrypted material, and disassembling it is what the OOPS conventions (section 1) forbid. Three facts in src/gl/gl_context.c's vertex shader trace to that reading:

  1. an s_waitcnt expcnt(0) between the primitive export and the change of the exec mask, without which no pixel wave ever launched;
  2. the primitive export word 0x20280600: vertex indices at bits 0, 10 and 20, edge flags set;
  3. GS_ALLOC_REQ with m0 holding the vertex count in the low bits and the primitive count shifted by twelve.

The pulled file was deleted from the session's scratch directory the same day; it was never in a repository. Worklog 539 in orbistoun records the incident in full.

The choice

The three facts stay in the code, and their citation is the open-source AMD graphics stack and the public ISA reference, not the module: Mesa's NGG lowering (ac_nir_lower_ngg) emits exactly this sequence for every RDNA primitive shader, and the RDNA ISA reference states the ordering rules for s_sendmsg and the export counters. The shader comment and ACKNOWLEDGEMENTS.md say so. Decided by the owner, with the alternative (strip the three facts and re-derive them from the open sources first) on the table.

Why

What this does not settle

Older comments in src/agc/agc_draw.c (the depth block "aligned with AgcCompositor.elf") and src/gl/gl_draw.c name the same module for a register list that predates this record. Their origin was not established today; whether that list came from a runtime measurement (obSCEne's 166-agc/primitive-draw reads register state from a running console, which is runtime evidence) or from reading the file is worth the same check before the next release.