i965/clip: remove spurious clipvertex param
authorChris Forbes <chrisf@ijw.co.nz>
Sun, 4 Aug 2013 06:32:48 +0000 (18:32 +1200)
committerChris Forbes <chrisf@ijw.co.nz>
Thu, 15 Aug 2013 19:24:56 +0000 (07:24 +1200)
Nothing in the clipper uses gl_ClipVertex any more, so we don't care
where it is.

V2: Don't bother fishing out the clipvertex offset either.

Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Paul Berry <stereotype441@gmail.com>
src/mesa/drivers/dri/i965/brw_clip_tri.c

index 090d20374f34f20113e82f4b430ee735fcc827c0..6d0e178696006d24597f67c61007df171e5f2278 100644 (file)
@@ -232,8 +232,7 @@ void brw_clip_tri_flat_shade( struct brw_clip_compile *c )
  */
 static inline void
 load_clip_distance(struct brw_clip_compile *c, struct brw_indirect vtx,
-                struct brw_reg dst, GLuint hpos_offset, GLuint clip_offset,
-                int cond)
+                struct brw_reg dst, GLuint hpos_offset, int cond)
 {
    struct brw_compile *p = &c->func;
 
@@ -271,9 +270,6 @@ void brw_clip_tri( struct brw_clip_compile *c )
    struct brw_indirect outlist_ptr = brw_indirect(5, 0);
    struct brw_indirect freelist_ptr = brw_indirect(6, 0);
    GLuint hpos_offset = brw_varying_to_offset(&c->vue_map, VARYING_SLOT_POS);
-   GLuint clipvert_offset = brw_clip_have_varying(c, VARYING_SLOT_CLIP_VERTEX)
-      ? brw_varying_to_offset(&c->vue_map, VARYING_SLOT_CLIP_VERTEX)
-      : hpos_offset;
    GLint clipdist0_offset = c->key.nr_userclip
       ? brw_varying_to_offset(&c->vue_map, VARYING_SLOT_CLIP_DIST0)
       : 0;
@@ -322,13 +318,11 @@ void brw_clip_tri( struct brw_clip_compile *c )
             */
            brw_MOV(p, get_addr_reg(vtx), deref_1uw(inlist_ptr, 0));
 
-            load_clip_distance(c, vtxPrev, c->reg.dpPrev, hpos_offset, clipvert_offset,
-                  BRW_CONDITIONAL_L);
+            load_clip_distance(c, vtxPrev, c->reg.dpPrev, hpos_offset, BRW_CONDITIONAL_L);
            /* IS_NEGATIVE(prev) */
            brw_IF(p, BRW_EXECUTE_1);
            {
-               load_clip_distance(c, vtx, c->reg.dp, hpos_offset, clipvert_offset,
-                     BRW_CONDITIONAL_GE);
+               load_clip_distance(c, vtx, c->reg.dp, hpos_offset, BRW_CONDITIONAL_GE);
               /* IS_POSITIVE(next)
                */
               brw_IF(p, BRW_EXECUTE_1);
@@ -369,8 +363,7 @@ void brw_clip_tri( struct brw_clip_compile *c )
               brw_ADD(p, get_addr_reg(outlist_ptr), get_addr_reg(outlist_ptr), brw_imm_uw(sizeof(short)));
               brw_ADD(p, c->reg.nr_verts, c->reg.nr_verts, brw_imm_ud(1));
 
-               load_clip_distance(c, vtx, c->reg.dp, hpos_offset, clipvert_offset,
-                     BRW_CONDITIONAL_L);
+               load_clip_distance(c, vtx, c->reg.dp, hpos_offset, BRW_CONDITIONAL_L);
               /* IS_NEGATIVE(next)
                */
               brw_IF(p, BRW_EXECUTE_1);