From a3ac6e71cbc922b7c941c45f23ee18a9fc274d1f Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 11 Jan 2023 15:33:28 -0800 Subject: Make backward differentiation work with generics. (#2586) * Make backward differentiation work with generics. * Fix. * Another fix. * More fix. Co-authored-by: Yong He --- source/slang/slang-ir-entry-point-uniforms.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/slang/slang-ir-entry-point-uniforms.cpp') diff --git a/source/slang/slang-ir-entry-point-uniforms.cpp b/source/slang/slang-ir-entry-point-uniforms.cpp index d98f39515..1f0bc13b1 100644 --- a/source/slang/slang-ir-entry-point-uniforms.cpp +++ b/source/slang/slang-ir-entry-point-uniforms.cpp @@ -404,6 +404,8 @@ struct CollectEntryPointUniformParams : PerEntryPointPass collectedParam = builder.createParam(paramStructType); } + collectedParam->insertBefore(m_entryPoint.func); + // No matter what, the global shader parameter should have the layout // information from the entry point attached to it, so that the // contained parameters will end up in the right place(s). -- cgit v1.2.3