summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Gmeiner <[email protected]>2017-03-19 22:22:18 +0100
committerChristian Gmeiner <[email protected]>2017-04-05 19:58:13 +0200
commit20fa8f198996f7c1024bb121d89b6ac74aa21a20 (patch)
tree1ab110e865914df3597cc2fdadb115a38ad8a074
parent7d2a80626633b08a347aa11f85f4d96585958e6a (diff)
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 <[email protected]> Reviewed-by: Lucas Stach <[email protected]>
-rw-r--r--src/gallium/drivers/etnaviv/etnaviv_shader.c9
1 files changed, 9 insertions, 0 deletions
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;
}