perf: fix deferred divide precision, threadlocal TLS, MSVC target

Removed deferred divide from both ray-tri functions -- the det-scaled
epsilon comparisons lose precision for near-parallel rays, potentially
accepting triangles the original rejects. Downstream SetupBoxFrustum
then writes to wrong globals near 0xCE6738 (SGroupPtr), causing
ERROR #124 on exit.

inflate_hook: replaced manual FS:0x24 thread ID pool with Zig native
threadlocal. Fixes potential crash on Wine where FS segment layout
may differ.

Build: switched from GNU to MSVC ABI (4-5K smaller per DLL, no
.eh_frame unwind tables). Added setjmp.h stub for libdeflate MSVC
build. Added noperf build variant (zig build noperf).
This commit is contained in:
MarcelineVQ
2026-03-26 11:38:33 -07:00
parent bf5a7aa624
commit 14ba112b0d
7 changed files with 128 additions and 123 deletions
+2 -1
View File
@@ -241,9 +241,10 @@ pub fn main() void {
// AddToSpatialGrid -- linked list requires game state, A/B test in-game only
// bench_addToSpatialGrid();
if (false) { // disabled: not testing these right now
bench_collisionDetection();
bench_rayTriIndexedInt();
if (false) { // disabled
bench_entityUpdate();
}