From: Eric Anholt Date: Sat, 4 Mar 2017 00:37:50 +0000 (-0800) Subject: vc4: Report to shader-db how many threads a fragment shader has. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0fca01d0279c5794ae2aceee27668c974b586f87;p=mesa.git vc4: Report to shader-db how many threads a fragment shader has. Doing instruction count analysis when we emit the thread switches that will save us from tons of stalls is kind of missing the point. --- diff --git a/src/gallium/drivers/vc4/vc4_program.c b/src/gallium/drivers/vc4/vc4_program.c index 2c9447fa023..3708b1bbb51 100644 --- a/src/gallium/drivers/vc4/vc4_program.c +++ b/src/gallium/drivers/vc4/vc4_program.c @@ -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;