Skip to content

Commit 264dd69

Browse files
committed
fixed position fetch definition
1 parent be03a55 commit 264dd69

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

include/nbl/builtin/hlsl/spirv_intrinsics/raytracing.hlsl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,12 @@ float2 rayQueryGetIntersectionBarycentricsKHR([[vk::ext_reference]] RayQueryKHR
7070
[[vk::ext_builtin_input(spv::BuiltInHitTriangleVertexPositionsKHR)]]
7171
static const float32_t3 HitTriangleVertexPositionsKHR[3];
7272

73+
using __arr3_float3 = float32_t3[3];
74+
7375
[[vk::ext_capability(spv::CapabilityRayQueryPositionFetchKHR)]]
7476
[[vk::ext_extension("SPV_KHR_ray_tracing_position_fetch")]]
7577
[[vk::ext_instruction(spv::OpRayQueryGetIntersectionTriangleVertexPositionsKHR)]] // ray query version
76-
void rayQueryGetIntersectionTriangleVertexPositionsKHR([[vk::ext_reference]] RayQueryKHR query, uint32_t intersection, out float32_t3 pos[3]);
77-
// how else would you pass an array of float3s?
78-
// attempting to compile this with usage on godbolt gives: fatal error: failed to legalize SPIR-V: Id 3346 is defined more than once
79-
// but without usage is fine
78+
__arr3_float3 rayQueryGetIntersectionTriangleVertexPositionsKHR([[vk::ext_reference]] RayQueryKHR query, uint32_t intersection);
8079

8180
}
8281
}

0 commit comments

Comments
 (0)