diff options
| author | Yong He <yonghe@outlook.com> | 2018-01-13 13:17:02 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-01-13 13:17:02 -0800 |
| commit | d4dab2cd3a409411c2d7caed01fc02a0fd3e8450 (patch) | |
| tree | 10c92df406a82e7a5eb24b56c17d9256a7183c44 /source/slang/emit.cpp | |
| parent | df6eeb93c1718334779ae328db277cdf7a9d7b04 (diff) | |
| parent | 4d2086f47e25aa4545df95ddfd260c8bc5aafdb2 (diff) | |
Merge pull request #364 from csyonghe/assoctype
Support nested generics
Diffstat (limited to 'source/slang/emit.cpp')
| -rw-r--r-- | source/slang/emit.cpp | 8 |
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()); |
