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.
This commit is contained in:
jfons 2021-09-30 01:53:19 +02:00
parent 10801b90f9
commit 3f6ed10a5d
3 changed files with 89 additions and 59 deletions

View file

@ -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