diff options
author | Ivaylo Boyadzhiev <iboyadzhiev@nvidia.com> | 2008-08-03 18:55:12 -0700 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2008-08-03 18:56:51 -0700 |
commit | 25882af6d3359e5ae42c927c555f5b257ba5665c (patch) | |
tree | 4a236244e33477fd00be1e88c5acb4b6434e260e /hw/xfree86/xaa/xaaCpyPlane.c | |
parent | d980913f3145cdc34baab27ff818c9631c4c8571 (diff) |
Fix a longstanding XAA CopyPlane bug.
TmpBitPlane is a plane mask, not a plane index.
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Diffstat (limited to 'hw/xfree86/xaa/xaaCpyPlane.c')
-rw-r--r-- | hw/xfree86/xaa/xaaCpyPlane.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/xfree86/xaa/xaaCpyPlane.c b/hw/xfree86/xaa/xaaCpyPlane.c index cd9e9d47f..a0ebb75d2 100644 --- a/hw/xfree86/xaa/xaaCpyPlane.c +++ b/hw/xfree86/xaa/xaaCpyPlane.c @@ -110,12 +110,12 @@ XAACopyPlaneNtoNColorExpand( int Bpp = pSrc->bitsPerPixel >> 3; unsigned long mask = TmpBitPlane; - if(TmpBitPlane < 8) { + if(TmpBitPlane < (1 << 8)) { offset = 0; - } else if(TmpBitPlane < 16) { + } else if(TmpBitPlane < (1 << 16)) { offset = 1; mask >>= 8; - } else if(TmpBitPlane < 24) { + } else if(TmpBitPlane < (1 << 24)) { offset = 2; mask >>= 16; } else { |