summaryrefslogtreecommitdiff
path: root/tests/hlsl-intrinsic
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2023-10-02 03:33:58 -0700
committerGitHub <noreply@github.com>2023-10-02 18:33:58 +0800
commitccf2611c024ab12dcccd978f3f501d4ee9fc52bc (patch)
treef4df843e3b46886005d6bfbae34dc3bcc6fb8321 /tests/hlsl-intrinsic
parent6138de5f084cafdc98381237c2d8bed7c8804f1c (diff)
Add SPIRV intrinsics for ShaderExecutionReordering and RW/Buffer. (#3252)
* Add SPIRV intrinsics for ShaderExecutionReordering. * Add intrinsics for `Buffer` and `RWBuffer`. * Various spirv fixes. * Marshal bool vector type. * Inline global constants + OpFOrdNotEqual->OpFUnordNotEqual. * Fix. --------- Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tests/hlsl-intrinsic')
-rw-r--r--tests/hlsl-intrinsic/shader-execution-reordering/hit-object-assign.slang1
-rw-r--r--tests/hlsl-intrinsic/shader-execution-reordering/hit-object-make-hit.slang16
-rw-r--r--tests/hlsl-intrinsic/shader-execution-reordering/hit-object-make-miss.slang1
-rw-r--r--tests/hlsl-intrinsic/shader-execution-reordering/hit-object-make-nop.slang1
-rw-r--r--tests/hlsl-intrinsic/shader-execution-reordering/hit-object-output.slang1
-rw-r--r--tests/hlsl-intrinsic/shader-execution-reordering/hit-object-reorder-thread.slang1
-rw-r--r--tests/hlsl-intrinsic/shader-execution-reordering/hit-object-trace-motion-ray.slang1
-rw-r--r--tests/hlsl-intrinsic/shader-execution-reordering/hit-object-trace-ray.slang1
8 files changed, 15 insertions, 8 deletions
diff --git a/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-assign.slang b/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-assign.slang
index 49fef7a4c..89b3b6b44 100644
--- a/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-assign.slang
+++ b/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-assign.slang
@@ -2,6 +2,7 @@
//TEST:SIMPLE: -target dxil -entry rayGenerationMain -stage raygeneration -profile sm_6_5 -DNV_SHADER_EXTN_SLOT=u0
//TEST:SIMPLE(filecheck=SPIRV): -target spirv -entry rayGenerationMain -stage raygeneration -profile glsl_460+GL_EXT_ray_tracing -O0 -line-directive-mode none
+//TEST:SIMPLE(filecheck=SPIRV): -target spirv -entry rayGenerationMain -stage raygeneration -O0 -emit-spirv-directly
//DISABLE_TEST:COMPARE_COMPUTE_EX:-slang -compute -dx12 -output-using-type -profile sm_6_5 -nvapi-slot u0
//DISABLE_TEST(compute):COMPARE_COMPUTE:-d3d12 -output-using-type -use-dxil -profile sm_6_5 -render-feature ray-query
diff --git a/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-make-hit.slang b/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-make-hit.slang
index 8fea9cf67..73278b6d2 100644
--- a/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-make-hit.slang
+++ b/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-make-hit.slang
@@ -1,8 +1,8 @@
// hit-object-make-hit.slang
//TEST:SIMPLE: -target dxil -entry rayGenerationMain -stage raygeneration -profile sm_6_5 -DNV_SHADER_EXTN_SLOT=u0
-//TEST:SIMPLE(filecheck=SPIRV): -target spirv -entry rayGenerationMain -stage raygeneration -profile sm_6_5 -line-directive-mode none
-
+//TEST:SIMPLE(filecheck=SPIRV): -target spirv -entry rayGenerationMain -stage raygeneration -profile sm_6_5 -line-directive-mode none -O0
+//TEST:SIMPLE(filecheck=SPIRV): -target spirv -entry rayGenerationMain -stage raygeneration -emit-spirv-directly
//DISABLE_TEST(compute):COMPARE_COMPUTE:-d3d12 -output-using-type -use-dxil -profile sm_6_5 -render-feature ray-query
//DISABLE_TEST(compute):COMPARE_COMPUTE:-vk -output-using-type -render-feature ray-query
@@ -22,12 +22,12 @@ struct SomeValues
uint calcValue(HitObject hit)
{
// SPIRV-DAG: OpHitObjectIsHitNV
- // SPIRV: OpHitObjectGetInstanceCustomIndexNV
- // SPIRV: OpHitObjectGetInstanceIdNV
- // SPIRV: OpHitObjectGetGeometryIndexNV
- // SPIRV: OpHitObjectGetPrimitiveIndexNV
- // SPIRV: OpHitObjectGetHitKindNV
- // SPIRV: OpHitObjectIsMissNV
+ // SPIRV-DAG: OpHitObjectGetInstanceCustomIndexNV
+ // SPIRV-DAG: OpHitObjectGetInstanceIdNV
+ // SPIRV-DAG: OpHitObjectGetGeometryIndexNV
+ // SPIRV-DAG: OpHitObjectGetPrimitiveIndexNV
+ // SPIRV-DAG: OpHitObjectGetHitKindNV
+ // SPIRV-DAG: OpHitObjectIsMissNV
uint r = 0;
if (hit.IsHit())
diff --git a/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-make-miss.slang b/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-make-miss.slang
index 9aea89573..83e665069 100644
--- a/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-make-miss.slang
+++ b/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-make-miss.slang
@@ -2,6 +2,7 @@
//TEST:SIMPLE: -target dxil -entry rayGenerationMain -stage raygeneration -profile sm_6_5 -DNV_SHADER_EXTN_SLOT=u0
//TEST:SIMPLE(filecheck=SPIRV): -target spirv -entry rayGenerationMain -stage raygeneration -profile sm_6_5 -line-directive-mode none
+//TEST:SIMPLE(filecheck=SPIRV): -target spirv -entry rayGenerationMain -stage raygeneration -emit-spirv-directly
//DISABLE_TEST:COMPARE_COMPUTE_EX:-slang -compute -dx12 -output-using-type -profile sm_6_5 -nvapi-slot u0
//DISABLE_TEST(compute):COMPARE_COMPUTE:-d3d12 -output-using-type -use-dxil -profile sm_6_5 -render-feature ray-query
diff --git a/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-make-nop.slang b/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-make-nop.slang
index e8c88e1ad..b8b91c90b 100644
--- a/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-make-nop.slang
+++ b/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-make-nop.slang
@@ -2,6 +2,7 @@
//TEST:SIMPLE: -target dxil -entry rayGenerationMain -stage raygeneration -profile sm_6_5 -DNV_SHADER_EXTN_SLOT=u0
//TEST:SIMPLE(filecheck=SPIRV): -target spirv -entry rayGenerationMain -stage raygeneration -profile sm_6_5 -line-directive-mode none
+//TEST:SIMPLE(filecheck=SPIRV): -target spirv -entry rayGenerationMain -stage raygeneration -emit-spirv-directly
//DISABLE_TEST(compute):COMPARE_COMPUTE:-d3d12 -output-using-type -use-dxil -profile sm_6_5 -render-feature ray-query
//DISABLE_TEST(compute):COMPARE_COMPUTE:-vk -output-using-type -render-feature ray-query
diff --git a/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-output.slang b/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-output.slang
index e06e63693..ba493ba08 100644
--- a/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-output.slang
+++ b/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-output.slang
@@ -5,6 +5,7 @@
//TEST:SIMPLE: -target dxil -entry rayGenerationMain -stage raygeneration -profile sm_6_5 -DNV_SHADER_EXTN_SLOT=u0
//TEST:SIMPLE(filecheck=SPIRV): -target spirv -entry rayGenerationMain -stage raygeneration -profile sm_6_5 -line-directive-mode none
+//TEST:SIMPLE(filecheck=SPIRV): -target spirv -entry rayGenerationMain -stage raygeneration -emit-spirv-directly
//DISABLE_TEST(compute):COMPARE_COMPUTE:-d3d12 -output-using-type -use-dxil -profile sm_6_5 -render-feature ray-query
//DISABLE_TEST(compute):COMPARE_COMPUTE:-vk -output-using-type -render-feature ray-query
diff --git a/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-reorder-thread.slang b/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-reorder-thread.slang
index 8498b9304..0d455df72 100644
--- a/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-reorder-thread.slang
+++ b/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-reorder-thread.slang
@@ -2,6 +2,7 @@
//TEST:SIMPLE: -target dxil -entry rayGenerationMain -stage raygeneration -profile sm_6_5 -DNV_SHADER_EXTN_SLOT=u0
//TEST:SIMPLE(filecheck=SPIRV): -target spirv -entry rayGenerationMain -stage raygeneration -profile sm_6_5 -line-directive-mode none
+//TEST:SIMPLE(filecheck=SPIRV): -target spirv -entry rayGenerationMain -stage raygeneration -emit-spirv-directly
//DISABLE_TEST(compute):COMPARE_COMPUTE:-d3d12 -output-using-type -use-dxil -profile sm_6_5 -render-feature ray-query
//DISABLE_TEST(compute):COMPARE_COMPUTE:-vk -output-using-type -render-feature ray-query
diff --git a/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-trace-motion-ray.slang b/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-trace-motion-ray.slang
index 4e8d52e10..4255a3936 100644
--- a/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-trace-motion-ray.slang
+++ b/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-trace-motion-ray.slang
@@ -3,6 +3,7 @@
// Motion rays not supported on HLSL impl currently
//DISABLE_TEST:SIMPLE: -target dxil -entry rayGenerationMain -stage raygeneration -profile sm_6_5 -DNV_SHADER_EXTN_SLOT=u0
//TEST:SIMPLE(filecheck=SPIRV): -target spirv -entry rayGenerationMain -stage raygeneration -profile sm_6_5 -line-directive-mode none
+//TEST:SIMPLE(filecheck=SPIRV): -target spirv -entry rayGenerationMain -stage raygeneration -emit-spirv-directly
//DISABLE_TEST(compute):COMPARE_COMPUTE:-d3d12 -output-using-type -use-dxil -profile sm_6_6 -render-feature ray-query
//DISABLE_TEST(compute):COMPARE_COMPUTE:-vk -output-using-type -render-feature ray-query
diff --git a/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-trace-ray.slang b/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-trace-ray.slang
index c1a29d647..0f60e3cf5 100644
--- a/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-trace-ray.slang
+++ b/tests/hlsl-intrinsic/shader-execution-reordering/hit-object-trace-ray.slang
@@ -2,6 +2,7 @@
//TEST:SIMPLE: -target dxil -entry rayGenerationMain -stage raygeneration -profile sm_6_5 -DNV_SHADER_EXTN_SLOT=u0
//TEST:SIMPLE(filecheck=SPIRV): -target spirv -entry rayGenerationMain -stage raygeneration -profile sm_6_5 -line-directive-mode none
+//TEST:SIMPLE(filecheck=SPIRV): -target spirv -entry rayGenerationMain -stage raygeneration -emit-spirv-directly
//DISABLE_TEST(compute):COMPARE_COMPUTE:-d3d12 -output-using-type -use-dxil -profile sm_6_6 -render-feature ray-query
//DISABLE_TEST(compute):COMPARE_COMPUTE:-vk -output-using-type -render-feature ray-query