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:
committed by
Marge Bot
parent
871f3d3f7d
commit
42084d50e5
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user