From 9ce4db6231462998f9426c74681a464bda928842 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Mon, 13 Apr 2020 14:03:54 -0700 Subject: [PATCH] freedreno/a5xx+: Skip compiling the old gmem blit programs. Saves a bunch of noise for me to sort through in IR3_SHADER_DEBUG=vs,fs shader-db/run . I found that we were crashing on destroy of NULL programs in fd_prog_fini, so I replicated the gpu_id < 300 early exit from fd_prog_init() down to _fini as well. Part-of: --- src/gallium/drivers/freedreno/freedreno_program.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/freedreno/freedreno_program.c b/src/gallium/drivers/freedreno/freedreno_program.c index deadb3d73a4..b84388aa4be 100644 --- a/src/gallium/drivers/freedreno/freedreno_program.c +++ b/src/gallium/drivers/freedreno/freedreno_program.c @@ -161,6 +161,10 @@ void fd_prog_init(struct pipe_context *pctx) ctx->solid_prog.fs = assemble_tgsi(pctx, solid_fs, true); ctx->solid_prog.vs = assemble_tgsi(pctx, solid_vs, false); + + if (ctx->screen->gpu_id >= 500) + return; + ctx->blit_prog[0].vs = assemble_tgsi(pctx, blit_vs, false); ctx->blit_prog[0].fs = fd_prog_blit(pctx, 1, false); @@ -185,8 +189,16 @@ void fd_prog_fini(struct pipe_context *pctx) pctx->delete_vs_state(pctx, ctx->solid_prog.vs); pctx->delete_fs_state(pctx, ctx->solid_prog.fs); + if (ctx->screen->gpu_id >= 500) + return; + pctx->delete_vs_state(pctx, ctx->blit_prog[0].vs); - for (i = 0; i < ctx->screen->max_rts; i++) + pctx->delete_fs_state(pctx, ctx->blit_prog[0].fs); + + if (ctx->screen->gpu_id < 300) + return; + + for (i = 1; i < ctx->screen->max_rts; i++) pctx->delete_fs_state(pctx, ctx->blit_prog[i].fs); pctx->delete_fs_state(pctx, ctx->blit_z.fs); pctx->delete_fs_state(pctx, ctx->blit_zs.fs); -- 2.30.2