summaryrefslogtreecommitdiff
path: root/tests/compute/interface-shader-param4.slang
diff options
context:
space:
mode:
Diffstat (limited to 'tests/compute/interface-shader-param4.slang')
-rw-r--r--tests/compute/interface-shader-param4.slang28
1 files changed, 13 insertions, 15 deletions
diff --git a/tests/compute/interface-shader-param4.slang b/tests/compute/interface-shader-param4.slang
index 07c6951e0..51b6686ef 100644
--- a/tests/compute/interface-shader-param4.slang
+++ b/tests/compute/interface-shader-param4.slang
@@ -48,6 +48,18 @@ RWStructuredBuffer<int> gOutputBuffer;
ConstantBuffer<IRandomNumberGenerationStrategy> gStrategy;
+// The concrete types we plug in for `gStrategy` and `modifier`
+// have buffer resources in them, so we need to assign them
+// data. The registers/bindings for these parameters will
+// always come after all other shader parameters in the same
+// scope (global or entry-point).
+//
+// Here's the data for `gStrategy`:
+//
+//TEST_INPUT: globalExistentialType MyStrategy
+//TEST_INPUT:ubuffer(data=[1 2 4 8], stride=4):dxbinding(1),glbinding(1)
+
+
[numthreads(4, 1, 1)]
void computeMain(
@@ -112,21 +124,7 @@ struct MyModifier : IModifier
}
}
-//TEST_INPUT: globalExistentialType MyStrategy
-//TEST_INPUT: entryPointExistentialType MyModifier
-
-// The concrete types we plug in for `gStrategy` and `modifier`
-// have buffer resources in them, so we need to assign them
-// data. The registers/bindings for these parameters will
-// always come after all other shader parameters, and their
-// relative order will match the relative order of their
-// declarations in the global order that Slang uses for
-// assigning bindings (all globals before all entry point parameters).
-//
-// Here's the data for `gStrategy`:
-//
-//TEST_INPUT:ubuffer(data=[1 2 4 8], stride=4):dxbinding(1),glbinding(1)
-//
// Here's the data for `modifier`:
//
+//TEST_INPUT: entryPointExistentialType MyModifier
//TEST_INPUT:ubuffer(data=[16 32 64 128], stride=4):dxbinding(2),glbinding(3)