pan/genxml: Make resource table optional on RUN_COMPUTE{_INDIRECT}

We already do that for RUN_IDVS, we should do the same here.

Signed-off-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Olivia Lee <olivia.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36131>
This commit is contained in:
Mary Guillemard 2025-03-17 17:37:46 +01:00 committed by Marge Bot
parent 455b93601a
commit f1a469cce1
2 changed files with 20 additions and 25 deletions

View file

@ -634,6 +634,9 @@ void
GENX(pandecode_resource_tables)(struct pandecode_context *ctx, uint64_t addr,
const char *label)
{
if (!addr)
return;
unsigned count = addr & 0x3F;
addr = addr & ~0x3F;
@ -672,8 +675,7 @@ GENX(pandecode_shader_environment)(struct pandecode_context *ctx,
if (p->shader)
GENX(pandecode_shader)(ctx, p->shader, "Shader", gpu_id);
if (p->resources)
GENX(pandecode_resource_tables)(ctx, p->resources, "Resources");
GENX(pandecode_resource_tables)(ctx, p->resources, "Resources");
if (p->thread_storage)
DUMP_ADDR(ctx, LOCAL_STORAGE, p->thread_storage, "Local Storage:\n");
@ -714,9 +716,8 @@ GENX(pandecode_dcd)(struct pandecode_context *ctx, const struct MALI_DRAW *p,
if (p->vertex_shader)
GENX(pandecode_shader)(ctx, p->vertex_shader, "Vertex Shader", gpu_id);
if (p->vertex_resources)
GENX(pandecode_resource_tables)(ctx, p->vertex_resources,
"Vertex Resources");
GENX(pandecode_resource_tables)(ctx, p->vertex_resources,
"Vertex Resources");
if (p->vertex_fau.pointer)
GENX(pandecode_fau)(ctx, p->vertex_fau.pointer, p->vertex_fau.count,
@ -726,9 +727,8 @@ GENX(pandecode_dcd)(struct pandecode_context *ctx, const struct MALI_DRAW *p,
GENX(pandecode_shader)(ctx, p->fragment_shader, "Fragment Shader",
gpu_id);
if (p->fragment_resources)
GENX(pandecode_resource_tables)(ctx, p->fragment_resources,
"Fragment Resources");
GENX(pandecode_resource_tables)(ctx, p->fragment_resources,
"Fragment Resources");
if (p->fragment_fau.pointer)
GENX(pandecode_fau)(ctx, p->fragment_fau.pointer, p->fragment_fau.count,

View file

@ -656,7 +656,9 @@ pandecode_run_compute(struct pandecode_context *ctx, FILE *fp,
unsigned reg_spd = 16 + (I->spd_select * 2);
unsigned reg_tsd = 24 + (I->tsd_select * 2);
GENX(pandecode_resource_tables)(ctx, cs_get_u64(qctx, reg_srt), "Resources");
uint64_t compute_srt = cs_get_u64(qctx, reg_srt);
GENX(pandecode_resource_tables)(ctx, compute_srt, "Resources");
uint64_t fau = cs_get_u64(qctx, reg_fau);
@ -696,7 +698,9 @@ pandecode_run_compute_indirect(struct pandecode_context *ctx, FILE *fp,
unsigned reg_spd = 16 + (I->spd_select * 2);
unsigned reg_tsd = 24 + (I->tsd_select * 2);
GENX(pandecode_resource_tables)(ctx, cs_get_u64(qctx, reg_srt), "Resources");
uint64_t compute_srt = cs_get_u64(qctx, reg_srt);
GENX(pandecode_resource_tables)(ctx, compute_srt, "Resources");
uint64_t fau = cs_get_u64(qctx, reg_fau);
@ -747,8 +751,7 @@ pandecode_run_tiling(struct pandecode_context *ctx, FILE *fp,
uint64_t spd = cs_get_u64(qctx, reg_spd);
uint64_t tsd = cs_get_u64(qctx, reg_tsd);
if (srt)
GENX(pandecode_resource_tables)(ctx, srt, "Fragment resources");
GENX(pandecode_resource_tables)(ctx, srt, "Fragment resources");
if (fau) {
uint64_t lo = fau & BITFIELD64_MASK(48);
@ -847,11 +850,8 @@ pandecode_run_idvs2(struct pandecode_context *ctx, FILE *fp,
};
pan_unpack(&tiler_flags_packed, PRIMITIVE_FLAGS, tiler_flags);
if (vert_srt)
GENX(pandecode_resource_tables)(ctx, vert_srt, "Vertex resources");
if (frag_srt)
GENX(pandecode_resource_tables)(ctx, frag_srt, "Fragment resources");
GENX(pandecode_resource_tables)(ctx, vert_srt, "Vertex resources");
GENX(pandecode_resource_tables)(ctx, frag_srt, "Fragment resources");
if (vert_fau) {
uint64_t lo = vert_fau & BITFIELD64_MASK(48);
@ -971,14 +971,9 @@ pandecode_run_idvs(struct pandecode_context *ctx, FILE *fp,
uint64_t vary_srt = cs_get_u64(qctx, reg_vary_srt);
uint64_t frag_srt = cs_get_u64(qctx, reg_frag_srt);
if (position_srt)
GENX(pandecode_resource_tables)(ctx, position_srt, "Position resources");
if (vary_srt)
GENX(pandecode_resource_tables)(ctx, vary_srt, "Varying resources");
if (frag_srt)
GENX(pandecode_resource_tables)(ctx, frag_srt, "Fragment resources");
GENX(pandecode_resource_tables)(ctx, position_srt, "Position resources");
GENX(pandecode_resource_tables)(ctx, vary_srt, "Varying resources");
GENX(pandecode_resource_tables)(ctx, frag_srt, "Fragment resources");
uint64_t position_fau = cs_get_u64(qctx, reg_position_fau);
uint64_t vary_fau = cs_get_u64(qctx, reg_vary_fau);