asahi: Correct bind fragment pipeline size

A number of structures encode their size, but we were ignoring it just
for this fragment pipeline bind. Fix that.

This fix might also apply to bind vertex pipeline. Unsure.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17198>
This commit is contained in:
Alyssa Rosenzweig 2022-05-23 12:32:37 -04:00
parent 651e4677ca
commit 034d52643c
2 changed files with 2 additions and 3 deletions

View file

@ -480,7 +480,7 @@
<field name="Unk 3" size="32" start="5:0" type="address"/> <!-- C020000 -->
</struct>
<struct name="Bind fragment pipeline" size="24">
<struct name="Bind fragment pipeline" size="20">
<field name="Tag" size="32" start="0:0" type="hex" default="0x800000"/>
<!-- 4 if more than 32 textures bound -->
<field name="Unk 1" size="4" start="1:0" type="hex" default="0x2"/>
@ -495,7 +495,6 @@
<field name="Varyings" size="32" start="3:0" type="address"/>
<field name="Padding 2" size="16" start="3:16" type="hex" default="0x0"/>
<field name="More than 4 textures" start="4:0" size="1" type="bool"/>
<field name="Unk 3" size="32" start="5:0" type="address"/> <!-- C020000 -->
</struct>
<!-- Subcommands are packed inside sized records -->

View file

@ -422,7 +422,7 @@ agxdecode_record(uint64_t va, size_t size, bool verbose)
assert(size == AGX_SET_INDEX_LENGTH);
DUMP_CL(SET_INDEX, map, "Set index");
} else if (tag == 0x800000) {
assert(size == (AGX_BIND_FRAGMENT_PIPELINE_LENGTH - 4));
assert(size == AGX_BIND_FRAGMENT_PIPELINE_LENGTH);
agx_unpack(agxdecode_dump_stream, map, BIND_FRAGMENT_PIPELINE, cmd);
agxdecode_stateful(cmd.pipeline, "Pipeline", agxdecode_pipeline, verbose);