agx: Add uniform_store instruction

Moves data from GPRs to uniform registers. Encoded like load/store
instructions, so reuse the device_load packing code.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18813>
This commit is contained in:
Alyssa Rosenzweig
2022-09-25 20:08:20 -04:00
parent ca4fe9d3f5
commit 05009d1dad
3 changed files with 38 additions and 13 deletions

View File

@@ -224,6 +224,12 @@ op("device_load",
encoding_32 = (0x05, 0x7F, 6, 8),
srcs = 2, imms = [FORMAT, MASK, SCOREBOARD])
# sources are value, index
# TODO: Consider permitting the short form
op("uniform_store",
encoding_32 = ((0b111 << 27) | 0b1000101 | (1 << 47), 0, 8, _),
dests = 0, srcs = 2, can_eliminate = False)
op("wait", (0x38, 0xFF, 2, _), dests = 0,
can_eliminate = False, imms = [SCOREBOARD])