diff options
author | Eric Anholt <[email protected]> | 2010-03-10 18:48:23 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2010-03-12 15:12:02 -0800 |
commit | f4f2737e8767d3808d876c3f7e65ca9f48faf624 (patch) | |
tree | 34afc9dc17e5f1f8c9b7c6222d51c278058df89f /src/mesa/drivers | |
parent | 46450c1f3f93bf4dc96696fc7e0f0eb808d9c08a (diff) |
i965: Clarify that DELTAXY always occurs for both X and Y.
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm_emit.c | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_emit.c b/src/mesa/drivers/dri/i965/brw_wm_emit.c index 438fcc7178d..2d1d011e553 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_emit.c +++ b/src/mesa/drivers/dri/i965/brw_wm_emit.c @@ -125,23 +125,22 @@ void emit_delta_xy(struct brw_compile *p, { struct brw_reg r1 = brw_vec1_grf(1, 0); + if (mask == 0) + return; + + assert(mask == WRITEMASK_XY); + /* Calc delta X,Y by subtracting origin in r1 from the pixel * centers. */ - if (mask & WRITEMASK_X) { - brw_ADD(p, - dst[0], - retype(arg0[0], BRW_REGISTER_TYPE_UW), - negate(r1)); - } - - if (mask & WRITEMASK_Y) { - brw_ADD(p, - dst[1], - retype(arg0[1], BRW_REGISTER_TYPE_UW), - negate(suboffset(r1,1))); - - } + brw_ADD(p, + dst[0], + retype(arg0[0], BRW_REGISTER_TYPE_UW), + negate(r1)); + brw_ADD(p, + dst[1], + retype(arg0[1], BRW_REGISTER_TYPE_UW), + negate(suboffset(r1,1))); } void emit_wpos_xy(struct brw_wm_compile *c, |