Skip to content

Commit

Permalink
NEON: Fix vertex count comparison for index buffer analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
wheremyfoodat authored Oct 20, 2024
1 parent d97059c commit 586ec2a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/PICA/pica_simd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<u16*>(indexBuffer));
minima = vminq_u16(data, minima);
maxima = vmaxq_u16(data, maxima);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 586ec2a

Please sign in to comment.