summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Forbes <[email protected]>2013-07-08 03:44:58 +1200
committerChris Forbes <[email protected]>2013-08-16 07:20:47 +1200
commit9e07a68cade6c75385cd52ca1f3e34d65a45fb31 (patch)
tree4278ea8be1f8015b0fa0892a4ed1b0f6af678cf7
parenta453eb6f86ee1df49ebb9e864124a46c824e4e85 (diff)
i965/Gen4-5: ensure VUE slots for clipdistance are valid if user clipping is enabled.
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 <[email protected]> Reviewed-by: Paul Berry <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c
index 5b8173dcf03..f909fb53e73 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,