ARM64 fix

This commit is contained in:
Paul 2026-04-05 20:41:33 +03:00
parent 65839287b4
commit 52098cc704
2 changed files with 10 additions and 3 deletions

View file

@ -24,6 +24,14 @@
namespace wowee {
namespace rendering {
// Thread-local scratch buffers for collision queries (moved from header to
// avoid inline thread_local TLS init linker errors on Windows ARM64 / LLD).
namespace m2_internal {
thread_local std::vector<size_t> tl_m2_candidateScratch;
thread_local std::unordered_set<uint32_t> tl_m2_candidateIdScratch;
thread_local std::vector<uint32_t> tl_m2_collisionTriScratch;
} // namespace m2_internal
void M2Renderer::setInstancePosition(uint32_t instanceId, const glm::vec3& position) {
auto idxIt = instanceIndexById.find(instanceId);
if (idxIt == instanceIndexById.end()) return;

View file

@ -231,9 +231,8 @@ inline glm::vec3 closestPointOnTriangle(const glm::vec3& p,
}
// ---- Thread-local scratch buffers for collision queries ----
inline thread_local std::vector<size_t> tl_m2_candidateScratch;
inline thread_local std::unordered_set<uint32_t> tl_m2_candidateIdScratch;
inline thread_local std::vector<uint32_t> tl_m2_collisionTriScratch;
// Defined in m2_renderer_instance.cpp (inline thread_local causes LLD linker
// errors on Windows ARM64, so the definitions live in the single TU that uses them).
// ---- Bone animation helpers ----