summaryrefslogtreecommitdiff
path: root/tests/wgsl/multiple-entrypoints.slang
diff options
context:
space:
mode:
Diffstat (limited to 'tests/wgsl/multiple-entrypoints.slang')
-rw-r--r--tests/wgsl/multiple-entrypoints.slang28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/wgsl/multiple-entrypoints.slang b/tests/wgsl/multiple-entrypoints.slang
new file mode 100644
index 000000000..5e10f21d6
--- /dev/null
+++ b/tests/wgsl/multiple-entrypoints.slang
@@ -0,0 +1,28 @@
+//TEST:SIMPLE(filecheck=WGSL): -target wgsl
+
+//WGSL-DAG: @builtin(global_invocation_id)
+//WGSL-DAG: @compute
+
+[shader("compute")]
+void main_compute(uint3 dtid : SV_DispatchThreadID)
+{
+ // Empty compute shader
+}
+
+//WGSL-DAG: @builtin(front_facing)
+//WGSL-DAG: @fragment
+
+[shader("fragment")]
+float4 main_fragment(bool isFront : SV_IsFrontFace) : SV_Target
+{
+ return float4(1,1,1,1);
+}
+
+//WGSL-DAG: @builtin(vertex_index)
+//WGSL-DAG: @vertex
+
+[shader("vertex")]
+float4 main_vertex(uint vertexID : SV_VertexID) : SV_Position
+{
+ return float4(1,1,1,1);
+}