diff options
| -rw-r--r-- | source/slang/lower-to-ir.cpp | 1 | ||||
| -rw-r--r-- | tools/render-test/slang-support.cpp | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/source/slang/lower-to-ir.cpp b/source/slang/lower-to-ir.cpp index 53cb2e772..b99e2713f 100644 --- a/source/slang/lower-to-ir.cpp +++ b/source/slang/lower-to-ir.cpp @@ -2870,6 +2870,7 @@ struct DeclLoweringVisitor : DeclVisitor<DeclLoweringVisitor, LoweredValInfo> if (parentDecl->ParentDecl) witnessTable->genericDecl = dynamic_cast<GenericDecl*>(parentDecl->ParentDecl); witnessTable->subTypeDeclRef = makeDeclRef(parentDecl); + witnessTable->subTypeDeclRef.substitutions = createDefaultSubstitutions(context->getSession(), parentDecl); witnessTable->supTypeDeclRef = inheritanceDecl->base.type->AsDeclRefType()->declRef; // Register the value now, rather than later, to avoid diff --git a/tools/render-test/slang-support.cpp b/tools/render-test/slang-support.cpp index 2a6401d5b..5599a3396 100644 --- a/tools/render-test/slang-support.cpp +++ b/tools/render-test/slang-support.cpp @@ -99,8 +99,9 @@ struct SlangShaderCompilerWrapper : public ShaderCompiler spFindProfile(slangSession, request.computeShader.profile), (int)rawTypeNames.Count(), rawTypeNames.Buffer()); - int compileErr = spCompile(slangRequest); + spSetLineDirectiveMode(slangRequest, SLANG_LINE_DIRECTIVE_MODE_NONE); + int compileErr = spCompile(slangRequest); if (auto diagnostics = spGetDiagnosticOutput(slangRequest)) { fprintf(stderr, "%s", diagnostics); |
