From 4917d71100aafcc38a81cd99d2a44a4cb3a89a0c Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 15 Nov 2022 15:27:28 -0500 Subject: Shader Execution Reordering for VK (#2491) * #include an absolute path didn't work - because paths were taken to always be relative. * Fixes around MakeMiss. * Add preliminary support for HitObject::MakeHit. * Make Nop. * Add HitObject::TraceRay. * HitObject::Invoke for VK. * Remove line numbers from SER GLSL output. * Add support for HitObjectAttributes Add support for GLSL HitObject.GetAttributes() Simplified code around getting locations. * Be more explicit about requiring GL_EXT_ray_tracing in SER. * Split out LocationTracker from CLikeEmitter. * Small doc improvements. * Add motion ray support. * Use inlining to get correct GLSL behavior around hitObjectNV. * Add assignment HitObject test. * Add a HitObject array test. Shows doesn't work correctly for VK/GLSL. * Add call to `hitObjectGetAttributesNV` before getting attributes. --- source/slang/slang-check-modifier.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source/slang/slang-check-modifier.cpp') diff --git a/source/slang/slang-check-modifier.cpp b/source/slang/slang-check-modifier.cpp index b8ac21e2d..aa28571a7 100644 --- a/source/slang/slang-check-modifier.cpp +++ b/source/slang/slang-check-modifier.cpp @@ -604,6 +604,15 @@ namespace Slang callablePayloadAttr->location = (int32_t)val->value; } + else if (auto hitObjectAttributesAttr = as(attr)) + { + SLANG_ASSERT(attr->args.getCount() == 1); + auto val = checkConstantIntVal(attr->args[0]); + + if (!val) return false; + + hitObjectAttributesAttr->location = (int32_t)val->value; + } else if (auto forwardDerivativeAttr = as(attr)) { SLANG_ASSERT(attr->args.getCount() == 1); -- cgit v1.2.3