Skip to content

Commit 5c66561

Browse files
authored
Align writing of generated Slang shaders with GLSL (#2698)
This brings GenSlang tests to be in line with GenGlsl, and disables the writing of tested shaders to disk. The main motivation is that the tests (both Slang and GLSL) actually currently produce invalid code for the `NG_lightcompoundtest` node, which is confusing.
1 parent f611f6d commit 5c66561

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

source/MaterialXTest/MaterialXGenSlang/GenSlang.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ TEST_CASE("GenShader: Slang Shader Generation", "[genslang]")
151151
generator = mx::SlangShaderGenerator::create();
152152

153153
const mx::FilePath logPath("genslang_generate_test.txt");
154-
SlangShaderGeneratorTester tester(generator, testRootPaths, searchPath, logPath, true);
154+
SlangShaderGeneratorTester tester(generator, testRootPaths, searchPath, logPath, false);
155155

156156
// Handle resource binding layouts if requested.
157157
const mx::GenOptions genOptions;

source/MaterialXTest/MaterialXGenSlang/GenSlang.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class SlangShaderGeneratorTester : public GenShaderUtil::ShaderGeneratorTester
3434
{
3535
_skipNodeDefs.insert("ND_displacement_float");
3636
_skipNodeDefs.insert("ND_displacement_vector3");
37+
_skipNodeDefs.insert("ND_lightcompoundtest");
3738
ParentClass::addSkipNodeDefs();
3839
}
3940

0 commit comments

Comments
 (0)