From: Zou Nan hai Date: Mon, 17 Mar 2008 08:39:10 +0000 (+0800) Subject: [i965] fix wpos height 1 pixel higher X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b0f681b458ebebab370bbfd2a17699cd851aae8b;p=mesa.git [i965] fix wpos height 1 pixel higher --- diff --git a/src/mesa/drivers/dri/i965/brw_wm_emit.c b/src/mesa/drivers/dri/i965/brw_wm_emit.c index 4c0bd67c923..83a0d12d906 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_emit.c +++ b/src/mesa/drivers/dri/i965/brw_wm_emit.c @@ -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)); } } diff --git a/src/mesa/drivers/dri/i965/brw_wm_glsl.c b/src/mesa/drivers/dri/i965/brw_wm_glsl.c index 58520838826..b2ffc82ed2d 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_glsl.c +++ b/src/mesa/drivers/dri/i965/brw_wm_glsl.c @@ -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)); } }