diff options
| author | ArielG-NV <159081215+ArielG-NV@users.noreply.github.com> | 2024-06-14 12:56:59 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-14 09:56:59 -0700 |
| commit | fdef653ab5b38ac78d355d2f0148c6d77e784a8c (patch) | |
| tree | 5319d02e0678b39321868fd93befbfa7062d7726 /tests/vkray | |
| parent | 33e81a03115dad223b244ca689e2abdbf26641f7 (diff) | |
Improve Direct SPIRV Backend Test Coverage (#4396)
'raytracing' and 'texture-footprint' tests
fixed texture-footprint bug
changed when we emit raytracing/rayquery extensions with glsl backend (to reduce incorrect extension emitting)
Diffstat (limited to 'tests/vkray')
| -rw-r--r-- | tests/vkray/anyhit.slang | 44 | ||||
| -rw-r--r-- | tests/vkray/callable.slang | 19 |
2 files changed, 36 insertions, 27 deletions
diff --git a/tests/vkray/anyhit.slang b/tests/vkray/anyhit.slang index eebc2405d..b99e31df9 100644 --- a/tests/vkray/anyhit.slang +++ b/tests/vkray/anyhit.slang @@ -1,11 +1,7 @@ // closesthit.slang -// Note: explicitly requesting `spirv_1_4` as part of the compiler -// options is for the benefit of the glslang pass-through path, -// where we cannot infer the required SPIR-V version from the code -// (and glslang doesn't include any such inference ability). - -//TEST:SIMPLE(filecheck=CHECK): -profile glsl_460+spirv_1_4 -stage anyhit -entry main -target spirv-assembly -emit-spirv-via-glsl +//TEST:SIMPLE(filecheck=GL_SPIRV): -stage anyhit -entry main -target spirv-assembly -emit-spirv-via-glsl +//TEST:SIMPLE(filecheck=SPIRV): -stage anyhit -entry main -target spirv struct SphereHitAttributes { @@ -55,15 +51,27 @@ void main( HitTriangleVertexPosition(index); } -// CHECK: OpCapability RayTracing -// CHECK: OpCapability RayTracingPositionFetchKHR -// CHECK: OpEntryPoint AnyHitNV %main "main" -// CHECK: OpDecorate %{{.*}} BuiltIn HitTriangleVertexPositionsKHR -// CHECK: %_ptr_HitAttributeNV_SphereHitAttributes_0 = OpTypePointer HitAttributeNV %SphereHitAttributes_0 -// CHECK: %_S{{.*}} = OpVariable %_ptr_HitAttributeNV_SphereHitAttributes_0 HitAttributeNV -// CHECK: %{{.*}} = OpAccessChain %_ptr_HitAttributeNV_v3float %_S{{.*}} %int_0 -// CHECK: OpTerminateRayKHR -// CHECK: OpIgnoreIntersectionKHR -// CHECK: %{{.*}} = OpAccessChain %_ptr_Input_v3float %{{.*}} %{{u?}}int_0 -// CHECK: %{{.*}} = OpAccessChain %_ptr_Input_v3float %{{.*}} %{{u?}}int_1 -// CHECK: %{{.*}} = OpAccessChain %_ptr_Input_v3float %{{.*}} %{{u?}}int_2 +// SPIRV-DAG: OpCapability RayTracing +// SPIRV-DAG: OpCapability RayTracingPositionFetchKHR +// SPIRV: OpEntryPoint +// SPIRV: BuiltIn HitTriangleVertexPositionsKHR +// SPIRV: OpTypePointer HitAttributeNV +// SPIRV: OpTypePointer HitAttributeNV +// SPIRV: OpVariable{{.*}}HitAttributeNV +// SPIRV: OpIgnoreIntersectionKHR +// SPIRV: OpTerminateRayKHR +// SPIRV-DAG: %{{.*}} = OpAccessChain %{{.*}} %{{.*}} %{{.*}} +// SPIRV-DAG: %{{.*}} = OpAccessChain %{{.*}} %{{.*}} %{{.*}} +// SPIRV-DAG: %{{.*}} = OpAccessChain %{{.*}} %{{.*}} %{{.*}} + +// GL_SPIRV-DAG: OpCapability RayTracing +// GL_SPIRV-DAG: OpCapability RayTracingPositionFetchKHR +// GL_SPIRV: OpEntryPoint +// GL_SPIRV: BuiltIn HitTriangleVertexPositionsKHR +// GL_SPIRV-DAG: OpTypePointer HitAttributeNV +// GL_SPIRV-DAG: OpTypePointer HitAttributeNV +// GL_SPIRV: OpTerminateRayKHR +// GL_SPIRV: OpIgnoreIntersectionKHR +// GL_SPIRV-DAG: %{{.*}} = OpAccessChain %{{.*}} %{{.*}} %{{.*}} +// GL_SPIRV-DAG: %{{.*}} = OpAccessChain %{{.*}} %{{.*}} %{{.*}} +// GL_SPIRV-DAG: %{{.*}} = OpAccessChain %{{.*}} %{{.*}} %{{.*}} diff --git a/tests/vkray/callable.slang b/tests/vkray/callable.slang index 711175e4d..583002bc9 100644 --- a/tests/vkray/callable.slang +++ b/tests/vkray/callable.slang @@ -1,6 +1,7 @@ // callable.slang -//TEST:SIMPLE(filecheck=CHECK): -profile glsl_460+spirv_1_4 -stage callable -entry main -target spirv-assembly -emit-spirv-via-glsl +//TEST:SIMPLE(filecheck=CHECK): -stage callable -entry main -target spirv-assembly -emit-spirv-via-glsl +//TEST:SIMPLE(filecheck=CHECK): -stage callable -entry main -target spirv import callable_shared; @@ -15,11 +16,11 @@ void main(in out MaterialPayload ioPayload) 0); } -// CHECK: OpCapability RayTracingKHR -// CHECK: OpExtension "SPV_KHR_ray_tracing" -// CHECK: OpEntryPoint CallableNV %main -// CHECK: %_ptr_IncomingCallableDataNV_MaterialPayload_0 = OpTypePointer IncomingCallableDataNV %MaterialPayload_0 -// CHECK: %_ptr_IncomingCallableDataNV_v2float = OpTypePointer IncomingCallableDataNV %v2float -// CHECK: %_ptr_IncomingCallableDataNV_v4float = OpTypePointer IncomingCallableDataNV %v4float -// CHECK: %{{.*}} = OpAccessChain %_ptr_IncomingCallableDataNV_v2float %_S1 %int_1 -// CHECK: %{{.*}} = OpAccessChain %_ptr_IncomingCallableDataNV_v4float %_S1 %int_0 +// CHECK-DAG: OpCapability RayTracingKHR +// CHECK-DAG: OpExtension "SPV_KHR_ray_tracing" +// CHECK: OpEntryPoint +// CHECK-DAG: OpTypePointer IncomingCallableDataNV +// CHECK-DAG: OpTypePointer IncomingCallableDataNV +// CHECK-DAG: OpTypePointer IncomingCallableDataNV +// CHECK-DAG: %{{.*}} = OpAccessChain %{{.*}} %{{.*}} %{{.*}} +// CHECK-DAG: %{{.*}} = OpAccessChain %{{.*}} %{{.*}} %{{.*}} |
