From c43f6fa55aca23365c86c6ec1737d42be74d9d3e Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 7 Jan 2025 22:26:31 -0800 Subject: Lower varying parameters as pointers instead of SSA values. (#5919) * Add executable test on matrix-typed vertex input. * Fix emit logic of matrix layout qualifier. * Pass fragment shader varying input by constref to allow EvaluateAttributeAtCentroid etc. to be implemented correctly. --- source/slang/slang-check-decl.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'source/slang/slang-check-decl.cpp') diff --git a/source/slang/slang-check-decl.cpp b/source/slang/slang-check-decl.cpp index ce3f1e64c..3667a36ba 100644 --- a/source/slang/slang-check-decl.cpp +++ b/source/slang/slang-check-decl.cpp @@ -3186,6 +3186,11 @@ void SemanticsDeclVisitorBase::checkModule(ModuleDecl* moduleDecl) } } + if (moduleDecl->findModifier()) + { + moduleDecl->defaultVisibility = DeclVisibility::Public; + } + // We need/want to visit any `import` declarations before // anything else, to make sure that scoping works. // @@ -12604,8 +12609,10 @@ DeclVisibility getDeclVisibility(Decl* decl) } auto defaultVis = DeclVisibility::Default; if (auto parentModule = getModuleDecl(decl)) - defaultVis = - parentModule->isInLegacyLanguage ? DeclVisibility::Public : DeclVisibility::Internal; + { + defaultVis = parentModule->isInLegacyLanguage ? DeclVisibility::Public + : parentModule->defaultVisibility; + } // Members of other agg type decls will have their default visibility capped to the parents'. if (as(decl)) @@ -12790,10 +12797,6 @@ void diagnoseCapabilityProvenance( auto moduleDecl = getModuleDecl(declToPrint); if (thisModule != moduleDecl) break; - if (moduleDecl && moduleDecl->isInLegacyLanguage) - continue; - if (getDeclVisibility(declToPrint) == DeclVisibility::Public) - break; } if (previousDecl == declToPrint) break; -- cgit v1.2.3