diff options
author | Marek Olšák <[email protected]> | 2013-03-01 16:31:49 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2013-03-11 13:43:36 +0100 |
commit | 4bf0ebdd4fc8dbcab9333ff8805af35a91e6848b (patch) | |
tree | d13a030d3fcbe39cbd80be796647bdc9ab86d462 /src/gallium/drivers/r600/evergreen_compute.h | |
parent | 2ca73bc7f7a2983556b132395c73739a01f167b5 (diff) |
r600g: use a single env var R600_DEBUG, disable bytecode dumping
Only the disassembler is used to dump shaders. Here's a few examples
how to use R600_DEBUG.
Log compute info:
R600_DEBUG=compute
Dump all shaders:
R600_DEBUG=fs,vs,gs,ps,cs
Dump pixel shaders only:
R600_DEBUG=ps
Disable Hyper-Z:
R600_DEBUG=nohyperz
Disable the LLVM backend:
R600_DEBUG=nollvm
Or use any combination of the above, or print all options:
R600_DEBUG=help
Reviewed-by: Tom Stellard <[email protected]>
Diffstat (limited to 'src/gallium/drivers/r600/evergreen_compute.h')
-rw-r--r-- | src/gallium/drivers/r600/evergreen_compute.h | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/src/gallium/drivers/r600/evergreen_compute.h b/src/gallium/drivers/r600/evergreen_compute.h index db57520a74c..69e41cc82aa 100644 --- a/src/gallium/drivers/r600/evergreen_compute.h +++ b/src/gallium/drivers/r600/evergreen_compute.h @@ -54,20 +54,16 @@ void r600_compute_global_transfer_inline_write( struct pipe_context *, struct pi unsigned usage, const struct pipe_box *, const void *data, unsigned stride, unsigned layer_stride); -static inline void COMPUTE_DBG(const char *fmt, ...) +static inline void COMPUTE_DBG(struct r600_screen *rscreen, const char *fmt, ...) { - static bool check_debug = false, debug = false; + if (!(rscreen->debug_flags & DBG_COMPUTE)) { + return; + } - if (!check_debug) { - debug = debug_get_bool_option("R600_COMPUTE_DEBUG", FALSE); - } - - if (debug) { - va_list ap; - va_start(ap, fmt); - _debug_vprintf(fmt, ap); - va_end(ap); - } + va_list ap; + va_start(ap, fmt); + _debug_vprintf(fmt, ap); + va_end(ap); } #endif |