[Mesa-dev] [RFC PATCH 03/10] i965/fs: Gen4/5: Fix inconsistency in the VUE map.

Chris Forbes chrisf at ijw.co.nz
Sat Aug 3 19:59:47 PDT 2013


The SF never gets to see the clip distances. If we didn't ignore them
here, we got confused about the correct offsets for any varyings laid
out after them. (user-defined varyings would break, but gl_FrontColor
etc worked properly).

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

diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index a81e97f..a2db26b 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -1248,6 +1248,12 @@ fs_visitor::calculate_urb_setup()
          if (i == VARYING_SLOT_PSIZ)
             continue;
 
+         /* Clip distances are 'valid' in the VUE map, but are packed in the
+          * header part, which the SF doesn't get to see.
+          */
+         if (i == VARYING_SLOT_CLIP_DIST0 || i == VARYING_SLOT_CLIP_DIST1)
+            continue;
+
 	 if (c->key.input_slots_valid & BITFIELD64_BIT(i)) {
 	    /* The back color slot is skipped when the front color is
 	     * also written to.  In addition, some slots can be
-- 
1.8.3.4



More information about the mesa-dev mailing list