summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2015-08-09 09:03:25 -0400
committerRob Clark <[email protected]>2015-08-10 07:12:54 -0400
commit2d6a889e8b786cd76d6711627c10be50615c2b62 (patch)
treeb58eab2b2c656e9d5ed7e316fa71e1dedea7947c
parentd2f669e6c72a16dede22f107c3b015ec0516bc56 (diff)
freedreno/a4xx: fix vpsrepl for blit shaders
Signed-off-by: Rob Clark <[email protected]>
-rw-r--r--src/gallium/drivers/freedreno/a4xx/fd4_program.c19
1 files changed, 14 insertions, 5 deletions
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);
}