diff options
author | Rob Clark <[email protected]> | 2017-04-16 14:52:16 -0400 |
---|---|---|
committer | Rob Clark <[email protected]> | 2017-04-18 16:32:00 -0400 |
commit | df37902e346e0fc8e7db4cecb6f2dbd6aa370adb (patch) | |
tree | 15e3004428932e6160ba4914bf2c9620e74af0ae /src/gallium/drivers/freedreno/a3xx | |
parent | 71f9e03d211a17e7c53de595966d4c0ed41a97f1 (diff) |
freedreno: add helper to mark all state clean
Note that this involves juggling around a bit when we emit and clear
texture state. So split out from the patch that adds the helper to set
all state dirty.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a3xx')
-rw-r--r-- | src/gallium/drivers/freedreno/a3xx/fd3_draw.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/freedreno/a3xx/fd3_emit.c | 20 |
2 files changed, 7 insertions, 15 deletions
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_draw.c b/src/gallium/drivers/freedreno/a3xx/fd3_draw.c index afa2c3c7ef7..c36e5071660 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_draw.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_draw.c @@ -163,6 +163,8 @@ fd3_draw_vbo(struct fd_context *ctx, const struct pipe_draw_info *info) emit.fp = NULL; draw_impl(ctx, ctx->batch->binning, &emit); + fd_context_all_clean(ctx); + return true; } diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_emit.c b/src/gallium/drivers/freedreno/a3xx/fd3_emit.c index 377085e7159..9e9d2d9bc4d 100644 --- a/src/gallium/drivers/freedreno/a3xx/fd3_emit.c +++ b/src/gallium/drivers/freedreno/a3xx/fd3_emit.c @@ -490,7 +490,7 @@ fd3_emit_state(struct fd_context *ctx, struct fd_ringbuffer *ring, { const struct ir3_shader_variant *vp = fd3_emit_get_vp(emit); const struct ir3_shader_variant *fp = fd3_emit_get_fp(emit); - uint32_t dirty = emit->dirty; + const uint32_t dirty = emit->dirty; emit_marker(ring, 5); @@ -786,21 +786,11 @@ fd3_emit_state(struct fd_context *ctx, struct fd_ringbuffer *ring, if (dirty & (FD_DIRTY_VERTTEX | FD_DIRTY_FRAGTEX)) fd_wfi(ctx->batch, ring); - if (dirty & FD_DIRTY_VERTTEX) { - if (vp->has_samp) - emit_textures(ctx, ring, SB_VERT_TEX, &ctx->tex[PIPE_SHADER_VERTEX]); - else - dirty &= ~FD_DIRTY_VERTTEX; - } - - if (dirty & FD_DIRTY_FRAGTEX) { - if (fp->has_samp) - emit_textures(ctx, ring, SB_FRAG_TEX, &ctx->tex[PIPE_SHADER_FRAGMENT]); - else - dirty &= ~FD_DIRTY_FRAGTEX; - } + if (dirty & FD_DIRTY_VERTTEX) + emit_textures(ctx, ring, SB_VERT_TEX, &ctx->tex[PIPE_SHADER_VERTEX]); - ctx->dirty &= ~dirty; + if (dirty & FD_DIRTY_FRAGTEX) + emit_textures(ctx, ring, SB_FRAG_TEX, &ctx->tex[PIPE_SHADER_FRAGMENT]); } /* emit setup at begin of new cmdstream buffer (don't rely on previous |