Commit 83bd10d1 authored by Sam Lantinga's avatar Sam Lantinga

Fixed compiling the Altivec blit code

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402593
parent a2f5eab9
...@@ -2838,8 +2838,7 @@ SDL_CalculateAlphaBlit(SDL_Surface * surface, int blit_index) ...@@ -2838,8 +2838,7 @@ SDL_CalculateAlphaBlit(SDL_Surface * surface, int blit_index)
else else
#if SDL_ALTIVEC_BLITTERS #if SDL_ALTIVEC_BLITTERS
if (sf->BytesPerPixel == 4 && df->BytesPerPixel == 4 && if (sf->BytesPerPixel == 4 && df->BytesPerPixel == 4 &&
!(surface->map->dst->flags & SDL_HWSURFACE) SDL_HasAltiVec())
&& SDL_HasAltiVec())
return Blit32to32SurfaceAlphaKeyAltivec; return Blit32to32SurfaceAlphaKeyAltivec;
else else
#endif #endif
...@@ -2882,17 +2881,14 @@ SDL_CalculateAlphaBlit(SDL_Surface * surface, int blit_index) ...@@ -2882,17 +2881,14 @@ SDL_CalculateAlphaBlit(SDL_Surface * surface, int blit_index)
#endif #endif
if ((sf->Rmask | sf->Gmask | sf->Bmask) == 0xffffff) { if ((sf->Rmask | sf->Gmask | sf->Bmask) == 0xffffff) {
#if SDL_ALTIVEC_BLITTERS #if SDL_ALTIVEC_BLITTERS
if (!(surface->map->dst->flags & SDL_HWSURFACE) if (SDL_HasAltiVec())
&& SDL_HasAltiVec())
return BlitRGBtoRGBSurfaceAlphaAltivec; return BlitRGBtoRGBSurfaceAlphaAltivec;
#endif #endif
return BlitRGBtoRGBSurfaceAlpha; return BlitRGBtoRGBSurfaceAlpha;
} }
} }
#if SDL_ALTIVEC_BLITTERS #if SDL_ALTIVEC_BLITTERS
if ((sf->BytesPerPixel == 4) && if ((sf->BytesPerPixel == 4) && SDL_HasAltiVec())
!(surface->map->dst->flags & SDL_HWSURFACE)
&& SDL_HasAltiVec())
return Blit32to32SurfaceAlphaAltivec; return Blit32to32SurfaceAlphaAltivec;
else else
#endif #endif
...@@ -2912,7 +2908,6 @@ SDL_CalculateAlphaBlit(SDL_Surface * surface, int blit_index) ...@@ -2912,7 +2908,6 @@ SDL_CalculateAlphaBlit(SDL_Surface * surface, int blit_index)
case 2: case 2:
#if SDL_ALTIVEC_BLITTERS #if SDL_ALTIVEC_BLITTERS
if (sf->BytesPerPixel == 4 if (sf->BytesPerPixel == 4
&& !(surface->map->dst->flags & SDL_HWSURFACE)
&& df->Gmask == 0x7e0 && df->Bmask == 0x1f && df->Gmask == 0x7e0 && df->Bmask == 0x1f
&& SDL_HasAltiVec()) && SDL_HasAltiVec())
return Blit32to565PixelAlphaAltivec; return Blit32to565PixelAlphaAltivec;
...@@ -2946,17 +2941,14 @@ SDL_CalculateAlphaBlit(SDL_Surface * surface, int blit_index) ...@@ -2946,17 +2941,14 @@ SDL_CalculateAlphaBlit(SDL_Surface * surface, int blit_index)
#endif #endif
if (sf->Amask == 0xff000000) { if (sf->Amask == 0xff000000) {
#if SDL_ALTIVEC_BLITTERS #if SDL_ALTIVEC_BLITTERS
if (!(surface->map->dst->flags & SDL_HWSURFACE) if (SDL_HasAltiVec())
&& SDL_HasAltiVec())
return BlitRGBtoRGBPixelAlphaAltivec; return BlitRGBtoRGBPixelAlphaAltivec;
#endif #endif
return BlitRGBtoRGBPixelAlpha; return BlitRGBtoRGBPixelAlpha;
} }
} }
#if SDL_ALTIVEC_BLITTERS #if SDL_ALTIVEC_BLITTERS
if (sf->Amask && sf->BytesPerPixel == 4 && if (sf->Amask && sf->BytesPerPixel == 4 && SDL_HasAltiVec())
!(surface->map->dst->flags & SDL_HWSURFACE)
&& SDL_HasAltiVec())
return Blit32to32PixelAlphaAltivec; return Blit32to32PixelAlphaAltivec;
else else
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment