diff options
Diffstat (limited to 'source/slang/slang-check-modifier.cpp')
| -rw-r--r-- | source/slang/slang-check-modifier.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source/slang/slang-check-modifier.cpp b/source/slang/slang-check-modifier.cpp index e597407e2..320b980e9 100644 --- a/source/slang/slang-check-modifier.cpp +++ b/source/slang/slang-check-modifier.cpp @@ -539,6 +539,24 @@ namespace Slang } dllImportAttr->modulePath = libraryName; } + else if (auto rayPayloadAttr = as<VulkanRayPayloadAttribute>(attr)) + { + SLANG_ASSERT(attr->args.getCount() == 1); + auto val = checkConstantIntVal(attr->args[0]); + + if (!val) return false; + + rayPayloadAttr->location = (int32_t)val->value; + } + else if (auto callablePayloadAttr = as<VulkanCallablePayloadAttribute>(attr)) + { + SLANG_ASSERT(attr->args.getCount() == 1); + auto val = checkConstantIntVal(attr->args[0]); + + if (!val) return false; + + callablePayloadAttr->location = (int32_t)val->value; + } else { if(attr->args.getCount() == 0) |
