Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/KhronosGroup/SPIRV-Cross.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Mours <pmours@nvidia.com>2019-03-26 16:16:38 +0300
committerPatrick Mours <pmours@nvidia.com>2019-03-26 16:25:25 +0300
commit90c91e4f23787447d5971bf00ef7565e49c1a9a9 (patch)
tree2ed256b4ce8775200589caefadb50c92b6cfcfa6 /shaders
parentc96bab0659d81404e67f1ee66513bff43c386589 (diff)
Fix missing check for purity on ray tracing builtins
Diffstat (limited to 'shaders')
-rw-r--r--shaders/vulkan/rgen/pure_call.vk.rgen18
1 files changed, 18 insertions, 0 deletions
diff --git a/shaders/vulkan/rgen/pure_call.vk.rgen b/shaders/vulkan/rgen/pure_call.vk.rgen
new file mode 100644
index 00000000..3e362ed0
--- /dev/null
+++ b/shaders/vulkan/rgen/pure_call.vk.rgen
@@ -0,0 +1,18 @@
+#version 460
+#extension GL_NV_ray_tracing : require
+
+layout(set = 0, binding = 1) uniform accelerationStructureNV as;
+layout(location = 0) rayPayloadNV float payload;
+
+float pure_call(vec2 launchID, vec2 launchSize)
+{
+ vec3 origin = vec3(launchID.x / launchSize.x, launchID.y / launchSize.y, 1.0);
+ vec3 direction = vec3(0.0, 0.0, -1.0);
+ traceNV(as, 0u, 255u, 0u, 1u, 0u, origin, 0.0, direction, 1000.0, 0);
+ return 0.0;
+}
+
+void main()
+{
+ pure_call(vec2(gl_LaunchIDNV.xy), vec2(gl_LaunchSizeNV.xy));
+}