diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2022-05-10 13:05:18 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-05-10 13:05:18 -0400 |
| commit | 8a02d1302264f37394736f953d318b431f64005e (patch) | |
| tree | 438374f864113ad7b0b65f45ef2f31e621d0f524 /source/slang/slang-ir.cpp | |
| parent | 8c540f216f9fe9366bbe57732063607b41344b9f (diff) | |
Add support for `spirv_literal` (#2227)
* #include an absolute path didn't work - because paths were taken to always be relative.
* Add SPIRVLiteralType, to mark types that have spirv_literal in function parameter output.
* Update test result.
Co-authored-by: Theresa Foley <10618364+tangent-vector@users.noreply.github.com>
Diffstat (limited to 'source/slang/slang-ir.cpp')
| -rw-r--r-- | source/slang/slang-ir.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/slang/slang-ir.cpp b/source/slang/slang-ir.cpp index b3c19d419..84af6459e 100644 --- a/source/slang/slang-ir.cpp +++ b/source/slang/slang-ir.cpp @@ -2616,6 +2616,12 @@ namespace Slang return (IRRefType*) getPtrType(kIROp_RefType, valueType); } + IRSPIRVLiteralType* IRBuilder::getSPIRVLiteralType(IRType* type) + { + IRInst* operands[] = { type }; + return (IRSPIRVLiteralType*)getType(kIROp_SPIRVLiteralType, 1, operands); + } + IRPtrTypeBase* IRBuilder::getPtrType(IROp op, IRType* valueType) { IRInst* operands[] = { valueType }; |
