summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/bindings/hlsl-to-cpp-combined.slang17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/bindings/hlsl-to-cpp-combined.slang b/tests/bindings/hlsl-to-cpp-combined.slang
new file mode 100644
index 000000000..965ee0d47
--- /dev/null
+++ b/tests/bindings/hlsl-to-cpp-combined.slang
@@ -0,0 +1,17 @@
+//TEST:SIMPLE(filecheck=CHK):-target cpp -stage compute -entry computeMain
+
+//CHK:struct Sampler2D
+//CHK-NEXT:{
+//CHK-NEXT: Texture2D<{{.*}}> [[TEX:texture_[0-9]*]]
+//CHK-NEXT: SamplerState [[SMP:sampler_[0-9]*]]
+
+Sampler2D<float4> s2D;
+
+RWStructuredBuffer<float4> outputBuffer;
+
+[numthreads(4, 1, 1)]
+void computeMain(int3 dispatchThreadID: SV_DispatchThreadID)
+{
+ //CHK:[[VAR:[A-Za-z_][A-Za-z_0-9]*]].[[TEX]].Sample([[VAR]].[[SMP]]
+ outputBuffer[0] = s2D.Sample(float2(0.5f, 0.5f));
+}