From a342080a4d58a5a1a3597ac34b0335202ec7c435 Mon Sep 17 00:00:00 2001 From: "Nathan V. Morrical" Date: Tue, 4 May 2021 12:52:58 -0700 Subject: Add support for RaytracingAccelerationStructure type for PTX targets (#1831) * enabling command line compiler to output PTX with multiple entry points. * adding some simple optix intrinsics to slang * Now handling the kIROp_RaytracingAccelerationStructureType for CUDA. Source seems to generate correctly, but accels are always optimized out of resulting PTX due to no trace calls * fixing unnecessary diff with master * allowing unhandled untyped buffers to fall through to super::calcTypeName Co-authored-by: Tim Foley --- source/slang/slang-emit-cuda.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'source') diff --git a/source/slang/slang-emit-cuda.cpp b/source/slang/slang-emit-cuda.cpp index b0c2cc02b..dbe089723 100644 --- a/source/slang/slang-emit-cuda.cpp +++ b/source/slang/slang-emit-cuda.cpp @@ -314,6 +314,20 @@ SlangResult CUDASourceEmitter::calcTypeName(IRType* type, CodeGenTarget target, } } + if (auto untypedBufferType = as(type)) { + switch (untypedBufferType->getOp()) + { + case kIROp_RaytracingAccelerationStructureType: + { + m_writer->emit("OptixTraversableHandle"); + return SLANG_OK; + break; + } + + default: break; + } + } + return Super::calcTypeName(type, target, out); } -- cgit v1.2.3