nvc0: dump program binary when chipset has been forced
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Sun, 2 Oct 2016 14:59:10 +0000 (16:59 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 5 Oct 2016 19:15:44 +0000 (21:15 +0200)
Currently, program binaries are only dumped at upload time, but
when the chipset has been forced via NV50_PROG_CHIPSET we might
want to show the generated code, especially with shaderdb.

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

index e0586304b94b52f7dcae78f4b2157e38e33628c4..03cda0e72d636978dcf767b27af088069c3df38e 100644 (file)
@@ -676,6 +676,11 @@ nvc0_program_translate(struct nvc0_program *prog, uint16_t chipset,
                       prog->type, info->bin.tlsSpace, prog->num_gprs,
                       info->bin.instructions, info->bin.codeSize);
 
+#ifdef DEBUG
+   if (debug_get_option("NV50_PROG_CHIPSET", NULL))
+      nvc0_program_dump(prog);
+#endif
+
 out:
    FREE(info);
    return !ret;