ソースを参照

Some Linux fixes

Panagiotis Christopoulos Charitos 1 週間 前
コミット
2eba95f138

+ 3 - 3
AnKi/Importer/GltfImporter.cpp

@@ -225,7 +225,7 @@ static Error getExtra(const ImporterHashMap<CString, ImporterString>& extras, CS
 			return Error::kUserData;
 		}
 
-		U count = 0;
+		U32 count = 0;
 		for(auto& token : tokens)
 		{
 			F32 f;
@@ -916,7 +916,7 @@ Error GltfImporter::writeTransform(const Transform& trf)
 
 	ANKI_CHECK(m_sceneFile.writeText("rot = Mat3.new()\n"));
 	ANKI_CHECK(m_sceneFile.writeText("rot:setAll("));
-	for(U i = 0; i < 9; i++)
+	for(U32 i = 0; i < 9; i++)
 	{
 		ANKI_CHECK(m_sceneFile.writeTextf((i != 8) ? "%f, " : "%f)\n", trf.getRotation().getRotationPart()[i]));
 	}
@@ -980,7 +980,7 @@ Error GltfImporter::writeSkeleton(const cgltf_skin& skin) const
 		ANKI_CHECK(getNodeTransform(boneNode, trf));
 		Mat3x4 mat(trf);
 		ANKI_CHECK(file.writeText("transform=\""));
-		for(U j = 0; j < 12; j++)
+		for(U32 j = 0; j < 12; j++)
 		{
 			ANKI_CHECK(file.writeTextf("%f ", mat[j]));
 		}

+ 1 - 1
AnKi/Importer/GltfImporterMesh.cpp

@@ -731,7 +731,7 @@ Error GltfImporter::writeMeshInternal(const cgltf_mesh& mesh) const
 
 	// Compute the pos scale and transform. The scale is uniform because it's applied to the model matrix of the object
 	F32 posScale = kMinF32;
-	for(U c = 0; c < 3; c++)
+	for(U32 c = 0; c < 3; c++)
 	{
 		posScale = max(posScale, aabbMax[c] - aabbMin[c]);
 	}

+ 1 - 1
AnKi/Math/Vec.h

@@ -890,7 +890,7 @@ public:
 		if constexpr(kVec4Simd)
 		{
 #if ANKI_SIMD_SSE
-			m_simd = _mm_load_ps(arr);
+			m_simd = _mm_loadu_ps(arr); // _mm_loadu_ps doesn't require arr to be 16 byte aligned unlike _mm_load_ps
 #else
 			m_simd = vld1q_f32(arr);
 #endif

+ 2 - 1
Samples/Sponza/Main.cpp

@@ -12,8 +12,9 @@ class MyApp : public SampleApp
 public:
 	using SampleApp::SampleApp;
 
-	Error userPostInit() final
+	Error userPreInit() final
 	{
+		ANKI_CHECK(SampleApp::userPreInit());
 		g_cvarCoreStartupScene = "Assets/Scene.lua";
 		return Error::kNone;
 	}