Panagiotis Christopoulos Charitos 3 years ago
parent
commit
a27dc25a61

+ 0 - 11
AnKi/ShaderCompiler/ShaderProgramParser.cpp

@@ -281,17 +281,6 @@ Vec4 pow(Vec4 a, F32 b)
 
 static const U64 SHADER_HEADER_HASH = computeHash(SHADER_HEADER, sizeof(SHADER_HEADER));
 
-class ShaderProgramParser::PartialMutationSkip
-{
-public:
-	DynamicArrayAuto<MutatorValue> m_partialMutation;
-
-	PartialMutationSkip(const GenericMemoryPoolAllocator<U8>& alloc)
-		: m_partialMutation(alloc)
-	{
-	}
-};
-
 ShaderProgramParser::ShaderProgramParser(CString fname, ShaderProgramFilesystemInterface* fsystem,
 										 GenericMemoryPoolAllocator<U8> alloc,
 										 const ShaderCompilerOptions& compilerOptions)

+ 10 - 1
AnKi/ShaderCompiler/ShaderProgramParser.h

@@ -186,7 +186,16 @@ private:
 	using Member = ShaderProgramParserMember;
 	using GhostStruct = ShaderProgramParserGhostStruct;
 
-	class PartialMutationSkip;
+	class PartialMutationSkip
+	{
+	public:
+		DynamicArrayAuto<MutatorValue> m_partialMutation;
+
+		PartialMutationSkip(const GenericMemoryPoolAllocator<U8>& alloc)
+			: m_partialMutation(alloc)
+		{
+		}
+	};
 
 	static constexpr U32 MAX_INCLUDE_DEPTH = 8;
 

+ 0 - 7
Tests/ShaderCompiler/ShaderProgramParser.cpp

@@ -23,8 +23,6 @@ ANKI_TEST(ShaderCompiler, ShaderCompilerParser)
 #pragma anki mutator M0 1 2
 #pragma anki mutator M1 3 4
 
-#pragma anki rewrite_mutation M0 2 M1 4 to M0 1 M1 3
-
 #pragma anki start vert
 
 // vert
@@ -54,10 +52,5 @@ ANKI_TEST(ShaderCompiler, ShaderCompilerParser)
 	ShaderProgramParserVariant variant;
 	ANKI_TEST_EXPECT_NO_ERR(parser.generateVariant(mutation, variant));
 
-	// Test rewrite
-	ANKI_TEST_EXPECT_EQ(parser.rewriteMutation(mutation), true);
-	ANKI_TEST_EXPECT_EQ(mutation[0], 1);
-	ANKI_TEST_EXPECT_EQ(mutation[1], 3);
-
 	// printf("%s\n", variant.getSource(ShaderType::VERTEX).cstr());
 }