diff options
author | Jonathan Marek <[email protected]> | 2018-12-18 20:15:57 -0500 |
---|---|---|
committer | Rob Clark <[email protected]> | 2019-01-22 14:45:03 +0000 |
commit | 67610a0323ddfe0d7cced121abb43286b862b495 (patch) | |
tree | 994887050ff640f4c2db9f56ec55688d2f1412a4 /src/gallium/drivers/freedreno/freedreno_program.c | |
parent | da3ca69afadb142c1591c75c2bfd345c8d4337de (diff) |
freedreno: a2xx: NIR backend
This patch replaces the a2xx TGSI compiler with a NIR compiler.
It also adds several new features:
-gl_FrontFacing, gl_FragCoord, gl_PointCoord, gl_PointSize
-control flow (including loops)
-texture related features (LOD/bias, cubemaps)
-filling scalar ALU slot when possible
Signed-off-by: Jonathan Marek <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_program.c')
-rw-r--r-- | src/gallium/drivers/freedreno/freedreno_program.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_program.c b/src/gallium/drivers/freedreno/freedreno_program.c index 989ccd1838f..3fa09ce0c48 100644 --- a/src/gallium/drivers/freedreno/freedreno_program.c +++ b/src/gallium/drivers/freedreno/freedreno_program.c @@ -129,15 +129,14 @@ void fd_prog_init(struct pipe_context *pctx) pctx->bind_fs_state = fd_fp_state_bind; pctx->bind_vs_state = fd_vp_state_bind; - // XXX for now, let a2xx keep it's own hand-rolled shaders - // for solid and blit progs: - if (ctx->screen->gpu_id < 300) - return; - ctx->solid_prog.fp = assemble_tgsi(pctx, solid_fp, true); ctx->solid_prog.vp = assemble_tgsi(pctx, solid_vp, false); ctx->blit_prog[0].vp = assemble_tgsi(pctx, blit_vp, false); ctx->blit_prog[0].fp = fd_prog_blit(pctx, 1, false); + + if (ctx->screen->gpu_id < 300) + return; + for (i = 1; i < ctx->screen->max_rts; i++) { ctx->blit_prog[i].vp = ctx->blit_prog[0].vp; ctx->blit_prog[i].fp = fd_prog_blit(pctx, i + 1, false); |