Skip to content

Commit a342080

Browse files
natevmTim Foley
and
Tim Foley
authored
Add support for RaytracingAccelerationStructure type for PTX targets (shader-slang#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 <tfoleyNV@users.noreply.github.com>
1 parent 1c64316 commit a342080

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

source/slang/slang-emit-cuda.cpp

+14
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,20 @@ SlangResult CUDASourceEmitter::calcTypeName(IRType* type, CodeGenTarget target,
314314
}
315315
}
316316

317+
if (auto untypedBufferType = as<IRUntypedBufferResourceType>(type)) {
318+
switch (untypedBufferType->getOp())
319+
{
320+
case kIROp_RaytracingAccelerationStructureType:
321+
{
322+
m_writer->emit("OptixTraversableHandle");
323+
return SLANG_OK;
324+
break;
325+
}
326+
327+
default: break;
328+
}
329+
}
330+
317331
return Super::calcTypeName(type, target, out);
318332
}
319333

0 commit comments

Comments
 (0)