pan/bi: Add XML for LD_BUFFER

Encoded like LOAD.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13802>
This commit is contained in:
Alyssa Rosenzweig 2021-11-07 19:51:19 -05:00 committed by Marge Bot
parent 69ddbc4341
commit e346ca5b41
3 changed files with 144 additions and 1 deletions

View file

@ -741,6 +741,142 @@
<imm name="unk2" start="16" size="4"/>
</ins>
<ins name="LD_BUFFER.i8" title="Global memory load" opcode="0x6a" opcode2="0" unit="LS">
<desc>
Loads a buffer descriptor. If bits 25...31 of the mode descriptor are
all-ones, load from the buffer descriptors in the table indexed by the
bottom byte of the mode descriptor. If they are all zeroes, load the
contents of the buffer in the first table indexed by the bottom byte of
the mode descriptor.
</desc>
<sr write="true"/>
<sr_count/>
<mod name="load_lane_8_bit" start="36" size="3"/>
<mod name="unsigned" start="39" size="1"/>
<slot/>
<src>Address to load from after adding offset</src>
<src>Mode descriptor</src>
</ins>
<ins name="LD_BUFFER.i16" title="Global memory load" opcode="0x6a" opcode2="1" unit="LS">
<desc>
Loads a buffer descriptor. If bits 25...31 of the mode descriptor are
all-ones, load from the buffer descriptors in the table indexed by the
bottom byte of the mode descriptor. If they are all zeroes, load the
contents of the buffer in the first table indexed by the bottom byte of
the mode descriptor.
</desc>
<sr write="true"/>
<sr_count/>
<mod name="load_lane_16_bit" start="36" size="3"/>
<mod name="unsigned" start="39" size="1"/>
<slot/>
<src>Byte offset</src>
<src>Mode descriptor</src>
</ins>
<ins name="LD_BUFFER.i24" title="Global memory load" opcode="0x6a" opcode2="2" unit="LS">
<desc>
Loads a buffer descriptor. If bits 25...31 of the mode descriptor are
all-ones, load from the buffer descriptors in the table indexed by the
bottom byte of the mode descriptor. If they are all zeroes, load the
contents of the buffer in the first table indexed by the bottom byte of
the mode descriptor.
</desc>
<sr write="true"/>
<sr_count/>
<mod name="load_lane_24_bit" start="36" size="3"/>
<mod name="unsigned" start="39" size="1"/>
<slot/>
<src>Byte offset</src>
<src>Mode descriptor</src>
</ins>
<ins name="LD_BUFFER.i32" title="Global memory load" opcode="0x6a" opcode2="3" unit="LS">
<desc>
Loads a buffer descriptor. If bits 25...31 of the mode descriptor are
all-ones, load from the buffer descriptors in the table indexed by the
bottom byte of the mode descriptor. If they are all zeroes, load the
contents of the buffer in the first table indexed by the bottom byte of
the mode descriptor.
</desc>
<sr write="true"/>
<sr_count/>
<mod name="load_lane_32_bit" start="36" size="3"/>
<mod name="unsigned" start="39" size="1"/>
<slot/>
<src>Byte offset</src>
<src>Mode descriptor</src>
</ins>
<ins name="LD_BUFFER.i48" title="Global memory load" opcode="0x6a" opcode2="4" unit="LS">
<desc>
Loads a buffer descriptor. If bits 25...31 of the mode descriptor are
all-ones, load from the buffer descriptors in the table indexed by the
bottom byte of the mode descriptor. If they are all zeroes, load the
contents of the buffer in the first table indexed by the bottom byte of
the mode descriptor.
</desc>
<sr write="true"/>
<sr_count/>
<mod name="load_lane_48_bit" start="36" size="3"/>
<mod name="unsigned" start="39" size="1"/>
<slot/>
<src>Byte offset</src>
<src>Mode descriptor</src>
</ins>
<ins name="LD_BUFFER.i64" title="Global memory load" opcode="0x6a" opcode2="5" unit="LS">
<desc>
Loads a buffer descriptor. If bits 25...31 of the mode descriptor are
all-ones, load from the buffer descriptors in the table indexed by the
bottom byte of the mode descriptor. If they are all zeroes, load the
contents of the buffer in the first table indexed by the bottom byte of
the mode descriptor.
</desc>
<sr write="true"/>
<sr_count/>
<mod name="load_lane_64_bit" start="36" size="3"/>
<mod name="unsigned" start="39" size="1"/>
<slot/>
<src>Byte offset</src>
<src>Mode descriptor</src>
</ins>
<ins name="LD_BUFFER.i96" title="Global memory load" opcode="0x6a" opcode2="6" unit="LS">
<desc>
Loads a buffer descriptor. If bits 25...31 of the mode descriptor are
all-ones, load from the buffer descriptors in the table indexed by the
bottom byte of the mode descriptor. If they are all zeroes, load the
contents of the buffer in the first table indexed by the bottom byte of
the mode descriptor.
</desc>
<sr write="true"/>
<sr_count/>
<mod name="load_lane_96_bit" start="36" size="3"/>
<mod name="unsigned" start="39" size="1"/>
<slot/>
<src>Byte offset</src>
<src>Mode descriptor</src>
</ins>
<ins name="LD_BUFFER.i128" title="Global memory load" opcode="0x6a" opcode2="7" unit="LS">
<desc>
Loads a buffer descriptor. If bits 25...31 of the mode descriptor are
all-ones, load from the buffer descriptors in the table indexed by the
bottom byte of the mode descriptor. If they are all zeroes, load the
contents of the buffer in the first table indexed by the bottom byte of
the mode descriptor.
</desc>
<sr write="true"/>
<sr_count/>
<mod name="load_lane_128_bit" start="36" size="3"/>
<mod name="unsigned" start="39" size="1"/>
<slot/>
<src>Byte offset</src>
<src>Mode descriptor</src>
</ins>
<ins name="LD_ATTR" title="Load indirect attribute" opcode="0x76" unit="LS">
<!-- TODO: for some reason, blob is using index (1<<24)|x for [x] -->
<desc>The index must not diverge within a warp.</desc>

