mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Upgrade Embree and enable ray packets
Minor patch upgrade. Enabling ray packets results in faster processing of ray streams (i.e. occlusion culling buffer updates) at the cost of slightly larger binary sizes. (cherry picked from commits595cbacdf1andeb0f67a541)
This commit is contained in:
committed by
Rémi Verschelde
parent
c54c1b0b6b
commit
759ce9b689
@@ -55,6 +55,9 @@ if env["builtin_embree"]:
|
||||
"kernels/bvh/bvh_builder_sah_mb.cpp",
|
||||
"kernels/bvh/bvh_builder_twolevel.cpp",
|
||||
"kernels/bvh/bvh_intersector1_bvh4.cpp",
|
||||
"kernels/bvh/bvh_intersector_hybrid4_bvh4.cpp",
|
||||
"kernels/bvh/bvh_intersector_stream_bvh4.cpp",
|
||||
"kernels/bvh/bvh_intersector_stream_filters.cpp",
|
||||
]
|
||||
|
||||
thirdparty_sources = [thirdparty_dir + file for file in embree_src]
|
||||
|
||||
@@ -61,6 +61,11 @@ cpp_files = [
|
||||
"kernels/bvh/bvh_builder_twolevel.cpp",
|
||||
"kernels/bvh/bvh_intersector1.cpp",
|
||||
"kernels/bvh/bvh_intersector1_bvh4.cpp",
|
||||
"kernels/bvh/bvh_intersector_hybrid4_bvh4.cpp",
|
||||
"kernels/bvh/bvh_intersector_stream_bvh4.cpp",
|
||||
"kernels/bvh/bvh_intersector_stream_filters.cpp",
|
||||
"kernels/bvh/bvh_intersector_hybrid.cpp",
|
||||
"kernels/bvh/bvh_intersector_stream.cpp",
|
||||
]
|
||||
|
||||
os.chdir("../../thirdparty")
|
||||
@@ -117,7 +122,7 @@ with open(os.path.join(dest_dir, "kernels/config.h"), "w") as config_file:
|
||||
/* #undef EMBREE_GEOMETRY_INSTANCE */
|
||||
/* #undef EMBREE_GEOMETRY_GRID */
|
||||
/* #undef EMBREE_GEOMETRY_POINT */
|
||||
/* #undef EMBREE_RAY_PACKETS */
|
||||
#define EMBREE_RAY_PACKETS
|
||||
/* #undef EMBREE_COMPACT_POLYS */
|
||||
|
||||
#define EMBREE_CURVE_SELF_INTERSECTION_AVOIDANCE_FACTOR 2.0
|
||||
@@ -249,3 +254,8 @@ with open(os.path.join(dest_dir, "include/embree3/rtcore_config.h"), "w") as con
|
||||
|
||||
os.chdir("..")
|
||||
shutil.rmtree("embree-tmp")
|
||||
|
||||
subprocess.run(["git", "restore", "embree/patches"])
|
||||
|
||||
for patch in os.listdir("embree/patches"):
|
||||
subprocess.run(["git", "apply", "embree/patches/" + patch])
|
||||
|
||||
Reference in New Issue
Block a user