etnaviv: bring back shader-db traces
authorChristian Gmeiner <christian.gmeiner@gmail.com>
Sun, 19 Mar 2017 21:22:18 +0000 (22:22 +0100)
committerChristian Gmeiner <christian.gmeiner@gmail.com>
Wed, 5 Apr 2017 17:58:13 +0000 (19:58 +0200)
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 <christian.gmeiner@gmail.com>
Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
src/gallium/drivers/etnaviv/etnaviv_shader.c

index f46e339ad7a14e235f239da1504f2fb892d6e6d5..21d475274aa90b370f34a6901ae025c757c94245 100644 (file)
@@ -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;
 }