diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2009-09-09 12:09:05 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2009-09-09 12:40:15 +0100 |
commit | 1a77ca74bc829e019a06fe9ad559f013054c27ff (patch) | |
tree | 255a4067c219d3d0e5c49106c335e384da72f8d0 /src/i830_render.c | |
parent | ce10b5b6fca086eb4af45c1db28352e06ee4ce0b (diff) |
i915: Restore nearest sampling
My recent commit [94fc93] to use the pixel centre for sampling with the i830
broke the i915. This restores the previous sampling coordinates for the
i915 whilst preserving the correct coordinates for i830.
Fixes: gnome characters disappear
http://bugs.freedesktop.org/show_bug.cgi?id=23803
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/i830_render.c')
-rw-r--r-- | src/i830_render.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/i830_render.c b/src/i830_render.c index af6fb6ed..dbee4465 100644 --- a/src/i830_render.c +++ b/src/i830_render.c @@ -414,7 +414,9 @@ i830_prepare_composite(int op, PicturePtr pSrcPicture, if (!i830_get_dest_format(pDstPicture, &pI830->render_dst_format)) return FALSE; + pI830->dst_coord_adjust = 0; pI830->src_coord_adjust = 0; + pI830->mask_coord_adjust = 0; if (pSrcPicture->filter == PictFilterNearest) pI830->src_coord_adjust = 0.375; if (pMask != NULL) { @@ -707,8 +709,8 @@ i830_emit_composite_primitive(PixmapPtr pDst, BEGIN_BATCH(1 + num_floats); OUT_BATCH(PRIM3D_INLINE | PRIM3D_RECTLIST | (num_floats-1)); - OUT_BATCH_F(dstX + w); - OUT_BATCH_F(dstY + h); + OUT_BATCH_F(pI830->dst_coord_adjust + dstX + w); + OUT_BATCH_F(pI830->dst_coord_adjust + dstY + h); OUT_BATCH_F(src_x[2] / pI830->scale_units[0][0]); OUT_BATCH_F(src_y[2] / pI830->scale_units[0][1]); if (!is_affine_src) { @@ -724,8 +726,8 @@ i830_emit_composite_primitive(PixmapPtr pDst, } } - OUT_BATCH_F(dstX); - OUT_BATCH_F(dstY + h); + OUT_BATCH_F(pI830->dst_coord_adjust + dstX); + OUT_BATCH_F(pI830->dst_coord_adjust + dstY + h); OUT_BATCH_F(src_x[1] / pI830->scale_units[0][0]); OUT_BATCH_F(src_y[1] / pI830->scale_units[0][1]); if (!is_affine_src) { @@ -741,8 +743,8 @@ i830_emit_composite_primitive(PixmapPtr pDst, } } - OUT_BATCH_F(dstX); - OUT_BATCH_F(dstY); + OUT_BATCH_F(pI830->dst_coord_adjust + dstX); + OUT_BATCH_F(pI830->dst_coord_adjust + dstY); OUT_BATCH_F(src_x[0] / pI830->scale_units[0][0]); OUT_BATCH_F(src_y[0] / pI830->scale_units[0][1]); if (!is_affine_src) { |