diff options
Diffstat (limited to 'source/slang/slang.cpp')
| -rw-r--r-- | source/slang/slang.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index f8af39fcb..eed172bbf 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -939,6 +939,8 @@ SLANG_NO_THROW slang::TypeReflection* SLANG_MCALL Linkage::getContainerType( { ConstantBufferType* cbType = getASTBuilder()->create<ConstantBufferType>(); cbType->elementType = type; + cbType->declRef = getASTBuilder()->getBuiltinDeclRef( + "ConstantBuffer", makeConstArrayView<Val*>(static_cast<Val*>(type))); containerTypeReflection = cbType; } break; @@ -946,6 +948,8 @@ SLANG_NO_THROW slang::TypeReflection* SLANG_MCALL Linkage::getContainerType( { ParameterBlockType* pbType = getASTBuilder()->create<ParameterBlockType>(); pbType->elementType = type; + pbType->declRef = getASTBuilder()->getBuiltinDeclRef( + "ParameterBlock", makeConstArrayView<Val*>(static_cast<Val*>(type))); containerTypeReflection = pbType; } break; @@ -954,14 +958,14 @@ SLANG_NO_THROW slang::TypeReflection* SLANG_MCALL Linkage::getContainerType( HLSLStructuredBufferType* sbType = getASTBuilder()->create<HLSLStructuredBufferType>(); sbType->elementType = type; + sbType->declRef = getASTBuilder()->getBuiltinDeclRef( + "HLSLStructuredBufferType", makeConstArrayView<Val*>(static_cast<Val*>(type))); containerTypeReflection = sbType; } break; case slang::ContainerType::UnsizedArray: { - ArrayExpressionType* arrType = getASTBuilder()->create<ArrayExpressionType>(); - arrType->baseType = type; - arrType->arrayLength = nullptr; + ArrayExpressionType* arrType = getASTBuilder()->getArrayType(type, nullptr); containerTypeReflection = arrType; } break; |
