Skip to content

Commit

Permalink
Merge branch 'gz-common5' into collada_acceleration
Browse files Browse the repository at this point in the history
  • Loading branch information
azeey authored Jul 19, 2024
2 parents 1aaba8f + 1ffd6ef commit c0a5bc1
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions graphics/src/VHACD/VHACD.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@
#include <stdint.h>
#include <functional>

// Local modification done by @iche033
// The m_voxelHullCount variable type is changed from
// uint32_t to std::atomic<uint32_t>
// to fix data race issue picked up by TSAN
#include <atomic>

#include <vector>
#include <array>
#include <cmath>
Expand Down Expand Up @@ -5965,12 +5971,12 @@ class VoxelHull
std::unordered_map<uint32_t, uint32_t> m_voxelIndexMap; // Maps from a voxel coordinate space into a vertex index space
std::vector<VHACD::Vertex> m_vertices;
std::vector<VHACD::Triangle> m_indices;
static uint32_t m_voxelHullCount;
static std::atomic<uint32_t> m_voxelHullCount;
IVHACD::Parameters m_params;
VHACDCallbacks* m_callbacks{ nullptr };
};

uint32_t VoxelHull::m_voxelHullCount = 0;
std::atomic<uint32_t> VoxelHull::m_voxelHullCount = 0;

VoxelHull::VoxelHull(const VoxelHull& parent,
SplitAxis axis,
Expand Down

0 comments on commit c0a5bc1

Please sign in to comment.