summaryrefslogtreecommitdiff
path: root/tools/gfx-unit-test/multiple-entry-point-shader-cache-shader.slang
diff options
context:
space:
mode:
Diffstat (limited to 'tools/gfx-unit-test/multiple-entry-point-shader-cache-shader.slang')
-rw-r--r--tools/gfx-unit-test/multiple-entry-point-shader-cache-shader.slang28
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/gfx-unit-test/multiple-entry-point-shader-cache-shader.slang b/tools/gfx-unit-test/multiple-entry-point-shader-cache-shader.slang
new file mode 100644
index 000000000..9287b62ea
--- /dev/null
+++ b/tools/gfx-unit-test/multiple-entry-point-shader-cache-shader.slang
@@ -0,0 +1,28 @@
+uniform RWStructuredBuffer<float> buffer;
+
+[shader("compute")]
+[numthreads(4, 1, 1)]
+void computeA(
+uint3 sv_dispatchThreadID : SV_DispatchThreadID)
+{
+ var input = buffer[sv_dispatchThreadID.x];
+ buffer[sv_dispatchThreadID.x] = input + 1.0f;
+}
+
+[shader("compute")]
+[numthreads(4, 1, 1)]
+void computeB(
+uint3 sv_dispatchThreadID : SV_DispatchThreadID)
+{
+ var input = buffer[sv_dispatchThreadID.x];
+ buffer[sv_dispatchThreadID.x] = input + 2.0f;
+}
+
+[shader("compute")]
+[numthreads(4, 1, 1)]
+void computeC(
+uint3 sv_dispatchThreadID : SV_DispatchThreadID)
+{
+ var input = buffer[sv_dispatchThreadID.x];
+ buffer[sv_dispatchThreadID.x] = input + 3.0f;
+}