tracerayinline.hlsl 884 B

12345678910111213141516171819
  1. // RUN: %dxc -T vs_6_5 -E main %s | FileCheck %s
  2. // CHECK: %[[RTAS:[^ ]+]] = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 0, i32 0, i32 0, i1 false)
  3. // CHECK: %[[RQ:[^ ]+]] = call i32 @dx.op.allocateRayQuery(i32 178, i32 513)
  4. // CHECK: call void @dx.op.rayQuery_TraceRayInline(i32 179, i32 %[[RQ]], %dx.types.Handle %[[RTAS]], i32 0, i32 1,
  5. // CHECK: call void @dx.op.rayQuery_TraceRayInline(i32 179, i32 %[[RQ]], %dx.types.Handle %[[RTAS]], i32 1, i32 2,
  6. RaytracingAccelerationStructure RTAS;
  7. void DoTrace(RayQuery<RAY_FLAG_FORCE_OPAQUE|RAY_FLAG_SKIP_PROCEDURAL_PRIMITIVES> rayQuery, RayDesc rayDesc) {
  8. rayQuery.TraceRayInline(RTAS, 0, 1, rayDesc);
  9. }
  10. float main(RayDesc rayDesc : RAYDESC) : OUT {
  11. RayQuery<RAY_FLAG_FORCE_OPAQUE|RAY_FLAG_SKIP_PROCEDURAL_PRIMITIVES> rayQuery;
  12. DoTrace(rayQuery, rayDesc);
  13. rayQuery.TraceRayInline(RTAS, 1, 2, rayDesc);
  14. return 0;
  15. }