瀏覽代碼

bvh: promote upstream fix for x86 MSVC/armeabi-v7a NDK/WASM (#7419)

* bvh: promote upstream fix for x86 MSVC/armeabi-v7a NDK/WASM

* cl
Saikari 6 月之前
父節點
當前提交
c25864902b
共有 2 個文件被更改,包括 1 次插入42 次删除
  1. 0 40
      packages/b/bvh/patches/2025.02.03/fix-narrow.diff
  2. 1 2
      packages/b/bvh/xmake.lua

+ 0 - 40
packages/b/bvh/patches/2025.02.03/fix-narrow.diff

@@ -1,40 +0,0 @@
-diff --git a/src/bvh/v2/index.h b/src/bvh/v2/index.h
-index 7120031..2fe40cc 100644
---- a/src/bvh/v2/index.h
-+++ b/src/bvh/v2/index.h
-@@ -54,30 +54,21 @@ struct Index {
-     BVH_ALWAYS_INLINE bool is_inner() const { return !is_leaf(); }
- 
-     BVH_ALWAYS_INLINE void set_first_id(size_t first_id) {
--        *this = Index { first_id, prim_count() };
-+        *this = make_leaf(first_id, prim_count());
-     }
- 
-     BVH_ALWAYS_INLINE void set_prim_count(size_t prim_count) {
--        *this = Index { first_id(), prim_count };
-+        *this = make_leaf(first_id(), prim_count);
-     }
- 
-     static BVH_ALWAYS_INLINE Index make_leaf(size_t first_prim, size_t prim_count) {
-         assert(prim_count != 0);
--        return Index { first_prim, prim_count };
-+        return Index { (static_cast<Type>(first_prim) << prim_count_bits) |
-+                        (static_cast<Type>(prim_count) & max_prim_count) };
-     }
- 
-     static BVH_ALWAYS_INLINE Index make_inner(size_t first_child) {
--        return Index { first_child, 0 };
--    }
--
--private:
--    explicit Index(size_t first_id, size_t prim_count)
--        : Index(
--            (static_cast<Type>(first_id) << prim_count_bits) |
--            (static_cast<Type>(prim_count) & max_prim_count))
--    {
--        assert(first_id   <= static_cast<size_t>(max_first_id));
--        assert(prim_count <= static_cast<size_t>(max_prim_count));
-+        return Index { static_cast<Type>(first_child) << prim_count_bits };
-     }
- };
- 

+ 1 - 2
packages/b/bvh/xmake.lua

@@ -6,8 +6,7 @@ package("bvh")
     add_urls("https://github.com/madmann91/bvh.git")
     add_versions("2023.6.30", "578b1e8035743d0a97fcac802de81622c54f28e3")
     add_versions("2024.7.8", "77a08cac234bae46abbb5e78c73e8f3c158051d0")
-    add_versions("2025.02.03", "fbdc59615112d471409515cd2ab826fcc3100fd7")
-    add_patches("2025.02.03", "patches/2025.02.03/fix-narrow.diff", "5df510bb0ac8b23b29e68fb69ad190b3cfae4d441d44a4f2ad5d63e7e0752a22")
+    add_versions("2025.06.16", "ac41ab88a32d0c247009d8ed456fd2795c1ee023")
 
     add_configs("shared", {description = "Build shared library.", default = true, type = "boolean"})
     add_configs("c_api",  {description = "Builds the C API library wrapper", default = true, type = "boolean"})