diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/pipeline/ray-tracing/acceleration-structure-in-compute-nv.slang | 20 | ||||
| -rw-r--r-- | tests/pipeline/ray-tracing/acceleration-structure-in-compute-nv.slang.glsl | 18 |
2 files changed, 38 insertions, 0 deletions
diff --git a/tests/pipeline/ray-tracing/acceleration-structure-in-compute-nv.slang b/tests/pipeline/ray-tracing/acceleration-structure-in-compute-nv.slang new file mode 100644 index 000000000..2a9d32ffa --- /dev/null +++ b/tests/pipeline/ray-tracing/acceleration-structure-in-compute-nv.slang @@ -0,0 +1,20 @@ +// acceleration-structure-in-compute.slang + +// Test for using ray-tracing acceleration structures as a shader input +// in non-ray-tracing shader code (that never actually traces rays) + +//TEST:CROSS_COMPILE:-target spirv-asm -stage compute -profile glsl_460+GL_NV_ray_tracing -entry main -DUSE_NV_EXT=1 + +uniform RaytracingAccelerationStructure gScene; + +int helper(RaytracingAccelerationStructure a, int b) +{ + return b; +} + +[shader("compute")] +void main( + uniform RaytracingAccelerationStructure x) +{ + helper(x, 1); +}
\ No newline at end of file diff --git a/tests/pipeline/ray-tracing/acceleration-structure-in-compute-nv.slang.glsl b/tests/pipeline/ray-tracing/acceleration-structure-in-compute-nv.slang.glsl new file mode 100644 index 000000000..5819d657d --- /dev/null +++ b/tests/pipeline/ray-tracing/acceleration-structure-in-compute-nv.slang.glsl @@ -0,0 +1,18 @@ +#version 460 + +#extension GL_NV_ray_tracing : require + +int helper_0(accelerationStructureNV a_0, int b_0) +{ + return b_0; +} + +layout(binding = 1) +uniform accelerationStructureNV entryPointParams_x_0; + +layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; +void main() +{ + int _S1 = helper_0(entryPointParams_x_0, 1); + return; +} |
