nvc0: dump program binary only when NV50_PROG_DEBUG is set
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 6 Oct 2016 22:43:51 +0000 (00:43 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 6 Oct 2016 23:01:17 +0000 (01:01 +0200)
When the chipset is forced with NV50_PROG_CHIPSET, we actually
only want to output the binary if NV50_PROG_DEBUG is also
enabled. Otherwise, this pollutes the shader-db output.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
src/gallium/drivers/nouveau/nvc0/nvc0_program.c

index 03cda0e..f52cbd2 100644 (file)
@@ -677,7 +677,7 @@ nvc0_program_translate(struct nvc0_program *prog, uint16_t chipset,
                       info->bin.instructions, info->bin.codeSize);
 
 #ifdef DEBUG
-   if (debug_get_option("NV50_PROG_CHIPSET", NULL))
+   if (debug_get_option("NV50_PROG_CHIPSET", NULL) && info->dbgFlags)
       nvc0_program_dump(prog);
 #endif