[Mesa-dev] [PATCH 08/11] etnaviv: bring back shader-db traces
Lucas Stach
l.stach at pengutronix.de
Mon Mar 27 08:43:40 UTC 2017
Am Sonntag, den 26.03.2017, 16:13 +0200 schrieb Christian Gmeiner:
> 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 at gmail.com>
Reviewed-by: Lucas Stach <l.stach at pengutronix.de>
> ---
> src/gallium/drivers/etnaviv/etnaviv_shader.c | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/src/gallium/drivers/etnaviv/etnaviv_shader.c b/src/gallium/drivers/etnaviv/etnaviv_shader.c
> index a5f9315..b1cac02 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;
> }
>
More information about the mesa-dev
mailing list