[Mesa-dev] [RFC PATCH 02/10] i965/Gen4-5: allocate VUE slots for clipdistance if user clipping is enabled

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


Also adjust the SF URB read offset to account for there being two
additional slots of stuff it doesn't care about.

Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
---
 src/mesa/drivers/dri/i965/brw_sf.h | 2 +-
 src/mesa/drivers/dri/i965/brw_vs.c | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/brw_sf.h b/src/mesa/drivers/dri/i965/brw_sf.h
index 09880fe..eb40551 100644
--- a/src/mesa/drivers/dri/i965/brw_sf.h
+++ b/src/mesa/drivers/dri/i965/brw_sf.h
@@ -105,6 +105,6 @@ void brw_emit_point_setup( struct brw_sf_compile *c, bool allocate );
 void brw_emit_point_sprite_setup( struct brw_sf_compile *c, bool allocate );
 void brw_emit_anyprim_setup( struct brw_sf_compile *c );
 
-#define BRW_SF_URB_ENTRY_READ_OFFSET 1
+#define BRW_SF_URB_ENTRY_READ_OFFSET 2
 
 #endif
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c
index 5b8173d..e6d8c5d 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.c
+++ b/src/mesa/drivers/dri/i965/brw_vs.c
@@ -94,6 +94,8 @@ brw_compute_vue_map(struct brw_context *brw, struct brw_vue_map *vue_map,
        */
       assign_vue_slot(vue_map, VARYING_SLOT_PSIZ);
       assign_vue_slot(vue_map, BRW_VARYING_SLOT_NDC);
+      assign_vue_slot(vue_map, VARYING_SLOT_CLIP_DIST0);
+      assign_vue_slot(vue_map, VARYING_SLOT_CLIP_DIST1);
       assign_vue_slot(vue_map, VARYING_SLOT_POS);
       break;
    case 6:
-- 
1.8.3.4



More information about the mesa-dev mailing list