From 0fca01d0279c5794ae2aceee27668c974b586f87 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 3 Mar 2017 16:37:50 -0800 Subject: [PATCH] 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. --- src/gallium/drivers/vc4/vc4_program.c | 7 +++++++ 1 file changed, 7 insertions(+) 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; -- 2.30.2