[Mesa-dev] [PATCH V2 01/12] i965/Gen4-5: ensure VUE slots for clipdistance are valid if user clipping is enabled.

Chris Forbes chrisf at ijw.co.nz
Fri Aug 9 17:14:14 PDT 2013


V2: We don't particularly care where they fall in the VUE map, as long
as they are allocated somewhere, and occupy two contiguous slots. Don't
fiddle with the SF layout at all -- there's no need.

Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
---
 src/mesa/drivers/dri/i965/brw_vs.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c
index 5b8173d..f909fb5 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.c
+++ b/src/mesa/drivers/dri/i965/brw_vs.c
@@ -283,6 +283,11 @@ do_vs_prog(struct brw_context *brw,
          outputs_written |= BITFIELD64_BIT(VARYING_SLOT_COL0);
       if (outputs_written & BITFIELD64_BIT(VARYING_SLOT_BFC1))
          outputs_written |= BITFIELD64_BIT(VARYING_SLOT_COL1);
+
+      if (c.key.base.userclip_active) {
+         outputs_written |= BITFIELD64_BIT(VARYING_SLOT_CLIP_DIST0);
+         outputs_written |= BITFIELD64_BIT(VARYING_SLOT_CLIP_DIST1);
+      }
    }
 
    brw_compute_vue_map(brw, &prog_data.base.vue_map, outputs_written,
-- 
1.8.3.4



More information about the mesa-dev mailing list