From bc6b82666fa4deda932c36cea93ee2059e0992b2 Mon Sep 17 00:00:00 2001 From: Yong He Date: Fri, 5 Sep 2025 22:37:34 -0700 Subject: Relax restriction on using link-time types for shader parameters. (#8387) This change relaxes a previous restriction on link-time types and constants, so that we now allow them to be used to define shader parameters. Doing so will result in a parameter layout that is incomplete prior to linking. The PR added a test to call the reflection API on a fully linked program and ensure that we can report correct binding info. --- source/slang/slang-parameter-binding.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/slang/slang-parameter-binding.cpp') diff --git a/source/slang/slang-parameter-binding.cpp b/source/slang/slang-parameter-binding.cpp index 4b91056fc..b79f96022 100644 --- a/source/slang/slang-parameter-binding.cpp +++ b/source/slang/slang-parameter-binding.cpp @@ -2420,7 +2420,7 @@ static RefPtr processEntryPointVaryingParameter( if (auto structDeclRef = declRef.as()) { RefPtr structLayout = new StructTypeLayout(); - structLayout->type = type; + structLayout->type = declRefType; // We will recursively walk the fields of a `struct` type // to compute layouts for those fields. -- cgit v1.2.3