summaryrefslogtreecommitdiff
path: root/source/slang/slang-check-overload.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2022-08-16 17:11:54 -0700
committerGitHub <noreply@github.com>2022-08-16 17:11:54 -0700
commit42f49937ffa69c82e333e886952eed027e12340e (patch)
tree08e3e9821dd40e23476060215d589e29092adb53 /source/slang/slang-check-overload.cpp
parente68fab2bda5d979f8d991fc41122bb9aa71849a6 (diff)
Add gfx interface definition in Slang. (#2364)
* Add gfx interface definition in Slang. - add gfx interface definitons in Slang. - fix slang compiler to correctly type-check `out` interface argument. - modify gfx interface to be fully COM compatible - add convenient ShaderProgram creation methods to gfx. * Fix compile errors and warnings. * Update project files * Fix cuda. * Properly implement queryInterface in command encoder impls. Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-check-overload.cpp')
-rw-r--r--source/slang/slang-check-overload.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/source/slang/slang-check-overload.cpp b/source/slang/slang-check-overload.cpp
index 879c49da0..36c93a2e2 100644
--- a/source/slang/slang-check-overload.cpp
+++ b/source/slang/slang-check-overload.cpp
@@ -1443,8 +1443,15 @@ namespace Slang
arg = maybeOpenRef(arg);
}
- for (auto& arg : expr->arguments)
+ auto funcType = as<FuncType>(funcExprType);
+ for (Index i = 0; i < expr->arguments.getCount(); i++)
{
+ auto& arg = expr->arguments[i];
+ if (funcType && i < (Index)funcType->getParamCount())
+ {
+ if (funcType->getParamDirection(i) == kParameterDirection_Out)
+ continue;
+ }
arg = maybeOpenExistential(arg);
}