Просмотр исходного кода

Linux and other fixes and optimizations

Panagiotis Christopoulos Charitos 2 лет назад
Родитель
Сommit
cbb3fadc7b

+ 1 - 1
AnKi/Config.h.cmake

@@ -166,7 +166,7 @@
 // Some compiler attributes
 #if ANKI_COMPILER_GCC_COMPATIBLE
 #	define ANKI_RESTRICT __restrict
-#	define ANKI_FORCE_INLINE __attribute__((always_inline))
+#	define ANKI_FORCE_INLINE inline __attribute__((always_inline))
 #	define ANKI_DONT_INLINE __attribute__((noinline))
 #	define ANKI_UNUSED __attribute__((__unused__))
 #	define ANKI_COLD __attribute__((cold, optimize("Os")))

+ 1 - 0
AnKi/ShaderCompiler/ShaderProgramDump.cpp

@@ -171,6 +171,7 @@ void dumpShaderProgramBinary(const ShaderDumpOptions& options, const ShaderProgr
 			spirv_cross::CompilerGLSL::Options options;
 			options.vulkan_semantics = true;
 			options.version = 460;
+			options.force_temporary = true;
 
 			const unsigned int* spvb = reinterpret_cast<const unsigned int*>(code.m_binary.getBegin());
 			ANKI_ASSERT((code.m_binary.getSize() % (sizeof(unsigned int))) == 0);

+ 2 - 2
AnKi/Shaders/GpuVisibility.ankiprog

@@ -40,8 +40,8 @@
 
 	// Frustum test
 	//
-	F32 minPlaneDistance = 0.0f;
-	[unroll] for(U32 i = 0; i < 6; ++i)
+	F32 minPlaneDistance = testPlanePoint(g_unis.m_clipPlanes[0].xyz, g_unis.m_clipPlanes[0].w, aabb.m_sphereCenter);
+	[unroll] for(U32 i = 1; i < 6; ++i)
 	{
 		const F32 d = testPlanePoint(g_unis.m_clipPlanes[i].xyz, g_unis.m_clipPlanes[i].w, aabb.m_sphereCenter);
 		minPlaneDistance = min(minPlaneDistance, d);

+ 1 - 5
AnKi/Shaders/HzbReprojection.ankiprog

@@ -40,11 +40,7 @@
 		return;
 	}
 
-	U32 v;
-	if(svDispatchThreadId.x > 3440 / 2)
-		InterlockedMax(g_hiZUavTex[IVec2(texCoordsf)], asuint(depth), v);
-	else
-		InterlockedMax(g_hiZUavTex[IVec2(uv * hiZTexSize)], asuint(depth), v);
+	InterlockedMax(g_hiZUavTex[IVec2(texCoordsf)], asuint(depth));
 }
 
 #pragma anki end