summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/a4xx
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/a4xx
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/a4xx')
-rw-r--r--src/gallium/drivers/freedreno/a4xx/fd4_draw.c16
-rw-r--r--src/gallium/drivers/freedreno/a4xx/fd4_emit.c5
2 files changed, 7 insertions, 14 deletions
diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_draw.c b/src/gallium/drivers/freedreno/a4xx/fd4_draw.c
index d49c529aab4..af02d31fb91 100644
--- a/src/gallium/drivers/freedreno/a4xx/fd4_draw.c
+++ b/src/gallium/drivers/freedreno/a4xx/fd4_draw.c
@@ -88,36 +88,34 @@ fixup_shader_state(struct fd_context *ctx, struct ir3_shader_key *key)
struct ir3_shader_key *last_key = &fd4_ctx->last_key;
if (!ir3_shader_key_equal(last_key, key)) {
- ctx->dirty |= FD_DIRTY_PROG;
-
if (last_key->has_per_samp || key->has_per_samp) {
if ((last_key->vsaturate_s != key->vsaturate_s) ||
(last_key->vsaturate_t != key->vsaturate_t) ||
(last_key->vsaturate_r != key->vsaturate_r) ||
(last_key->vastc_srgb != key->vastc_srgb))
- ctx->prog.dirty |= FD_SHADER_DIRTY_VP;
+ ctx->dirty |= FD_SHADER_DIRTY_VP;
if ((last_key->fsaturate_s != key->fsaturate_s) ||
(last_key->fsaturate_t != key->fsaturate_t) ||
(last_key->fsaturate_r != key->fsaturate_r) ||
(last_key->fastc_srgb != key->fastc_srgb))
- ctx->prog.dirty |= FD_SHADER_DIRTY_FP;
+ ctx->dirty |= FD_SHADER_DIRTY_FP;
}
if (last_key->vclamp_color != key->vclamp_color)
- ctx->prog.dirty |= FD_SHADER_DIRTY_VP;
+ ctx->dirty |= FD_SHADER_DIRTY_VP;
if (last_key->fclamp_color != key->fclamp_color)
- ctx->prog.dirty |= FD_SHADER_DIRTY_FP;
+ ctx->dirty |= FD_SHADER_DIRTY_FP;
if (last_key->color_two_side != key->color_two_side)
- ctx->prog.dirty |= FD_SHADER_DIRTY_FP;
+ ctx->dirty |= FD_SHADER_DIRTY_FP;
if (last_key->half_precision != key->half_precision)
- ctx->prog.dirty |= FD_SHADER_DIRTY_FP;
+ ctx->dirty |= FD_SHADER_DIRTY_FP;
if (last_key->rasterflat != key->rasterflat)
- ctx->prog.dirty |= FD_SHADER_DIRTY_FP;
+ ctx->dirty |= FD_SHADER_DIRTY_FP;
fd4_ctx->last_key = *key;
}
diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_emit.c b/src/gallium/drivers/freedreno/a4xx/fd4_emit.c
index 459494c0903..00e985d27e5 100644
--- a/src/gallium/drivers/freedreno/a4xx/fd4_emit.c
+++ b/src/gallium/drivers/freedreno/a4xx/fd4_emit.c
@@ -649,11 +649,6 @@ fd4_emit_state(struct fd_context *ctx, struct fd_ringbuffer *ring,
ir3_emit_consts(vp, ring, ctx, emit->info, dirty);
if (!emit->key.binning_pass)
ir3_emit_consts(fp, ring, ctx, emit->info, dirty);
- /* mark clean after emitting consts.. a bit ugly, but since binning
- * pass is emitted first, we want to do this only for main draw:
- */
- if (!emit->key.binning_pass)
- ctx->prog.dirty = 0;
}
if ((dirty & FD_DIRTY_BLEND)) {