summaryrefslogtreecommitdiff
path: root/modules/raycast/SCsub
diff options
context:
space:
mode:
authorjfons <joan.fonssanchez@gmail.com>2021-09-30 01:53:19 +0200
committerjfons <joan.fonssanchez@gmail.com>2021-09-30 02:01:36 +0200
commit3f6ed10a5d6fcbccf9e3ad0c3504522691ac40a8 (patch)
treecd606adec811a9a4d2928b6c409508974c57a1b6 /modules/raycast/SCsub
parent10801b90f99eb67b2999e3dc8f42cc82c7799f3e (diff)
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.
Diffstat (limited to 'modules/raycast/SCsub')
-rw-r--r--modules/raycast/SCsub14
1 files changed, 14 insertions, 0 deletions
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