[i965] fix wpos height 1 pixel higher
authorZou Nan hai <nanhai.zou@intel.com>
Mon, 17 Mar 2008 08:39:10 +0000 (16:39 +0800)
committerZou Nan hai <nanhai.zou@intel.com>
Mon, 17 Mar 2008 08:39:10 +0000 (16:39 +0800)
src/mesa/drivers/dri/i965/brw_wm_emit.c
src/mesa/drivers/dri/i965/brw_wm_glsl.c

index 4c0bd67c9239b4c6d3a7f444f7ec3a7655a0cc1a..83a0d12d9061625afc09795a9ef81806472296f8 100644 (file)
@@ -145,7 +145,7 @@ static void emit_wpos_xy(struct brw_wm_compile *c,
       brw_ADD(p,
              dst[1],
              negate(retype(arg0[1], BRW_REGISTER_TYPE_W)),
-             brw_imm_d(c->key.origin_y + c->key.drawable_height));
+             brw_imm_d(c->key.origin_y + c->key.drawable_height - 1));
    }
 }
 
index 585208388261b191b899209cd3d828cb8edf20e7..b2ffc82ed2de1d48f377534fcbf0349ed0a820c3 100644 (file)
@@ -986,7 +986,7 @@ static void emit_wpos_xy(struct brw_wm_compile *c,
        brw_ADD(p,
                dst[1],
                negate(retype(src0[1], BRW_REGISTER_TYPE_W)),
-               brw_imm_d(c->key.origin_y + c->key.drawable_height));
+               brw_imm_d(c->key.origin_y + c->key.drawable_height - 1));
     }
 }