diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2022-05-06 16:35:15 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-06 16:35:15 -0400 |
| commit | 117f5e554839efc13066517461eafaf8f2fd96c6 (patch) | |
| tree | 5ee76efce85beccd28371adabbcedfce7eb05e7b /source | |
| parent | b915ae662b2e4bcaaeb6da62eb964356d0a978b4 (diff) | |
Initial work around groupshared (#2224)
* #include an absolute path didn't work - because paths were taken to always be relative.
* Allow rate modifier on parameter.
* Add test.
* Disable test for now as breaks on source comparison because around nvAPI.
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-emit-hlsl.cpp | 2 | ||||
| -rw-r--r-- | source/slang/slang-lower-to-ir.cpp | 6 |
2 files changed, 8 insertions, 0 deletions
diff --git a/source/slang/slang-emit-hlsl.cpp b/source/slang/slang-emit-hlsl.cpp index 945f00499..c319f2738 100644 --- a/source/slang/slang-emit-hlsl.cpp +++ b/source/slang/slang-emit-hlsl.cpp @@ -1041,6 +1041,8 @@ void HLSLSourceEmitter::_emitPrefixTypeAttr(IRAttr* attr) void HLSLSourceEmitter::emitSimpleFuncParamImpl(IRParam* param) { + emitRateQualifiers(param); + if (auto decor = param->findDecoration<IRGeometryInputPrimitiveTypeDecoration>()) { switch (decor->getOp()) diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp index a185efba9..9fec8f839 100644 --- a/source/slang/slang-lower-to-ir.cpp +++ b/source/slang/slang-lower-to-ir.cpp @@ -2489,6 +2489,7 @@ IRLoweringParameterInfo getParameterInfo( DeclRef<VarDeclBase> const& paramDecl) { IRLoweringParameterInfo info; + info.type = getType(context->astBuilder, paramDecl); info.decl = paramDecl; info.direction = getParameterDirection(paramDecl); @@ -2698,6 +2699,11 @@ void _lowerFuncDeclBaseTypeInfo( irParamType = maybeGetConstExprType(builder, irParamType, paramInfo.decl); } + if (paramInfo.decl && paramInfo.decl->hasModifier<HLSLGroupSharedModifier>()) + { + irParamType = builder->getRateQualifiedType(builder->getGroupSharedRate(), irParamType); + } + paramTypes.add(irParamType); } |
