Skip to content
This repository has been archived by the owner on Apr 4, 2022. It is now read-only.

Commit

Permalink
lib: Port register fields to extended set_shader
Browse files Browse the repository at this point in the history
Signed-off-by: Alyssa Rosenzweig <[email protected]>
  • Loading branch information
alyssarosenzweig committed Apr 12, 2021
1 parent f31255b commit 4f114e1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion demo/demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ demo_fsbuf(uint64_t *buf, struct agx_allocator *allocator, struct agx_allocation
/* Fragment shader */
buf[24] = demo_bind_arg_words(demo_zero(allocator, 8), 2, 2);
buf[25] = 0x2010bd4d | (0x50dull << 32) | ((uint64_t) (fs_offs & 0xFFFF) << 48);
buf[26] = (fs_offs >> 16) | (0x218d << 16) | (0xf3580100ull << 32);
buf[26] = (fs_offs >> 16) | (0x208d << 16) | (0xf3580100ull << 32);
buf[27] = 0x00880002 | (0xc080ull << 32);
buf[28] = 0;
buf[29] = 0;
Expand Down
10 changes: 7 additions & 3 deletions lib/cmdbuf.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@
<field name="Unk 2" size="16" start="1:0" type="hex" default="0x40d"/> <!-- TODO differs with stage -->
<field name="Code" size="32" start="1:16" type="address"/>
<field name="Unk 3" size="8" start="2:16" type="hex" default="0x8d"/>
<field name="Register quadwords" size="8" start="2:24" type="uint"/> <!-- 0 with spilling -->
<field name="Register quadwords" size="5" start="2:24" type="uint"/> <!-- 0 for max -->
<field name="Unk 3b" size="3" start="2:29" type="hex" default="0x0"/>
<field name="Spill size" size="8" start="3:0" type="hex" default="0"/> <!-- TODO: determine relation, see docs/table.py -->
<field name="Unk 4" size="12" start="3:8" type="hex" default="0x801"/>
<field name="Preshader mode" size="4" start="3:20" type="Preshader mode" default="No preshader"/>
Expand All @@ -86,9 +87,12 @@
<field name="Unk 1" size="24" start="0:8" type="hex" default="0x2010bd"/>
<field name="Unk 2" size="16" start="1:0" type="hex" default="0x50d"/>
<field name="Code" size="32" start="1:16" type="address"/>
<field name="Unk 3" size="16" start="2:16" type="hex" default="0x28d"/>
<field name="Unk 3" size="8" start="2:16" type="hex" default="0x28d"/>
<field name="Register quadwords" size="5" start="2:24" type="uint"/> <!-- 0 for max -->
<field name="Unk 3b" size="3" start="2:29" type="hex" default="0x0"/>
<field name="Frag unk" size="32" start="3:0" type="hex" default="0xf3580100"/>
<field name="Unk 4" size="20" start="4:0" type="hex" default="0x80100"/>
<field name="Spill size" size="8" start="4:0" type="hex" default="0"/> <!-- TODO: determine relation, see docs/table.py -->
<field name="Unk 4" size="12" start="4:8" type="hex" default="0x801"/>
<field name="Preshader mode" size="4" start="4:20" type="Preshader mode" default="No preshader"/>
<field name="Unk 6" size="8" start="4:24" type="hex" default="0x0"/>
<field name="Preshader unk" size="16" start="5:0" type="hex" default="0x0"/>
Expand Down

0 comments on commit 4f114e1

Please sign in to comment.