summaryrefslogtreecommitdiff
path: root/source/slang/slang-check-conformance.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2024-02-26 17:00:31 -0800
committerGitHub <noreply@github.com>2024-02-26 17:00:31 -0800
commit39522159c245e32a99cfdc47f03236f7028f5c61 (patch)
tree4ae93fb32f267f7caa5ce55a6a52aac9f1f33bdd /source/slang/slang-check-conformance.cpp
parent1d8e93cd434f0c7acbb6db747b32c3a3720c5c2e (diff)
Allow default values for `extern` symbols. (#3632)
* Allow default values for `extern` symbols. * Fix. * Fix test.
Diffstat (limited to 'source/slang/slang-check-conformance.cpp')
-rw-r--r--source/slang/slang-check-conformance.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/source/slang/slang-check-conformance.cpp b/source/slang/slang-check-conformance.cpp
index 726572d08..e73c0723b 100644
--- a/source/slang/slang-check-conformance.cpp
+++ b/source/slang/slang-check-conformance.cpp
@@ -279,18 +279,16 @@ namespace Slang
}
- Type* SemanticsVisitor::getBufferElementType(Type* type)
+ Type* SemanticsVisitor::getConstantBufferElementType(Type* type)
{
if (auto arrType = as<ArrayExpressionType>(type))
- return getBufferElementType(arrType->getElementType());
+ return getConstantBufferElementType(arrType->getElementType());
if (auto modifiedType = as<ModifiedType>(type))
- return getBufferElementType(modifiedType->getBase());
+ return getConstantBufferElementType(modifiedType->getBase());
if (auto constantBuffer = as<ConstantBufferType>(type))
return constantBuffer->getElementType();
- if (auto structuredBuffer = as<HLSLStructuredBufferTypeBase>(type))
- return structuredBuffer->getElementType();
- if (auto storageBuffer = as<GLSLShaderStorageBufferType>(type))
- return storageBuffer->getElementType();
+ if (auto parameterBlock = as<ParameterBlockType>(type))
+ return parameterBlock->getElementType();
return nullptr;
}