From 29b8973929927b9d5f25b516f99c071835fd2205 Mon Sep 17 00:00:00 2001 From: Nate Morrical Date: Sat, 7 Oct 2023 22:57:39 -0600 Subject: [PATCH] first steps relaxing hold of push constants by gprt internals --- gprt/gprt.hlsl | 5 +++++ gprt/gprt_device.h | 13 ++++--------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/gprt/gprt.hlsl b/gprt/gprt.hlsl index 269b34ff..8238a5f1 100644 --- a/gprt/gprt.hlsl +++ b/gprt/gprt.hlsl @@ -29,6 +29,11 @@ typedef struct VkAccelerationStructureInstanceKHR { } VkAccelerationStructureInstanceKHR; +struct PushConstants { + uint64_t r[16]; +}; +[[vk::push_constant]] PushConstants pc; + [shader("compute")] [numthreads(1, 1, 1)] void diff --git a/gprt/gprt_device.h b/gprt/gprt_device.h index 47440206..9f738a62 100644 --- a/gprt/gprt_device.h +++ b/gprt/gprt_device.h @@ -31,10 +31,10 @@ #define alignas(alignment) -struct PushConstants { - uint64_t r[16]; -}; -[[vk::push_constant]] PushConstants pc; +// struct PushConstants { +// uint64_t r[16]; +// }; +// [[vk::push_constant]] PushConstants pc; // Descriptor binding, then set number. // Currently, 0, N is used for textures @@ -187,11 +187,6 @@ getDefaultSampler() { return samplers[0]; } -uint32_t -getNumRayTypes() { - // for now, we map PC 0 to ray type count - return uint32_t(pc.r[0]); -} }; // namespace gprt /*