diff options
author | Eric Anholt <[email protected]> | 2020-04-13 14:03:54 -0700 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-04-13 22:50:58 +0000 |
commit | 9ce4db6231462998f9426c74681a464bda928842 (patch) | |
tree | e392e1a338359d5ae531b9f72b28674abcbc51ae | |
parent | 2513d0257c7698b1686fe26aa5db8b7b2969d845 (diff) |
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 <single shader_test>. 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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4538>
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_program.c | 14 |
1 files changed, 13 insertions, 1 deletions
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); |