OUT

Attributes and the stage's own memory

fixed bit field field the encoding fixes should be

Encoding

12712612512412312212112011911811711611511411311211111010910810710610510410310210110099989796
reusewaitrd_barwr_baryieldstall
9594939291908988878685848382818079787776757473727170696867666564
kind
6362616059585756555453525150494847464544434241403938373635343332
313029282726252423222120191817161514131211109876543210
RaRdpred.notpredform100100100

bits 15:0: ---- 0011 0010 0100
bits 15:0: ---- 1001 0010 0100
bits 15:0: ---- 1011 0010 0100
bits 15:0: ---- 1101 0010 0100

Forms

Form (bits 11:9)bc
1 (001)Rb at 32Rc at 64
4 (100)immediate at 32Rc at 64
5 (101)constant buffer: offset at 38, bank at 54Rc at 64
6 (110)URb at 32Rc at 64

IPA with a uniform register in its address (0x526, bit 91), as a game's fragment programs index an input array

Runs execute_OUT.

Fields

FieldBitsFrom
reuse125:122the decoder
wait121:116the decoder
rd_bar115:113the decoder
wr_bar112:110the decoder
yield109the decoder
stall108:105the decoder
kind79:78execute_OUT
Ra31:24the decoder
Rd23:16the decoder
pred.not15the decoder
pred14:12the decoder
form11:9the decoder

Operation Sail

OUT: bits 78-79 emit (1), cut (2) or both, 0 the final one (nothing here); the new output handle Rd is the old one, Ra (nxnative's notes)

if Stage() != ST_GS then throw(Unsupported("OUT outside a geometry program"));
let kind = UInt(Field(78, 2));
if kind != 0 & Passthrough() then throw(Unsupported("OUT emits in a passthrough geometry program"));
if MOD(kind, 2) == 1 then GsEmit();
if kind >= 2 then EndPrimitive();
if Dst() < RZ then R_write(Dst(), SrcInt(A))

Made from ScarletNX's Sail at 166ad3910f80. The Sail and the encodings' file are ScarletNX's (GPL-3.0-or-later); its encodings are from Mesa's NAK (sm70_encode.rs, MIT) and CuAssembler's sm_86 records.