From 2d6a889e8b786cd76d6711627c10be50615c2b62 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Sun, 9 Aug 2015 09:03:25 -0400 Subject: freedreno/a4xx: fix vpsrepl for blit shaders Signed-off-by: Rob Clark --- src/gallium/drivers/freedreno/a4xx/fd4_program.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'src/gallium/drivers/freedreno/a4xx') diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_program.c b/src/gallium/drivers/freedreno/a4xx/fd4_program.c index c7a6dffea7b..fdfdee55123 100644 --- a/src/gallium/drivers/freedreno/a4xx/fd4_program.c +++ b/src/gallium/drivers/freedreno/a4xx/fd4_program.c @@ -537,16 +537,25 @@ fd4_program_emit(struct fd_ringbuffer *ring, struct fd4_emit *emit, /* hack.. until we figure out how to deal w/ vpsrepl properly.. */ static void -fix_blit_fp(struct pipe_context *pctx) +fix_blit_fp(struct fd4_shader_stateobj *so) { - struct fd_context *ctx = fd_context(pctx); - struct fd4_shader_stateobj *so = ctx->blit_prog[0].fp; - so->shader->vpsrepl[0] = 0x99999999; so->shader->vpsrepl[1] = 0x99999999; so->shader->vpsrepl[2] = 0x99999999; so->shader->vpsrepl[3] = 0x99999999; } +static void +fix_blit_fps(struct pipe_context *pctx) +{ + struct fd_context *ctx = fd_context(pctx); + int i; + + for (i = 0; i < ctx->screen->max_rts; i++) + fix_blit_fp(ctx->blit_prog[i].fp); + + fix_blit_fp(ctx->blit_z.fp); + fix_blit_fp(ctx->blit_zs.fp); +} void fd4_prog_init(struct pipe_context *pctx) @@ -559,5 +568,5 @@ fd4_prog_init(struct pipe_context *pctx) fd_prog_init(pctx); - fix_blit_fp(pctx); + fix_blit_fps(pctx); } -- cgit v1.2.3