mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-06-05 02:38:28 +00:00
triangle: don't read destination pixel when you're going to discard it anyways
This commit is contained in:
parent
2d5c05a69c
commit
43c57e3239
|
@ -789,6 +789,7 @@ static void SDL_BlitTriangle_Slow(SDL_BlitInfo *info,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ((flags & (SDL_COPY_BLEND | SDL_COPY_ADD | SDL_COPY_MOD | SDL_COPY_MUL))) {
|
||||||
if (FORMAT_HAS_ALPHA(dstfmt_val)) {
|
if (FORMAT_HAS_ALPHA(dstfmt_val)) {
|
||||||
DISEMBLE_RGBA(dst, dstbpp, dst_fmt, dstpixel, dstR, dstG, dstB, dstA);
|
DISEMBLE_RGBA(dst, dstbpp, dst_fmt, dstpixel, dstR, dstG, dstB, dstA);
|
||||||
} else if (FORMAT_HAS_NO_ALPHA(dstfmt_val)) {
|
} else if (FORMAT_HAS_NO_ALPHA(dstfmt_val)) {
|
||||||
|
@ -799,6 +800,10 @@ static void SDL_BlitTriangle_Slow(SDL_BlitInfo *info,
|
||||||
dstpixel = *((Uint32 *) (dst));
|
dstpixel = *((Uint32 *) (dst));
|
||||||
RGBA_FROM_ARGB2101010(dstpixel, dstR, dstG, dstB, dstA);
|
RGBA_FROM_ARGB2101010(dstpixel, dstR, dstG, dstB, dstA);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
/* don't care */
|
||||||
|
dstR = dstG = dstB = dstA = 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (!is_uniform) {
|
if (!is_uniform) {
|
||||||
TRIANGLE_GET_COLOR
|
TRIANGLE_GET_COLOR
|
||||||
|
|
Loading…
Reference in a new issue