TraceRayInline.hlsl 672 B

1234567891011121314151617
  1. // RUN: %dxc -T vs_6_5 -E main %s | %opt -S -hlsl-dxil-pix-shader-access-instrumentation,config=S0:1:1i1;U0:2:10i0;.. | FileCheck %s
  2. // CHECK: call void @dx.op.rayQuery_TraceRayInline
  3. // CHECK: call void @dx.op.bufferStore.i32(i32 69, %dx.types.Handle
  4. RaytracingAccelerationStructure RTAS;
  5. void DoTrace(RayQuery<RAY_FLAG_FORCE_OPAQUE|RAY_FLAG_SKIP_PROCEDURAL_PRIMITIVES> rayQuery, RayDesc rayDesc) {
  6. rayQuery.TraceRayInline(RTAS, 0, 1, rayDesc);
  7. }
  8. float main(RayDesc rayDesc : RAYDESC) : OUT {
  9. RayQuery<RAY_FLAG_FORCE_OPAQUE|RAY_FLAG_SKIP_PROCEDURAL_PRIMITIVES> rayQuery;
  10. DoTrace(rayQuery, rayDesc);
  11. rayQuery.TraceRayInline(RTAS, 1, 2, rayDesc);
  12. return 0;
  13. }