xf86-video-intel: Branch 'modesetting' - src/i915_video.c
Keith Packard
keithp at kemper.freedesktop.org
Wed Dec 20 01:53:10 EET 2006
src/i915_video.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
New commits:
diff-tree 3c86fdda1d09fd22d4c15a8e412611db4cea7dcf (from 293ad158ece941eeb9894f5af4d663464b9954e5)
Author: Keith Packard <keithp at guitar.keithp.com>
Date: Tue Dec 19 15:53:07 2006 -0800
Turn on dithering for 915 textured video
diff --git a/src/i915_video.c b/src/i915_video.c
index fb3f4fc..c2f0184 100644
--- a/src/i915_video.c
+++ b/src/i915_video.c
@@ -60,7 +60,7 @@ I915DisplayVideoTextured(ScrnInfoPtr pSc
DrawablePtr pDraw)
{
I830Ptr pI830 = I830PTR(pScrn);
- CARD32 format, ms3, s2;
+ CARD32 format, ms3, s2, s5;
BoxPtr pbox;
int nbox, dxo, dyo;
Bool planar;
@@ -103,7 +103,7 @@ I915DisplayVideoTextured(ScrnInfoPtr pSc
/* draw rect -- just clipping */
OUT_RING(_3DSTATE_DRAW_RECT_CMD);
- OUT_RING(0x00000000); /* flags */
+ OUT_RING(DRAW_DITHER_OFS_X(x1 & 3)| DRAW_DITHER_OFS_Y(y1 & 3)); /* flags */
OUT_RING(0x00000000); /* ymin, xmin */
OUT_RING((pScrn->virtualX - 1) |
(pScrn->virtualY - 1) << 16); /* ymax, xmax */
@@ -131,7 +131,10 @@ I915DisplayVideoTextured(ScrnInfoPtr pSc
OUT_RING(s2);
OUT_RING((1 << S4_POINT_WIDTH_SHIFT) | S4_LINE_WIDTH_ONE |
S4_CULLMODE_NONE | S4_VFMT_XY);
- OUT_RING(0x00000000); /* S5 - enable bits */
+ s5 = 0x0;
+ if (pI830->cpp == 2)
+ s5 |= S5_COLOR_DITHER_ENABLE;
+ OUT_RING(s5); /* S5 - enable bits */
OUT_RING((2 << S6_DEPTH_TEST_FUNC_SHIFT) |
(2 << S6_CBUF_SRC_BLEND_FACT_SHIFT) |
(1 << S6_CBUF_DST_BLEND_FACT_SHIFT) | S6_COLOR_WRITE_ENABLE |
More information about the xorg-commit
mailing list