View file

@ -112,3 +112,10 @@ c0 01 00 00 00 c4 10 51 IADD_IMM.i32.reconverge r4, 0x0, #0x1
44 00 46 36 28 40 71 78 ST_CVT.v4.u32.slot0.return @r0:r1:r2:r3, `r4, r0, `r6, unk:0x2
7c c0 12 00 26 84 67 00 LEA_IMAGE_IMM.slot0 @r4:r5:r6, `r60, 0x0, unk:0x2, index:0x1, unk2:0x2
7c c0 02 00 26 84 67 00 LEA_IMAGE_IMM.slot0 @r4:r5:r6, `r60, 0x0, unk:0x2, index:0x0, unk2:0x2
82 81 00 28 f4 82 6a 00 LD_BUFFER.i64.unsigned.slot0 @r2:r3, u2, u1
80 81 00 68 f4 80 6a 00 LD_BUFFER.i64.unsigned.slot1 @r0:r1, u0, u1
84 81 00 a8 f4 a6 6a 00 LD_BUFFER.i64.unsigned.slot2 @r38:r39, u4, u1
83 81 00 a8 f4 a4 6a 00 LD_BUFFER.i64.unsigned.slot2 @r36:r37, u3, u1
83 84 00 28 f4 82 6a 00 LD_BUFFER.i64.unsigned.slot0 @r2:r3, u3, u4
41 82 00 30 e6 82 6a 00 LD_BUFFER.i96.unsigned.slot0 @r2:r3:r4, `r1, u2
40 83 00 30 e6 86 6a 08 LD_BUFFER.i96.unsigned.slot0.wait0 @r6:r7:r8, `r0, u3

View file

@ -188,7 +188,7 @@ class Instruction:
if opcode == 0x90:
# XXX: XMLify this, but disambiguates sign of conversions
self.secondary_mask |= 0x10
if name.startswith("LOAD.i") or name.startswith("STORE.i"):
if name.startswith("LOAD.i") or name.startswith("STORE.i") or name.startswith("LD_BUFFER.i"):
self.secondary_shift = 27 # Alias with memory_size
self.secondary_mask = 0x7