summaryrefslogtreecommitdiffstats
path: root/source/slang/emit.cpp
diff options
context:
space:
mode:
authorYong He <yongh@outlook.com>2018-01-09 13:26:42 -0800
committerYong He <yonghe@outlook.com>2018-01-12 23:55:38 -0500
commit4b284daeb0cc3f6df0835befad4326c81abeb374 (patch)
treead8d29e14cc483f2eb66bcae7b0f7ffdfd574b86 /source/slang/emit.cpp
parentdf6eeb93c1718334779ae328db277cdf7a9d7b04 (diff)
Support nested generics
fixes #362
Diffstat (limited to 'source/slang/emit.cpp')
-rw-r--r--source/slang/emit.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/slang/emit.cpp b/source/slang/emit.cpp
index 41ae819d9..33328fbb1 100644
--- a/source/slang/emit.cpp
+++ b/source/slang/emit.cpp
@@ -4947,7 +4947,7 @@ emitDeclImpl(decl, nullptr);
{
auto type = inst->getType();
- if(type->As<UniformParameterGroupType>())
+ if(type->As<UniformParameterGroupType>() && !type->As<ParameterBlockType>())
{
// TODO: we need to be careful here, because
// HLSL shader model 6 allows these as explicit
@@ -6341,7 +6341,7 @@ emitDeclImpl(decl, nullptr);
{
// We don't want to declare generic functions,
// because none of our targets actually support them.
- if(func->genericDecl)
+ if(func->getGenericDecl())
return;
// We also don't want to emit declarations for operations
@@ -6453,7 +6453,7 @@ emitDeclImpl(decl, nullptr);
EmitContext* ctx,
IRFunc* func)
{
- if(func->genericDecl)
+ if(func->getGenericDecl())
{
Emit("/* ");
emitIRFuncDecl(ctx, func);
@@ -7110,7 +7110,7 @@ emitDeclImpl(decl, nullptr);
// Don't emit anything for a generic function,
// since we only care about the types used by
// the actual specializations.
- if (irFunc->genericDecl)
+ if (irFunc->getGenericDecl())
return;
emitIRUsedType(ctx, irFunc->getResultType());