Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed compiling the Altivec blit code
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Aug 12, 2007
1 parent 501bee3 commit 0398798
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions src/video/SDL_blit_A.c
Expand Up @@ -2838,8 +2838,7 @@ SDL_CalculateAlphaBlit(SDL_Surface * surface, int blit_index)
else
#if SDL_ALTIVEC_BLITTERS
if (sf->BytesPerPixel == 4 && df->BytesPerPixel == 4 &&
!(surface->map->dst->flags & SDL_HWSURFACE)
&& SDL_HasAltiVec())
SDL_HasAltiVec())
return Blit32to32SurfaceAlphaKeyAltivec;
else
#endif
Expand Down Expand Up @@ -2882,17 +2881,14 @@ SDL_CalculateAlphaBlit(SDL_Surface * surface, int blit_index)
#endif
if ((sf->Rmask | sf->Gmask | sf->Bmask) == 0xffffff) {
#if SDL_ALTIVEC_BLITTERS
if (!(surface->map->dst->flags & SDL_HWSURFACE)
&& SDL_HasAltiVec())
if (SDL_HasAltiVec())
return BlitRGBtoRGBSurfaceAlphaAltivec;
#endif
return BlitRGBtoRGBSurfaceAlpha;
}
}
#if SDL_ALTIVEC_BLITTERS
if ((sf->BytesPerPixel == 4) &&
!(surface->map->dst->flags & SDL_HWSURFACE)
&& SDL_HasAltiVec())
if ((sf->BytesPerPixel == 4) && SDL_HasAltiVec())
return Blit32to32SurfaceAlphaAltivec;
else
#endif
Expand All @@ -2912,7 +2908,6 @@ SDL_CalculateAlphaBlit(SDL_Surface * surface, int blit_index)
case 2:
#if SDL_ALTIVEC_BLITTERS
if (sf->BytesPerPixel == 4
&& !(surface->map->dst->flags & SDL_HWSURFACE)
&& df->Gmask == 0x7e0 && df->Bmask == 0x1f
&& SDL_HasAltiVec())
return Blit32to565PixelAlphaAltivec;
Expand Down Expand Up @@ -2946,17 +2941,14 @@ SDL_CalculateAlphaBlit(SDL_Surface * surface, int blit_index)
#endif
if (sf->Amask == 0xff000000) {
#if SDL_ALTIVEC_BLITTERS
if (!(surface->map->dst->flags & SDL_HWSURFACE)
&& SDL_HasAltiVec())
if (SDL_HasAltiVec())
return BlitRGBtoRGBPixelAlphaAltivec;
#endif
return BlitRGBtoRGBPixelAlpha;
}
}
#if SDL_ALTIVEC_BLITTERS
if (sf->Amask && sf->BytesPerPixel == 4 &&
!(surface->map->dst->flags & SDL_HWSURFACE)
&& SDL_HasAltiVec())
if (sf->Amask && sf->BytesPerPixel == 4 && SDL_HasAltiVec())
return Blit32to32PixelAlphaAltivec;
else
#endif
Expand Down

0 comments on commit 0398798

Please sign in to comment.