From b0b6cf0ac9ea735b5face72c81bb952e807e242b Mon Sep 17 00:00:00 2001 From: Jacco Bikker Date: Wed, 11 Dec 2024 15:32:07 +0100 Subject: [PATCH] Exclude AVX stuff for unsupported platforms. --- tiny_bvh_speedtest.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tiny_bvh_speedtest.cpp b/tiny_bvh_speedtest.cpp index c5c20a4..b580c90 100644 --- a/tiny_bvh_speedtest.cpp +++ b/tiny_bvh_speedtest.cpp @@ -205,7 +205,9 @@ float TestShadowRays( uint32_t layout, Ray* batch, unsigned N, unsigned passes ) switch (layout) { case _DEFAULT: for (unsigned i = 0; i < N; i++) occluded += bvh->IsOccluded( batch[i] ); break; + #ifdef BVH_USEAVX case _SOA: for (unsigned i = 0; i < N; i++) occluded += bvh_soa->IsOccluded( batch[i] ); break; + #endif case _GPU2: for (unsigned i = 0; i < N; i++) occluded += bvh_gpu->IsOccluded( batch[i] ); break; case _CPU4: for (unsigned i = 0; i < N; i++) occluded += bvh4_cpu->IsOccluded( batch[i] ); break; default: break;