1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-10 15:04:32 +03:00

window: disable alignment based optimization for fill_pixel

This commit is contained in:
Wez Furlong 2019-09-29 20:59:20 -07:00
parent 1e25003cb6
commit 07fcc96f5a

View File

@ -49,6 +49,7 @@ mod avx2 {
size & !(align - 1)
}
#[allow(dead_code)]
#[inline]
fn is_aligned(size: usize, align: usize) -> bool {
size == align_lo(size, align)
@ -65,6 +66,7 @@ mod avx2 {
let bgra256 = std::arch::x86_64::_mm256_set1_epi32(color.0 as _);
let aligned_width = align_lo(width_pixels, 8);
/* disabled for now; I think there is something fishy about the alignment check
if is_aligned(dest as usize, 32) {
for _row in 0..height_pixels {
for col in (0..aligned_width).step_by(8) {
@ -81,7 +83,9 @@ mod avx2 {
}
dest = dest.offset(stride_bytes as isize);
}
} else {
} else
*/
{
for _row in 0..height_pixels {
for col in (0..aligned_width).step_by(8) {
std::arch::x86_64::_mm256_storeu_si256(