Disabled incorrect 16-bit Altivec blitters

This commit is contained in:
Sam Lantinga
2025-10-29 16:11:25 +00:00
parent 84fac6ca44
commit 8b8c51573b
+6 -6
View File
@@ -292,6 +292,7 @@ static void Blit_XRGB8888_RGB565Altivec(SDL_BlitInfo *info)
} }
} }
#ifdef BROKEN_ALTIVEC_BLITTERS // This doesn't properly expand to the lower destination bits
static void Blit_RGB565_32Altivec(SDL_BlitInfo *info) static void Blit_RGB565_32Altivec(SDL_BlitInfo *info)
{ {
int height = info->dst_h; int height = info->dst_h;
@@ -370,9 +371,7 @@ static void Blit_RGB565_32Altivec(SDL_BlitInfo *info)
while (condition) { \ while (condition) { \
unsigned sR, sG, sB; \ unsigned sR, sG, sB; \
unsigned short Pixel = *((unsigned short *)src); \ unsigned short Pixel = *((unsigned short *)src); \
sR = (Pixel >> 8) & 0xf8; \ RGB_FROM_RGB565(Pixel, sR, sG, sB); \
sG = (Pixel >> 3) & 0xfc; \
sB = (Pixel << 3) & 0xf8; \
ASSEMBLE_RGBA(dst, 4, dstfmt, sR, sG, sB, alpha); \ ASSEMBLE_RGBA(dst, 4, dstfmt, sR, sG, sB, alpha); \
src += 2; \ src += 2; \
dst += 4; \ dst += 4; \
@@ -508,9 +507,7 @@ static void Blit_RGB555_32Altivec(SDL_BlitInfo *info)
while (condition) { \ while (condition) { \
unsigned sR, sG, sB; \ unsigned sR, sG, sB; \
unsigned short Pixel = *((unsigned short *)src); \ unsigned short Pixel = *((unsigned short *)src); \
sR = (Pixel >> 7) & 0xf8; \ RGB_FROM_RGB555(Pixel, sR, sG, sB); \
sG = (Pixel >> 2) & 0xf8; \
sB = (Pixel << 3) & 0xf8; \
ASSEMBLE_RGBA(dst, 4, dstfmt, sR, sG, sB, alpha); \ ASSEMBLE_RGBA(dst, 4, dstfmt, sR, sG, sB, alpha); \
src += 2; \ src += 2; \
dst += 4; \ dst += 4; \
@@ -567,6 +564,7 @@ static void Blit_RGB555_32Altivec(SDL_BlitInfo *info)
dst += dstskip; dst += dstskip;
} }
} }
#endif // BROKEN_ALTIVEC_BLITTERS
static void BlitNtoNKey(SDL_BlitInfo *info); static void BlitNtoNKey(SDL_BlitInfo *info);
static void BlitNtoNKeyCopyAlpha(SDL_BlitInfo *info); static void BlitNtoNKeyCopyAlpha(SDL_BlitInfo *info);
@@ -2969,11 +2967,13 @@ static const struct blit_table normal_blit_1[] = {
static const struct blit_table normal_blit_2[] = { static const struct blit_table normal_blit_2[] = {
#ifdef SDL_ALTIVEC_BLITTERS #ifdef SDL_ALTIVEC_BLITTERS
#ifdef BROKEN_ALTIVEC_BLITTERS
// has-altivec // has-altivec
{ 0x0000F800, 0x000007E0, 0x0000001F, 4, 0x00000000, 0x00000000, 0x00000000, { 0x0000F800, 0x000007E0, 0x0000001F, 4, 0x00000000, 0x00000000, 0x00000000,
BLIT_FEATURE_HAS_ALTIVEC, Blit_RGB565_32Altivec, NO_ALPHA | COPY_ALPHA | SET_ALPHA }, BLIT_FEATURE_HAS_ALTIVEC, Blit_RGB565_32Altivec, NO_ALPHA | COPY_ALPHA | SET_ALPHA },
{ 0x00007C00, 0x000003E0, 0x0000001F, 4, 0x00000000, 0x00000000, 0x00000000, { 0x00007C00, 0x000003E0, 0x0000001F, 4, 0x00000000, 0x00000000, 0x00000000,
BLIT_FEATURE_HAS_ALTIVEC, Blit_RGB555_32Altivec, NO_ALPHA | COPY_ALPHA | SET_ALPHA }, BLIT_FEATURE_HAS_ALTIVEC, Blit_RGB555_32Altivec, NO_ALPHA | COPY_ALPHA | SET_ALPHA },
#endif // BROKEN_ALTIVEC_BLITTERS
#endif #endif
#ifdef SDL_SSE4_1_INTRINSICS #ifdef SDL_SSE4_1_INTRINSICS
{ 0x0000F800, 0x000007E0, 0x0000001F, 4, 0x00FF0000, 0x0000FF00, 0x000000FF, { 0x0000F800, 0x000007E0, 0x0000001F, 4, 0x00FF0000, 0x0000FF00, 0x000000FF,