From: Christian Gmeiner Date: Sun, 19 Mar 2017 21:22:18 +0000 (+0100) Subject: etnaviv: bring back shader-db traces X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=20fa8f198996f7c1024bb121d89b6ac74aa21a20;p=mesa.git etnaviv: bring back shader-db traces If shader-db run, create a standard variant immediately (as otherwise nothing will trigger the shader to be actually compiled). Signed-off-by: Christian Gmeiner Reviewed-by: Lucas Stach --- diff --git a/src/gallium/drivers/etnaviv/etnaviv_shader.c b/src/gallium/drivers/etnaviv/etnaviv_shader.c index f46e339ad7a..21d475274aa 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_shader.c +++ b/src/gallium/drivers/etnaviv/etnaviv_shader.c @@ -330,6 +330,15 @@ etna_create_shader_state(struct pipe_context *pctx, shader->specs = &ctx->specs; shader->tokens = tgsi_dup_tokens(pss->tokens); + if (etna_mesa_debug & ETNA_DBG_SHADERDB) { + /* if shader-db run, create a standard variant immediately + * (as otherwise nothing will trigger the shader to be + * actually compiled). + */ + struct etna_shader_key key = {}; + etna_shader_variant(shader, key, &ctx->debug); + } + return shader; }