From 586ec2a39fc0b81dbd4fcec33a6b80c894dc7f96 Mon Sep 17 00:00:00 2001 From: wheremyfoodat <44909372+wheremyfoodat@users.noreply.github.com> Date: Sun, 20 Oct 2024 17:14:30 +0300 Subject: [PATCH] NEON: Fix vertex count comparison for index buffer analysis --- include/PICA/pica_simd.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/PICA/pica_simd.hpp b/include/PICA/pica_simd.hpp index 3ffc7ad4..8f4bbb04 100644 --- a/include/PICA/pica_simd.hpp +++ b/include/PICA/pica_simd.hpp @@ -57,7 +57,7 @@ namespace PICA::IndexBuffer { uint16x8_t minima = vdupq_n_u16(0xffff); uint16x8_t maxima = vdupq_n_u16(0); - while (vertexCount > vertsPerLoop) { + while (vertexCount >= vertsPerLoop) { const uint16x8_t data = vld1q_u16(reinterpret_cast(indexBuffer)); minima = vminq_u16(data, minima); maxima = vmaxq_u16(data, maxima); @@ -86,7 +86,7 @@ namespace PICA::IndexBuffer { uint8x16_t minima = vdupq_n_u8(0xff); uint8x16_t maxima = vdupq_n_u8(0); - while (vertexCount > vertsPerLoop) { + while (vertexCount >= vertsPerLoop) { uint8x16_t data = vld1q_u8(indexBuffer); minima = vminq_u8(data, minima); maxima = vmaxq_u8(data, maxima);