diff options
author | Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> | 2007-02-06 16:43:37 -0500 |
---|---|---|
committer | Soren Sandmann Pedersen <ssp@dhcp83-218.boston.redhat.com> | 2007-02-06 16:43:37 -0500 |
commit | b2cd3b133748cc5aa541905a703a6fdb1cbbb1e6 (patch) | |
tree | e60b81b1ae2a2856749bdf4393530080542ab9d8 /fb/fbpict.c | |
parent | 760a38c4c7ab66ae653d3acb92f5cda4bd44edd6 (diff) |
Fix for AMD cpu detection. Bug 9614, Dan Williams.
Credit for the fixes in this patch goes to:
Marco Gritti <mpg at redhat dot com>
Jordan Crouse <jordan dot crouse at amd dot com>
Diffstat (limited to 'fb/fbpict.c')
-rw-r--r-- | fb/fbpict.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/fb/fbpict.c b/fb/fbpict.c index 28503c0cf..39d8d9f35 100644 --- a/fb/fbpict.c +++ b/fb/fbpict.c @@ -189,6 +189,23 @@ fbCompositeSolidMask_nx8888x8888C (CARD8 op, fbComposeGetStart (pDst, xDst, yDst, CARD32, dstStride, dstLine, 1); fbComposeGetStart (pMask, xMask, yMask, CARD32, maskStride, maskLine, 1); + { + comp_image_t src, msk, dst; + comp_pixel_t src_pixel; + comp_format_t msk_format = { 0xff000000, 0x00ff0000, 0x0000ff00, 0x000000ff }; + + src_pixel.red = src & 0x000000ff; + src_pixel.green = src & 0x0000ff00; + src_pixel.blue = src & 0x00ff0000; + src_pixel.alpha = src & 0xff000000; + + comp_image_init_solid (&src, &src_pixel); + comp_image_init_bits (&msk, maskLine, maskStride, &msk_format); + comp_image_init_bits (&dst, dstLine, dstStride, &dst_format); + + comp_over_c (src, msk, dst, srcX, srcY, mskX, mskY, dstX, dstY); + } + while (height--) { dst = dstLine; @@ -1516,7 +1533,9 @@ static unsigned int detectCPUFeatures(void) { features |= SSE; if (result & (1 << 26)) features |= SSE2; - if ((result & MMX) && !(result & SSE) && (strcmp(vendor, "AuthenticAMD") == 0)) { + if ((features & MMX) && !(features & SSE) && + (strcmp(vendor, "AuthenticAMD") == 0 || + strcmp(vendor, "Geode by NSC") == 0)) { /* check for AMD MMX extensions */ unsigned int result; |