diff options
| author | Yong He <yonghe@outlook.com> | 2023-09-28 18:08:06 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-28 18:08:06 -0700 |
| commit | af61737e7ba107e9e92164bf39ce6ab34e05ce82 (patch) | |
| tree | 37747b26fb951548256669124adb83c0246a8f32 /tests/vkray/intersection.slang | |
| parent | b7d318f48db2cb83a41d665f1727ae93fc555124 (diff) | |
[Direct SPIRV]: ray tracing pipeline intrinsics. (#3244)
* Use a dedicated inst opcode to retrieve ray payload locations.
* [Direct SPIRV]: ray tracing pipeline intrinsics.
* Fix.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tests/vkray/intersection.slang')
| -rw-r--r-- | tests/vkray/intersection.slang | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/vkray/intersection.slang b/tests/vkray/intersection.slang index 65705c845..4b4495680 100644 --- a/tests/vkray/intersection.slang +++ b/tests/vkray/intersection.slang @@ -1,6 +1,6 @@ // intersection.slang -//TEST:CROSS_COMPILE: -profile glsl_460+GL_NV_ray_tracing -stage intersection -entry main -target spirv-assembly - +//TEST:SIMPLE(filecheck=CHECK): -profile glsl_460+GL_NV_ray_tracing -stage intersection -entry main -target spirv-assembly +//TEST:SIMPLE(filecheck=CHECK): -emit-spirv-directly -stage intersection -entry main -target spirv-assembly struct Sphere { float3 position; @@ -45,3 +45,12 @@ void main() ReportHit(tHit, 0, attrs); } } + +// CHECK: OpEntryPoint IntersectionNV %main "main" +// CHECK: OpDecorate %[[rayTMin:[a-zA-Z0-9_]+]] BuiltIn RayTminNV + +// CHECK-DAG: %[[ATTR:[A-Za-z0-9_]+]] = OpVariable %_ptr_HitAttributeNV_SphereHitAttributes{{.*}} HitAttributeNV +// CHECK-DAG: %[[VAL:[A-Za-z0-9_]+]] = Op{{.+}} %SphereHitAttributes{{.*}} {{.*}} +// CHECK-DAG: OpStore %[[ATTR]] %[[VAL]] + +// CHECK-DAG: OpReportIntersectionKHR |
