summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/freedreno_program.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2013-04-25 11:17:02 -0400
committerRob Clark <[email protected]>2013-04-25 15:10:56 -0400
commitf706d4d340f0778de23062ef13c54b07bfac7967 (patch)
tree15599da1cd1a0ce00b310992faebbdf4547967e3 /src/gallium/drivers/freedreno/freedreno_program.c
parent578987ce1c17d17cfa538eb70d07a751fda55eb1 (diff)
freedreno: don't patch and re-emit same shader as much
New textures or vertex buffers don't always require patching and re-emitting the shaders. So do a better job of figuring out when we actually have to patch the shader. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/freedreno_program.c')
-rw-r--r--src/gallium/drivers/freedreno/freedreno_program.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gallium/drivers/freedreno/freedreno_program.c b/src/gallium/drivers/freedreno/freedreno_program.c
index 3857a1cfe17..7605e82d877 100644
--- a/src/gallium/drivers/freedreno/freedreno_program.c
+++ b/src/gallium/drivers/freedreno/freedreno_program.c
@@ -275,11 +275,11 @@ fd_program_validate(struct fd_context *ctx)
prog->dirty = 0;
/* if necessary, fix up vertex fetch instructions: */
- if (ctx->dirty & (FD_DIRTY_VTX | FD_DIRTY_VERTEXBUF | FD_DIRTY_PROG))
+ if (ctx->dirty & (FD_DIRTY_VTXSTATE | FD_DIRTY_PROG))
patch_vtx_fetches(ctx, prog->vp, ctx->vtx);
/* if necessary, fix up texture fetch instructions: */
- if (ctx->dirty & (FD_DIRTY_VERTTEX | FD_DIRTY_FRAGTEX | FD_DIRTY_PROG)) {
+ if (ctx->dirty & (FD_DIRTY_TEXSTATE | FD_DIRTY_PROG)) {
patch_tex_fetches(ctx, prog->vp, &ctx->verttex);
patch_tex_fetches(ctx, prog->fp, &ctx->fragtex);
}
@@ -400,9 +400,7 @@ create_blit_vp(void)
ir2_reg_create(instr, 1, NULL, 0);
ir2_reg_create(instr, 1, NULL, 0);
-
return assemble(so);
-
}
/* Creates shader: