slang
slang copied to clipboard
Implement raytracing extension(s); resolves #3560 for GLSL & SPIR-V targets
The following PR implements raytracing extension(s) (GLSL_EXT_ray_tracing, GLSL_EXT_ray_query, GLSL_NV_shader_invocation_reorder & GLSL_NV_ray_tracing_motion_blur); for GLSL & SPIR-V targets only: fully implements all functions, fully implements all built-in variables, fully implements all syntax; partially resolves #3560
Raytracing Extensions can be found here: https://github.com/KhronosGroup/GLSL/blob/main/extensions/
notes of worth:
- #3560 is only partially solved since HLSL support was removed
- HLSL support was implemented (added and then removed in an earlier commit for future reference), but was removed at the end due to the implementation being obtuse and likely hard to maintain
- SPIR-V required direct referencing of raytracing objects, as a result, __rayPayloadFromLocation, __rayAttributeFromLocation, and __rayCallableFromLocation, all take in a integer literal and use this to add a placeholder to fill-in with an actual layout(location) bound object.
- tests only test compiling and checks for opcodes emitted