mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-15 02:00:33 +01:00
intel/decoder: Dump Task/Mesh shaders
Signed-off-by: Marcin Ślusarz <marcin.slusarz@intel.com> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Acked-by: Jordan Justen <jordan.l.justen@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13657>
This commit is contained in:
parent
3567d47f3e
commit
bba26939b1
1 changed files with 34 additions and 0 deletions
|
|
@ -610,6 +610,38 @@ decode_single_ksp(struct intel_batch_decode_ctx *ctx, const uint32_t *p)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
decode_mesh_task_ksp(struct intel_batch_decode_ctx *ctx, const uint32_t *p)
|
||||
{
|
||||
struct intel_group *inst = intel_ctx_find_instruction(ctx, p);
|
||||
|
||||
uint64_t ksp = 0;
|
||||
uint64_t local_x_maximum = 0;
|
||||
uint64_t threads = 0;
|
||||
|
||||
struct intel_field_iterator iter;
|
||||
intel_field_iterator_init(&iter, inst, p, 0, false);
|
||||
while (intel_field_iterator_next(&iter)) {
|
||||
if (strcmp(iter.name, "Kernel Start Pointer") == 0) {
|
||||
ksp = iter.raw_value;
|
||||
} else if (strcmp(iter.name, "Local X Maximum") == 0) {
|
||||
local_x_maximum = iter.raw_value;
|
||||
} else if (strcmp(iter.name, "Number of Threads in GPGPU Thread Group") == 0) {
|
||||
threads = iter.raw_value;
|
||||
}
|
||||
}
|
||||
|
||||
const char *type =
|
||||
strcmp(inst->name, "3DSTATE_MESH_SHADER") == 0 ? "mesh shader" :
|
||||
strcmp(inst->name, "3DSTATE_TASK_SHADER") == 0 ? "task shader" :
|
||||
NULL;
|
||||
|
||||
if (threads && local_x_maximum) {
|
||||
ctx_disassemble_program(ctx, ksp, type);
|
||||
fprintf(ctx->fp, "\n");
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
decode_ps_kern(struct intel_batch_decode_ctx *ctx,
|
||||
struct intel_group *inst, const uint32_t *p)
|
||||
|
|
@ -1309,6 +1341,8 @@ struct custom_decoder {
|
|||
{ "3DSTATE_HS", decode_single_ksp },
|
||||
{ "3DSTATE_PS", decode_ps_kernels },
|
||||
{ "3DSTATE_WM", decode_ps_kernels },
|
||||
{ "3DSTATE_MESH_SHADER", decode_mesh_task_ksp },
|
||||
{ "3DSTATE_TASK_SHADER", decode_mesh_task_ksp },
|
||||
{ "3DSTATE_CONSTANT_VS", decode_3dstate_constant },
|
||||
{ "3DSTATE_CONSTANT_GS", decode_3dstate_constant },
|
||||
{ "3DSTATE_CONSTANT_PS", decode_3dstate_constant },
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue