Reported-by: Conley Moorhous <conleymoorhous@gmail.com>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=70527
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
{
const uint8_t *src_bytes;
uint8_t *dst_bytes;
- int i;
+ int i, w;
assert(width && height);
assert(bpp >= 8);
}
case 4:
#if USE_SSE2
- if (width * 4 == dst_stride && dst_stride == src_stride) {
- width *= height;
+ w = width;
+ if (w * 4 == dst_stride && dst_stride == src_stride) {
+ w *= height;
height = 1;
}
const uint32_t *s = (const uint32_t *)src_bytes;
__m128i mask = xmm_create_mask_32(or);
- i = width;
+ i = w;
while (i && (uintptr_t)d & 15) {
*d++ = *s++ | or;
i--;
uint32_t *d = (uint32_t *)dst_bytes;
uint32_t *s = (uint32_t *)src_bytes;
- for (i = 0; i < width; i++)
+ for (i = 0; i < w; i++)
d[i] = s[i] | or;
src_bytes += src_stride;