asahi: Identify "set depth bias index" field

Grouped together with the "set scissor index" field, which is natural.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
This commit is contained in:
Alyssa Rosenzweig 2022-04-02 15:17:52 -04:00
parent ff84c07b21
commit 7a0c220401
3 changed files with 12 additions and 8 deletions

View File

@ -363,10 +363,11 @@
<field name="Varying count" size="32" start="3:0" type="uint"/>
</struct>
<!-- Indexes into the array of scissor descriptors -->
<struct name="Set scissor" size="8">
<!-- Indexes into the scissor and depth bias arrays -->
<struct name="Set index" size="8">
<field name="Tag" size="32" start="0:0" type="hex" default="0x100"/>
<field name="Index" size="32" start="1:0" type="uint"/>
<field name="Scissor" size="16" start="1:0" type="uint"/>
<field name="Depth bias" size="16" start="1:16" type="uint"/>
</struct>
<!--- Commands valid within a pipeline -->

View File

@ -356,6 +356,9 @@ agxdecode_record(uint64_t va, size_t size, bool verbose)
} else if (tag == 0x200000) {
assert(size == AGX_CULL_LENGTH);
DUMP_CL(CULL, map, "Cull");
} else if (tag == 0x000100) {
assert(size == AGX_SET_INDEX_LENGTH);
DUMP_CL(SET_INDEX, map, "Set index");
} else if (tag == 0x800000) {
assert(size == (AGX_BIND_PIPELINE_LENGTH - 4));

View File

@ -1450,12 +1450,12 @@ demo_unk12(struct agx_pool *pool)
}
static uint64_t
agx_set_scissor_index(struct agx_pool *pool, unsigned index)
agx_set_index(struct agx_pool *pool, unsigned scissor)
{
struct agx_ptr T = agx_pool_alloc_aligned(pool, AGX_SET_SCISSOR_LENGTH, 64);
struct agx_ptr T = agx_pool_alloc_aligned(pool, AGX_SET_INDEX_LENGTH, 64);
agx_pack(T.cpu, SET_SCISSOR, cfg) {
cfg.index = index;
agx_pack(T.cpu, SET_INDEX, cfg) {
cfg.scissor = scissor;
};
return T.gpu;
@ -1508,7 +1508,7 @@ agx_encode_state(struct agx_context *ctx, uint8_t *out,
ctx->rast->base.scissor ? &ctx->scissor : NULL);
agx_push_record(&out, 10, vps.viewport);
agx_push_record(&out, 2, agx_set_scissor_index(pool, vps.scissor));
agx_push_record(&out, 2, agx_set_index(pool, vps.scissor));
}
agx_push_record(&out, 3, demo_unk12(pool));