diff options
| author | Alexey Panteleev <alpanteleev@nvidia.com> | 2022-05-18 10:57:37 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-18 10:57:37 -0700 |
| commit | 69cb6e8f300d77e74bd2c7dfe15d12e10b38f512 (patch) | |
| tree | c2d23f2883acb28407106a096b55c64111f098b1 /source/slang/slang-reflection-api.cpp | |
| parent | 1148564b9cdbbc8fec4fbecf65b0af60aa6af344 (diff) | |
Support for querying which parameters are used in emitted code (#2239)
See https://github.com/shader-slang/slang/issues/2213
Diffstat (limited to 'source/slang/slang-reflection-api.cpp')
| -rw-r--r-- | source/slang/slang-reflection-api.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/slang/slang-reflection-api.cpp b/source/slang/slang-reflection-api.cpp index 583e000a6..96b1f9004 100644 --- a/source/slang/slang-reflection-api.cpp +++ b/source/slang/slang-reflection-api.cpp @@ -2580,6 +2580,20 @@ SLANG_API unsigned spReflectionParameter_GetBindingSpace(SlangReflectionParamete spReflectionVariableLayout_GetTypeLayout(varLayout))); } +SLANG_API SlangResult spIsParameterLocationUsed( + SlangCompileRequest* request, + SlangInt entryPointIndex, + SlangInt targetIndex, + SlangParameterCategory category, + SlangUInt spaceIndex, + SlangUInt registerIndex, + bool& outUsed) +{ + if (!request) + return SLANG_E_INVALID_ARG; + + return request->isParameterLocationUsed(entryPointIndex, targetIndex, category, spaceIndex, registerIndex, outUsed); +} // Entry Point Reflection |
