diff options
Diffstat (limited to 'source/slang/slang-ast-type.cpp')
| -rw-r--r-- | source/slang/slang-ast-type.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/source/slang/slang-ast-type.cpp b/source/slang/slang-ast-type.cpp index a398e2690..2dc746e09 100644 --- a/source/slang/slang-ast-type.cpp +++ b/source/slang/slang-ast-type.cpp @@ -841,6 +841,19 @@ bool ResourceType::isCombined() return false; } +Type* SubpassInputType::getElementType() +{ + return as<Type>(_getGenericTypeArg(this, 0)); +} + +bool SubpassInputType::isMultisample() +{ + auto isMS = _getGenericTypeArg(this, 1); + if (auto constIntVal = as<ConstantIntVal>(isMS)) + return constIntVal->getValue() != 0; + return false; +} + SlangResourceAccess ResourceType::getAccess() { auto access = _getGenericTypeArg(this, kStdlibTextureAccessParameterIndex); |
