diff options
author | Eric Anholt <[email protected]> | 2014-06-28 14:36:26 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2014-08-08 18:59:46 -0700 |
commit | 21db43021041e8dedc45bb232c10ece83fd09dd1 (patch) | |
tree | 692af36222549b888feb35b303848b4f23b1f2e9 /src/gallium/drivers/vc4/vc4_screen.c | |
parent | 2e35981d4d625d951328ef5b8f95798112997fb3 (diff) |
vc4: Add VC4_DEBUG env option
v2: Fix an accidental deletion of some characters from the copyright
message (caught by Ilia Mirkin)
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_screen.c')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_screen.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/gallium/drivers/vc4/vc4_screen.c b/src/gallium/drivers/vc4/vc4_screen.c index 7c7ed4ca6eb..59ac1e2a8c1 100644 --- a/src/gallium/drivers/vc4/vc4_screen.c +++ b/src/gallium/drivers/vc4/vc4_screen.c @@ -37,9 +37,25 @@ #include "vc4_resource.h" static const struct debug_named_value debug_options[] = { - {"cl", VC4_DBG_CL, "Dump command list during creation"}, + { "cl", VC4_DEBUG_CL, + "Dump command list during creation" }, + { "qpu", VC4_DEBUG_QPU, + "Dump generated QPU instructions" }, + { "qir", VC4_DEBUG_QIR, + "Dump QPU IR during program compile" }, + { "tgsi", VC4_DEBUG_TGSI, + "Dump TGSI during program compile" }, + { "shaderdb", VC4_DEBUG_SHADERDB, + "Dump program compile information for shader-db analysis" }, + { "perf", VC4_DEBUG_PERF, + "Print during performance-related events" }, + { "norast", VC4_DEBUG_NORAST, + "Skip actual hardware execution of commands" }, }; +DEBUG_GET_ONCE_FLAGS_OPTION(vc4_debug, "VC4_DEBUG", debug_options, 0) +uint32_t vc4_debug; + static const char * vc4_screen_get_name(struct pipe_screen *pscreen) { @@ -381,6 +397,10 @@ vc4_screen_create(int fd) screen->fd = fd; + vc4_debug = debug_get_option_vc4_debug(); + if (vc4_debug & VC4_DEBUG_SHADERDB) + vc4_debug |= VC4_DEBUG_NORAST; + #if USE_VC4_SIMULATOR vc4_simulator_init(screen); #endif |