mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 02:58:05 +02:00
agx: add parallel copy printing
useful for debugging. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27616>
This commit is contained in:
parent
871f3d3f7d
commit
42084d50e5
3 changed files with 23 additions and 1 deletions
|
|
@ -874,6 +874,7 @@ agx_builder_insert(agx_cursor *cursor, agx_instr *I)
|
|||
|
||||
/* Routines defined for AIR */
|
||||
|
||||
void agx_print_index(agx_index index, bool is_float, FILE *fp);
|
||||
void agx_print_instr(const agx_instr *I, FILE *fp);
|
||||
void agx_print_block(const agx_block *block, FILE *fp);
|
||||
void agx_print_shader(const agx_context *ctx, FILE *fp);
|
||||
|
|
|
|||
|
|
@ -7,6 +7,27 @@
|
|||
#include "agx_builder.h"
|
||||
#include "agx_compiler.h"
|
||||
|
||||
UNUSED static void
|
||||
print_copy(const struct agx_copy *cp)
|
||||
{
|
||||
printf("%sr%u = ", cp->dest_mem ? "m" : "", cp->dest);
|
||||
agx_print_index(cp->src, false, stdout);
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
UNUSED static void
|
||||
print_copies(const struct agx_copy *copies, unsigned nr)
|
||||
{
|
||||
printf("[\n");
|
||||
|
||||
for (unsigned i = 0; i < nr; ++i) {
|
||||
printf(" ");
|
||||
print_copy(&copies[i]);
|
||||
}
|
||||
|
||||
printf("]\n");
|
||||
}
|
||||
|
||||
/*
|
||||
* Emits code for
|
||||
*
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ agx_print_sized(char prefix, unsigned value, enum agx_size size, FILE *fp)
|
|||
unreachable("Invalid size");
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
agx_print_index(agx_index index, bool is_float, FILE *fp)
|
||||
{
|
||||
if (index.memory)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue