From 2a9ec4f3bbacf3aa674aad4f81ad945f41f9c68b Mon Sep 17 00:00:00 2001 From: SirLynix Date: Fri, 16 Jun 2023 13:06:11 +0200 Subject: [PATCH] Minor fixes --- include/Nazara/Core.hpp | 2 ++ include/Nazara/Math/BoundingVolume.inl | 2 +- src/Nazara/JoltPhysics3D/JoltRigidBody3D.cpp | 3 +-- src/ShaderNode/ShaderGraph.cpp | 2 +- xmake.lua | 6 ++---- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/include/Nazara/Core.hpp b/include/Nazara/Core.hpp index 02ab1c133..fee5793f1 100644 --- a/include/Nazara/Core.hpp +++ b/include/Nazara/Core.hpp @@ -82,12 +82,14 @@ #include #include #include +#include #include #include #include #include #include #include +#include #include #include #include diff --git a/include/Nazara/Math/BoundingVolume.inl b/include/Nazara/Math/BoundingVolume.inl index 3b909d58b..4cbac0263 100644 --- a/include/Nazara/Math/BoundingVolume.inl +++ b/include/Nazara/Math/BoundingVolume.inl @@ -94,7 +94,7 @@ namespace Nz if (extent != Extent::Finite) return true; - return aabb.ApproxEqual(volume.aabb) && obb.ApproxEqual(volume.obb); + return aabb.ApproxEqual(volume.aabb, maxDifference) && obb.ApproxEqual(volume.obb, maxDifference); } /*! diff --git a/src/Nazara/JoltPhysics3D/JoltRigidBody3D.cpp b/src/Nazara/JoltPhysics3D/JoltRigidBody3D.cpp index 45082cadb..9d7e90b36 100644 --- a/src/Nazara/JoltPhysics3D/JoltRigidBody3D.cpp +++ b/src/Nazara/JoltPhysics3D/JoltRigidBody3D.cpp @@ -247,7 +247,7 @@ namespace Nz } JPH::BodyInterface& bodyInterface = m_world->GetPhysicsSystem()->GetBodyInterface(); - bodyInterface.SetShape(m_body->GetID(), m_geom->GetShapeSettings()->Create().Get(), false, (ShouldActivate()) ? JPH::EActivation::Activate : JPH::EActivation::DontActivate); + bodyInterface.SetShape(m_body->GetID(), shape, false, (ShouldActivate()) ? JPH::EActivation::Activate : JPH::EActivation::DontActivate); if (recomputeInertia) { JPH::MassProperties massProperties = m_body->GetShape()->GetMassProperties(); @@ -361,7 +361,6 @@ namespace Nz { if (m_body) { - JPH::BodyInterface& bodyInterface = m_world->GetPhysicsSystem()->GetBodyInterface(); m_world->UnregisterBody(m_body->GetID(), true, !worldDestruction); m_body = nullptr; } diff --git a/src/ShaderNode/ShaderGraph.cpp b/src/ShaderNode/ShaderGraph.cpp index 2fd5497dd..2aa9da3e4 100644 --- a/src/ShaderNode/ShaderGraph.cpp +++ b/src/ShaderNode/ShaderGraph.cpp @@ -705,7 +705,7 @@ nzsl::Ast::ExpressionType ShaderGraph::ToShaderExpressionType(TextureType type) { switch (type) { - case TextureType::Sampler2D: return nzsl::Ast::SamplerType{ nzsl::ImageType::E2D, nzsl::Ast::PrimitiveType::Float32 }; + case TextureType::Sampler2D: return nzsl::Ast::SamplerType{ nzsl::ImageType::E2D, nzsl::Ast::PrimitiveType::Float32, false }; } assert(false); diff --git a/xmake.lua b/xmake.lua index b1649ac00..fd16fc210 100644 --- a/xmake.lua +++ b/xmake.lua @@ -369,10 +369,8 @@ set_warnings("allextra") if is_mode("debug") then add_rules("debug.suffix") add_defines("NAZARA_DEBUG") -elseif is_mode("asan") then - set_optimize("none") -- by default xmake will optimize asan builds -elseif is_mode("tsan") then - set_optimize("none") -- by default xmake will optimize asan builds +elseif is_mode("asan", "tsan") then + set_optimize("none") -- by default xmake will optimize asan/tsan builds elseif is_mode("coverage") then if not is_plat("windows") then add_links("gcov")