From 7bbef4002cc812ba4acfb114bac1b49fc2579c46 Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Fri, 2 Jun 2023 16:55:58 +0200 Subject: [PATCH] etnaviv: move printing of final shader out of etna_link_shaders(..) Printing the final shaders in etna_link_shaders(..) can be quite noisy and does not work when using shader-db. Lets make it possible to stare at the generaded shader code when using shader-db by moving the etna_dump_shader(..) call into create_variant(..). Signed-off-by: Christian Gmeiner Reviewed-by: Lucas Stach Part-of: --- src/gallium/drivers/etnaviv/etnaviv_shader.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/gallium/drivers/etnaviv/etnaviv_shader.c b/src/gallium/drivers/etnaviv/etnaviv_shader.c index 017bf83..721624a 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_shader.c +++ b/src/gallium/drivers/etnaviv/etnaviv_shader.c @@ -126,13 +126,6 @@ etna_link_shaders(struct etna_context *ctx, struct compiled_shader_state *cs, assert(vs->stage == MESA_SHADER_VERTEX); assert(fs->stage == MESA_SHADER_FRAGMENT); -#ifdef DEBUG - if (DBG_ENABLED(ETNA_DBG_DUMP_SHADERS)) { - etna_dump_shader(vs); - etna_dump_shader(fs); - } -#endif - failed = etna_link_shader(&link, vs, fs); if (failed) { @@ -425,6 +418,11 @@ create_variant(struct etna_shader *shader, etna_disk_cache_store(shader->compiler, v); +#ifdef DEBUG + if (DBG_ENABLED(ETNA_DBG_DUMP_SHADERS)) + etna_dump_shader(v); +#endif + return v; fail: -- 2.7.4