summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/a2xx
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2016-05-03 16:54:21 -0400
committerRob Clark <[email protected]>2016-05-04 11:25:55 -0400
commit291ac872a445f3edebd668b27e910a79e1de5a00 (patch)
treec4cefb296120ee62f1a9e61a29f1048c59818443 /src/gallium/drivers/freedreno/a2xx
parenta48cccacf3c7d655bbca42b51193100b43eeff6e (diff)
freedreno: move shader-stage dirty bits to global dirty flag
This was always a bit overly complicated, and had some issues (like ctx->prog.dirty not getting reset at the end of the batch). It also required some special hacks to avoid resetting dirty state on binning pass. So just move it all into ctx->dirty (leaving some free bits for future shader stages), and make FD_DIRTY_PROG just be the union of all FD_SHADER_DIRTY_*. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a2xx')
-rw-r--r--src/gallium/drivers/freedreno/a2xx/fd2_program.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/gallium/drivers/freedreno/a2xx/fd2_program.c b/src/gallium/drivers/freedreno/a2xx/fd2_program.c
index 5ccfd58bfe1..4f317721db0 100644
--- a/src/gallium/drivers/freedreno/a2xx/fd2_program.c
+++ b/src/gallium/drivers/freedreno/a2xx/fd2_program.c
@@ -247,15 +247,12 @@ fd2_program_validate(struct fd_context *ctx)
* from the vertex shader. And therefore if frag shader has changed we
* need to recompile both vert and frag shader.
*/
- if (prog->dirty & FD_SHADER_DIRTY_FP)
+ if (ctx->dirty & FD_SHADER_DIRTY_FP)
compile(prog, prog->fp);
- if (prog->dirty & (FD_SHADER_DIRTY_FP | FD_SHADER_DIRTY_VP))
+ if (ctx->dirty & (FD_SHADER_DIRTY_FP | FD_SHADER_DIRTY_VP))
compile(prog, prog->vp);
- if (prog->dirty)
- ctx->dirty |= FD_DIRTY_PROG;
-
/* if necessary, fix up vertex fetch instructions: */
if (ctx->dirty & (FD_DIRTY_VTXSTATE | FD_DIRTY_PROG))
patch_vtx_fetches(ctx, prog->vp, ctx->vtx.vtx);
@@ -292,8 +289,6 @@ fd2_program_emit(struct fd_ringbuffer *ring,
A2XX_SQ_PROGRAM_CNTL_VS_EXPORT_COUNT(vs_export) |
A2XX_SQ_PROGRAM_CNTL_PS_REGS(fs_gprs) |
A2XX_SQ_PROGRAM_CNTL_VS_REGS(vs_gprs));
-
- prog->dirty = 0;
}
/* Creates shader: