i965: depth offset on glPolygonMode(GL_LINE/GL_POINT)
authorXiang, Haihao <haihao.xiang@intel.com>
Fri, 28 Mar 2008 09:32:45 +0000 (17:32 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Fri, 28 Mar 2008 09:32:45 +0000 (17:32 +0800)
src/mesa/drivers/dri/i965/brw_clip_unfilled.c

index 918e0001870d5448d7cb0f2299720acfa29066e9..57ebf388f5853cf135de81e0dd11d0e6808d8f7f 100644 (file)
@@ -220,8 +220,8 @@ static void apply_one_offset( struct brw_clip_compile *c,
                          struct brw_indirect vert )
 {
    struct brw_compile *p = &c->func;
-   struct brw_reg pos = deref_4f(vert, c->offset[VERT_RESULT_HPOS]);
-   struct brw_reg z = get_element(pos, 2);
+   struct brw_reg z = deref_1f(vert, c->header_position_offset +
+                              2 * type_sz(BRW_REGISTER_TYPE_F));
 
    brw_ADD(p, z, z, vec1(c->reg.offset));
 }