i965: re-define the type of reg.loopcount.
authorXiang, Haihao <haihao.xiang@intel.com>
Fri, 25 Jan 2008 08:38:38 +0000 (16:38 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Fri, 25 Jan 2008 08:38:38 +0000 (16:38 +0800)
  avoid some issues such that 1 + (-2) gets a big
positive value.

src/mesa/drivers/dri/i965/brw_clip_tri.c

index b7d30bb0c4db9fc7e8001c5a6aeeda4bf00f3c8a..316dab807067c12ade39898c04b32741905d3c38 100644 (file)
@@ -92,7 +92,7 @@ void brw_clip_tri_alloc_regs( struct brw_clip_compile *c,
    }
 
    c->reg.t          = brw_vec1_grf(i, 0);
-   c->reg.loopcount  = retype(brw_vec1_grf(i, 1), BRW_REGISTER_TYPE_UD);
+   c->reg.loopcount  = retype(brw_vec1_grf(i, 1), BRW_REGISTER_TYPE_D);
    c->reg.nr_verts   = retype(brw_vec1_grf(i, 2), BRW_REGISTER_TYPE_UD);
    c->reg.planemask  = retype(brw_vec1_grf(i, 3), BRW_REGISTER_TYPE_UD);
    c->reg.plane_equation = brw_vec4_grf(i, 4);