pan/midg: Add a flag to dump internal shaders
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Alyssa Rosenzweig <alyssa@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11139>
This commit is contained in:

committed by
Marge Bot

parent
773bc1188b
commit
20b22efdcb
@@ -36,6 +36,7 @@
|
||||
#define MIDGARD_DBG_SHADERDB 0x0004
|
||||
#define MIDGARD_DBG_INORDER 0x0008
|
||||
#define MIDGARD_DBG_VERBOSE 0x0010
|
||||
#define MIDGARD_DBG_INTERNAL 0x0020
|
||||
|
||||
extern int midgard_debug;
|
||||
|
||||
|
@@ -60,6 +60,7 @@ static const struct debug_named_value midgard_debug_options[] = {
|
||||
{"shaderdb", MIDGARD_DBG_SHADERDB, "Prints shader-db statistics"},
|
||||
{"inorder", MIDGARD_DBG_INORDER, "Disables out-of-order scheduling"},
|
||||
{"verbose", MIDGARD_DBG_VERBOSE, "Dump shaders verbosely"},
|
||||
{"internal", MIDGARD_DBG_INTERNAL, "Dump internal shaders"},
|
||||
DEBUG_NAMED_VALUE_END
|
||||
};
|
||||
|
||||
@@ -3108,7 +3109,8 @@ midgard_compile_shader_nir(nir_shader *nir,
|
||||
|
||||
NIR_PASS_V(nir, pan_nir_reorder_writeout);
|
||||
|
||||
if ((midgard_debug & MIDGARD_DBG_SHADERS) && !nir->info.internal) {
|
||||
if ((midgard_debug & MIDGARD_DBG_SHADERS) &&
|
||||
((midgard_debug & MIDGARD_DBG_INTERNAL) || !nir->info.internal)) {
|
||||
nir_print_shader(nir, stdout);
|
||||
}
|
||||
|
||||
@@ -3228,7 +3230,8 @@ midgard_compile_shader_nir(nir_shader *nir,
|
||||
/* Report the very first tag executed */
|
||||
info->midgard.first_tag = midgard_get_first_tag_from_block(ctx, 0);
|
||||
|
||||
if ((midgard_debug & MIDGARD_DBG_SHADERS) && !nir->info.internal) {
|
||||
if ((midgard_debug & MIDGARD_DBG_SHADERS) &&
|
||||
((midgard_debug & MIDGARD_DBG_INTERNAL) || !nir->info.internal)) {
|
||||
disassemble_midgard(stdout, binary->data,
|
||||
binary->size, inputs->gpu_id,
|
||||
midgard_debug & MIDGARD_DBG_VERBOSE);
|
||||
|
Reference in New Issue
Block a user