From 3f6ed10a5d6fcbccf9e3ad0c3504522691ac40a8 Mon Sep 17 00:00:00 2001 From: jfons Date: Thu, 30 Sep 2021 01:53:19 +0200 Subject: Occlusion culling fixes Fixes some issues found by UBSAN and other misc things: * Fixed memory leak on exit. * Properly align ray packet buffer to 64 bytes. * Added some compiler flags from Embree's build system. * Fixed ray masks. --- modules/raycast/SCsub | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'modules/raycast/SCsub') diff --git a/modules/raycast/SCsub b/modules/raycast/SCsub index 1fdc8fe1b3..2efd75b625 100644 --- a/modules/raycast/SCsub +++ b/modules/raycast/SCsub @@ -86,6 +86,20 @@ if env["builtin_embree"]: # Embree needs those, it will automatically use SSE2NEON in ARM env_thirdparty.Append(CPPDEFINES=["__SSE2__", "__SSE__"]) + if not env.msvc: + env_thirdparty.Append( + CPPFLAGS=[ + "-fno-strict-overflow", + "-fno-delete-null-pointer-checks", + "-fwrapv", + "-fsigned-char", + "-fno-strict-aliasing", + "-fno-tree-vectorize", + "-fvisibility=hidden", + "-fvisibility-inlines-hidden", + ] + ) + env.modules_sources += thirdparty_obj -- cgit v1.2.3