Mercurial > sdl-ios-xcode
comparison src/video/SDL_blit_A.c @ 1795:398ac0f88e4d
Fixed bug #220
The AltiVec blitters don't compile, since they require __VEC__ to be enabled in
order for the compiler to understand "vector" and friends (i.e. do AltiVec)
But you don't want to turn AltiVec on globally, since then the code would only
run on a G4 (there are already runtime tests, before using the AltiVec
variants)
The solution here is to enable AltiVec locally, for the actual AltiVec code.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 09 May 2006 15:09:47 +0000 |
parents | b255b4058d37 |
children | 782fd950bd46 c121d94672cb 571c75f3d093 |
comparison
equal
deleted
inserted
replaced
1794:5605a9820134 | 1795:398ac0f88e4d |
---|---|
635 /* End MSVC_ASMBLIT */ | 635 /* End MSVC_ASMBLIT */ |
636 | 636 |
637 #endif /* GCC_ASMBLIT, MSVC_ASMBLIT */ | 637 #endif /* GCC_ASMBLIT, MSVC_ASMBLIT */ |
638 | 638 |
639 #if SDL_ALTIVEC_BLITTERS | 639 #if SDL_ALTIVEC_BLITTERS |
640 #if __MWERKS__ | |
641 #pragma altivec_model on | |
642 #endif | |
640 #if HAVE_ALTIVEC_H | 643 #if HAVE_ALTIVEC_H |
641 #include <altivec.h> | 644 #include <altivec.h> |
642 #endif | 645 #endif |
643 #include <assert.h> | 646 #include <assert.h> |
644 | 647 |
1404 | 1407 |
1405 srcp += srcskip; | 1408 srcp += srcskip; |
1406 dstp += dstskip; | 1409 dstp += dstskip; |
1407 } | 1410 } |
1408 } | 1411 } |
1412 #if __MWERKS__ | |
1413 #pragma altivec_model off | |
1414 #endif | |
1409 #endif /* SDL_ALTIVEC_BLITTERS */ | 1415 #endif /* SDL_ALTIVEC_BLITTERS */ |
1410 | 1416 |
1411 /* fast RGB888->(A)RGB888 blending with surface alpha=128 special case */ | 1417 /* fast RGB888->(A)RGB888 blending with surface alpha=128 special case */ |
1412 static void BlitRGBtoRGBSurfaceAlpha128(SDL_BlitInfo *info) | 1418 static void BlitRGBtoRGBSurfaceAlpha128(SDL_BlitInfo *info) |
1413 { | 1419 { |