summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-type-layout.cpp
diff options
context:
space:
mode:
authorJay Kwak <82421531+jkwak-work@users.noreply.github.com>2024-06-12 23:06:11 -0700
committerGitHub <noreply@github.com>2024-06-12 23:06:11 -0700
commit0bf0bf77ac697d2a0fc7d90ec2899c6393b4306a (patch)
tree1752c5803a1573db3a5e9082213307992d745895 /source/slang/slang-type-layout.cpp
parentb970b88b7054c3eb82f147364961ce57477fbd56 (diff)
Implement Sampler2D for CPP target (#4371)
Closes #4267 Co-authored-by: Yong He <yonghe@outlook.com>
Diffstat (limited to 'source/slang/slang-type-layout.cpp')
-rw-r--r--source/slang/slang-type-layout.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/source/slang/slang-type-layout.cpp b/source/slang/slang-type-layout.cpp
index 623483efe..1aeaceb72 100644
--- a/source/slang/slang-type-layout.cpp
+++ b/source/slang/slang-type-layout.cpp
@@ -1057,6 +1057,12 @@ struct CPUObjectLayoutRulesImpl : ObjectLayoutRulesImpl
case ShaderParameterKind::TextureSampler:
case ShaderParameterKind::MutableTextureSampler:
+ {
+ ObjectLayoutInfo info;
+ info.layoutInfos.add(SimpleLayoutInfo(LayoutResourceKind::Uniform, sizeof(void*), SLANG_ALIGN_OF(void*)));
+ info.layoutInfos.add(SimpleLayoutInfo(LayoutResourceKind::Uniform, sizeof(void*), SLANG_ALIGN_OF(void*)));
+ return info;
+ }
case ShaderParameterKind::InputRenderTarget:
// TODO: how to handle these?
default:
@@ -1447,11 +1453,11 @@ LayoutRulesImpl* CPULayoutRulesFamilyImpl::getTextureBufferRules()
LayoutRulesImpl* CPULayoutRulesFamilyImpl::getVaryingInputRules()
{
- return nullptr;
+ return &kCPULayoutRulesImpl_;
}
LayoutRulesImpl* CPULayoutRulesFamilyImpl::getVaryingOutputRules()
{
- return nullptr;
+ return &kCPULayoutRulesImpl_;
}
LayoutRulesImpl* CPULayoutRulesFamilyImpl::getSpecializationConstantRules()
{