summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/freedreno/a4xx
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2016-04-11 14:47:19 -0400
committerRob Clark <[email protected]>2016-05-04 11:25:55 -0400
commit173871dfb988c3e9fb74a8016d2b024619a5d918 (patch)
treec68e6ebb85a9453d0c9d6b82ee6d6b307d3b90d5 /src/gallium/drivers/freedreno/a4xx
parentb15c7fc268785cc8c960368d287ec799fe9dc502 (diff)
freedreno/ir3: lower immeds to const
Helps reduce register pressure and instruction counts for immediates that would otherwise require a mov into gpr. total instructions in shared programs: 4455332 -> 4369297 (-1.93%) total dwords in shared programs: 8807872 -> 8614432 (-2.20%) total full registers used in shared programs: 263062 -> 250846 (-4.64%) total half registers used in shader programs: 9845 -> 9845 (0.00%) total const registers used in shared programs: 1029735 -> 1466993 (42.46%) half full const instr dwords helped 0 10415 0 17861 5912 hurt 0 1157 21458 947 33 Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/a4xx')
-rw-r--r--src/gallium/drivers/freedreno/a4xx/fd4_emit.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/freedreno/a4xx/fd4_emit.c b/src/gallium/drivers/freedreno/a4xx/fd4_emit.c
index 27614f07de5..0144ba492ea 100644
--- a/src/gallium/drivers/freedreno/a4xx/fd4_emit.c
+++ b/src/gallium/drivers/freedreno/a4xx/fd4_emit.c
@@ -648,8 +648,11 @@ 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: */
- ctx->prog.dirty = 0;
+ /* 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)) {