vc4: Report to shader-db how many threads a fragment shader has.
authorEric Anholt <eric@anholt.net>
Sat, 4 Mar 2017 00:37:50 +0000 (16:37 -0800)
committerEric Anholt <eric@anholt.net>
Wed, 8 Mar 2017 21:44:17 +0000 (13:44 -0800)
Doing instruction count analysis when we emit the thread switches that
will save us from tons of stalls is kind of missing the point.

src/gallium/drivers/vc4/vc4_program.c

index 2c9447fa023f370e6ab979b4900bbac22b6f4978..3708b1bbb51f0c40dc78bada6cd298ed19272f5a 100644 (file)
@@ -2643,6 +2643,13 @@ vc4_get_compiled_shader(struct vc4_context *vc4, enum qstage stage,
                 }
         }
 
+        if ((vc4_debug & VC4_DEBUG_SHADERDB) && stage == QSTAGE_FRAG) {
+                fprintf(stderr, "SHADER-DB: %s prog %d/%d: %d FS threads\n",
+                        qir_get_stage_name(c->stage),
+                        c->program_id, c->variant_id,
+                        1 + shader->fs_threaded);
+        }
+
         qir_compile_destroy(c);
 
         struct vc4_key *dup_key;