From b3b6c44cb8b8ebc413d41f9ca3833d8242f3c805 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 21 Feb 2024 12:22:31 -0800 Subject: Fix SPIRV lowering issue. (#3608) * Fix SPIRV pointer lowering issue. Fixes #3605. * Add another pointer test. Fixes #3601. * Fixes #3600. * Fix #3595. --- source/slang/slang-emit-spirv.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'source/slang/slang-emit-spirv.cpp') diff --git a/source/slang/slang-emit-spirv.cpp b/source/slang/slang-emit-spirv.cpp index 784ded1c9..b9e868b89 100644 --- a/source/slang/slang-emit-spirv.cpp +++ b/source/slang/slang-emit-spirv.cpp @@ -5287,6 +5287,7 @@ SlangResult emitSPIRVFromIR( for (auto ptrType : context.m_forwardDeclaredPointers) { auto spvPtrType = context.m_mapIRInstToSpvInst[ptrType]; + context.ensureInst(ptrType->getValueType()); auto parent = spvPtrType->parent; spvPtrType->removeFromParent(); parent->addInst(spvPtrType); -- cgit v1.2.3