summaryrefslogtreecommitdiff
path: root/tests/cross-compile/compile-time-loop.slang
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cross-compile/compile-time-loop.slang')
-rw-r--r--tests/cross-compile/compile-time-loop.slang14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/cross-compile/compile-time-loop.slang b/tests/cross-compile/compile-time-loop.slang
new file mode 100644
index 000000000..aae35f09e
--- /dev/null
+++ b/tests/cross-compile/compile-time-loop.slang
@@ -0,0 +1,14 @@
+//TEST:CROSS_COMPILE: -profile ps_5_0 -entry main -target spirv-assembly
+
+Texture2D t;
+SamplerState s;
+
+float4 main(float2 uv) : SV_Target
+{
+ float4 result = 0;
+ $for(i in Range(0,5))
+ {
+ result += t.Sample(s, uv, int2(i - 2, 0));
+ }
+ return result;
+}