From 5ba7d85fea3c3fc687fbd309226a894077afb91c Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Wed, 12 Jan 2005 17:20:08 +0000 Subject: [PATCH] Don't emit HC_SubA_HSPXYOS on CLE266. --- src/mesa/drivers/dri/unichrome/via_ioctl.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/mesa/drivers/dri/unichrome/via_ioctl.c b/src/mesa/drivers/dri/unichrome/via_ioctl.c index 30ca7f67553..efb7cf6b6cf 100644 --- a/src/mesa/drivers/dri/unichrome/via_ioctl.c +++ b/src/mesa/drivers/dri/unichrome/via_ioctl.c @@ -531,11 +531,19 @@ static void via_emit_cliprect(viaContextPtr vmesa, vb[4] = ((HC_SubA_HDBBasL << 24) | (offset & 0xFFFFFF)); vb[5] = ((HC_SubA_HDBBasH << 24) | ((offset & 0xFF000000)) >> 24); - vb[6] = ((HC_SubA_HDBFM << 24) | HC_HDBLoc_Local | format | pitch); - /* Seems to be ignored on CLE266: + /* HSPXYOS seems to be ignored on CLE266, don't emit. This is + * required for hardware stipple conformance (as long as we still + * have drawXoff). */ - vb[7] = ((HC_SubA_HSPXYOS << 24) | ((32 - vmesa->drawXoff) << HC_HSPXOS_SHIFT)); + if (vmesa->viaScreen->deviceID == VIA_CLE266) { + vb[6] = HC_DUMMY; + vb[7] = ((HC_SubA_HDBFM << 24) | HC_HDBLoc_Local | format | pitch); + } + else { + vb[6] = ((HC_SubA_HDBFM << 24) | HC_HDBLoc_Local | format | pitch); + vb[7] = ((HC_SubA_HSPXYOS << 24) | ((32 - vmesa->drawXoff) << HC_HSPXOS_SHIFT)); + } } -- 2.30.2