IPA (uniform index)

Attributes and the stage's own memory

fixed bit field field the encoding fixes should be

Encoding

12712612512412312212112011911811711611511411311211111010910810710610510410310210110099989796
reusewaitrd_barwr_baryieldstall
9594939291908988878685848382818079787776757473727170696867666564
[91]freqlocat
6362616059585756555453525150494847464544434241403938373635343332
[39:32]
313029282726252423222120191817161514131211109876543210
atRdpred.notpred010100100110

bits 15:0: ---- 0101 0010 0110

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

Runs execute_IPA_U.

Fields

FieldBitsFrom
reuse125:122the decoder
wait121:116the decoder
rd_bar115:113the decoder
wr_bar112:110the decoder
yield109the decoder
stall108:105the decoder
[91]91execute_IPA_U
freq79:78execute_IPA_U
loc77:76execute_IPA_U
at71:64execute_IPA_U
[39:32]39:32execute_IPA_U
at29:24execute_IPA_U
Rd23:16the decoder
pred.not15the decoder
pred14:12the decoder

Operation Sail

IPA R, a[UR + addr]: the form with bit 91 and the uniform register at 24, which ptxas gives an input array's index. The index is the same in every lane: the generic input whose address the sum is, of those the SPH's imap reads, picked by its address (0 for none). The rest is IPA's

let loc = UInt(Field(76, 2));
let freq = UInt(Field(78, 2));
if Field(91, 1) != 0b1 | UInt(Field(32, 8)) != RZ | freq > 1 | loc > 1 then
    throw(Unsupported("IPA with a uniform index, at an offset or of frequency %u", freq));
let at = U_read(UInt(Field(24, 6))) + to_bits(32, UInt(Field(64, 8)) * 4);
var v : bits(32) = 0x00000000;
foreach (i from 0 to 31) {
    foreach (k from 0 to 3) {
        if ImapReads(i, k) then {
            let is = at == to_bits(32, 128 + 16 * i + 4 * k);
            let x = Bits32(IpaInput(i, k, loc, freq));
            v = if is then x else v
        }
    }
};
R_write(Dst(), v)

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.