From cc799ba1626836096384f6c85e406db7034d7d8c Mon Sep 17 00:00:00 2001 From: Jacco Bikker Date: Mon, 25 Nov 2024 15:36:58 +0100 Subject: [PATCH] Optimize needs verbose now. --- tiny_bvh_speedtest.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/tiny_bvh_speedtest.cpp b/tiny_bvh_speedtest.cpp index 1cc927e..f5cc441 100644 --- a/tiny_bvh_speedtest.cpp +++ b/tiny_bvh_speedtest.cpp @@ -557,19 +557,11 @@ int main() // trace all rays three times to estimate average performance // - single core version, alternative bvh layout printf( "Optimizing BVH, regular... " ); + bvh.Convert( BVH::WALD_32BYTE, BVH::VERBOSE ); t.reset(); - if (!bvh.refittable) - { - bvh.Optimize( 1000000 ); // optimize the raw SBVH - } - else - { - bvh.buildFlag = BVH::FULLSPLIT; - bvh.Build( triangles, verts / 3 ); // rebuild with full splitting. - bvh.Optimize( 1000000 ); - bvh.MergeLeafs(); - } + bvh.Optimize( 1000000 ); // optimize the raw SBVH printf( "done (%.2fs). New: %i nodes, SAH=%.2f\n", t.elapsed(), bvh.NodeCount( BVH::WALD_32BYTE ), bvh.SAHCost() ); + bvh.Convert( BVH::VERBOSE, BVH::WALD_32BYTE ); bvh.Convert( BVH::WALD_32BYTE, BVH::ALT_SOA ); printf( "- CPU, coherent, 2-way optimized, ST: " ); t.reset();