pan/decode: Add helper to dump GPU structures
Based on generating unpack/print. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6195>
This commit is contained in:
committed by
Tomeu Vizoso
parent
88dc4c21e6
commit
d2ddd4d565
@@ -57,6 +57,19 @@ static void pandecode_swizzle(unsigned swizzle, enum mali_format format);
|
||||
} \
|
||||
}
|
||||
|
||||
#define DUMP_CL(title, T, cl, indent) {\
|
||||
fprintf(pandecode_dump_stream, "%s\n", title); \
|
||||
struct MALI_ ## T temp; \
|
||||
MALI_ ## T ## _unpack((const uint8_t *) cl, &temp); \
|
||||
MALI_ ## T ## _print(pandecode_dump_stream, &temp, 0); \
|
||||
}
|
||||
|
||||
#define DUMP_ADDR(title, T, addr, indent) {\
|
||||
struct pandecode_mapped_memory *mapped_mem = pandecode_find_mapped_gpu_mem_containing(addr); \
|
||||
const uint8_t *cl = pandecode_fetch_gpu_mem(mapped_mem, addr, MALI_ ## T ## _LENGTH); \
|
||||
DUMP_CL(title, T, cl, indent); \
|
||||
}
|
||||
|
||||
FILE *pandecode_dump_stream;
|
||||
|
||||
/* Semantic logging type.
|
||||
|
||||
Reference in New Issue
Block a user