Mesa (master): Revert "freedreno/a3xx: only emit dirty consts"

Rob Clark robclark at kemper.freedesktop.org
Thu Oct 23 14:48:50 UTC 2014


Module: Mesa
Branch: master
Commit: 4f1fec60608b37ec8f271c09227d8cc6f5093535
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4f1fec60608b37ec8f271c09227d8cc6f5093535

Author: Rob Clark <robclark at freedesktop.org>
Date:   Thu Oct 23 08:50:50 2014 -0400

Revert "freedreno/a3xx: only emit dirty consts"

This reverts commit 94bb33617d1e8978dc52b8aaa4eb41bfb6703f79.

Which somehow broke gnome-shell.. and needs more investigation.  For
now, revert..

---

 src/gallium/drivers/freedreno/a3xx/fd3_draw.c |   10 +---------
 src/gallium/drivers/freedreno/a3xx/fd3_emit.c |    4 ++++
 2 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_draw.c b/src/gallium/drivers/freedreno/a3xx/fd3_draw.c
index 0fb0625..c4e3d8d 100644
--- a/src/gallium/drivers/freedreno/a3xx/fd3_draw.c
+++ b/src/gallium/drivers/freedreno/a3xx/fd3_draw.c
@@ -136,21 +136,14 @@ fd3_draw(struct fd_context *ctx, const struct pipe_draw_info *info)
 		},
 		.rasterflat = ctx->rasterizer && ctx->rasterizer->flatshade,
 	};
-	uint32_t dirty, vconst;
+	unsigned dirty;
 
 	fixup_shader_state(ctx, &emit.key);
 
-	/* save/restore vertex const state too, so that vertex
-	 * shader consts also get emitted for render pass:
-	 */
-	vconst = ctx->constbuf[PIPE_SHADER_VERTEX].dirty_mask;
-
 	dirty = ctx->dirty;
 	emit.dirty = dirty & ~(FD_DIRTY_BLEND);
 	draw_impl(ctx, ctx->binning_ring, &emit);
 
-	ctx->constbuf[PIPE_SHADER_VERTEX].dirty_mask = vconst;
-
 	/* and now regular (non-binning) pass: */
 	emit.key.binning_pass = false;
 	emit.dirty = dirty;
@@ -337,7 +330,6 @@ fd3_clear(struct fd_context *ctx, unsigned buffers,
 
 	fd3_emit_vertex_bufs(ring, &emit);
 
-	ctx->constbuf[PIPE_SHADER_FRAGMENT].dirty_mask = ~0;
 	fd3_emit_constant(ring, SB_FRAG_SHADER, 0, 0, 4, color->ui, NULL);
 
 	OUT_PKT0(ring, REG_A3XX_PC_PRIM_VTX_CNTL, 1);
diff --git a/src/gallium/drivers/freedreno/a3xx/fd3_emit.c b/src/gallium/drivers/freedreno/a3xx/fd3_emit.c
index 5bf41b1..e22a5ba 100644
--- a/src/gallium/drivers/freedreno/a3xx/fd3_emit.c
+++ b/src/gallium/drivers/freedreno/a3xx/fd3_emit.c
@@ -93,6 +93,10 @@ emit_constants(struct fd_ringbuffer *ring,
 	uint32_t first_immediate;
 	uint32_t base = 0;
 
+	// XXX TODO only emit dirty consts.. but we need to keep track if
+	// they are clobbered by a clear, gmem2mem, or mem2gmem..
+	constbuf->dirty_mask = enabled_mask;
+
 	/* in particular, with binning shader we may end up with unused
 	 * consts, ie. we could end up w/ constlen that is smaller
 	 * than first_immediate.  In that case truncate the user consts




More information about the mesa-commit mailing list