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 <chr...@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 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev