summaryrefslogtreecommitdiff
path: root/tests/reflection/structured-buffer.slang
diff options
context:
space:
mode:
Diffstat (limited to 'tests/reflection/structured-buffer.slang')
-rw-r--r--tests/reflection/structured-buffer.slang19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/reflection/structured-buffer.slang b/tests/reflection/structured-buffer.slang
new file mode 100644
index 000000000..491d61486
--- /dev/null
+++ b/tests/reflection/structured-buffer.slang
@@ -0,0 +1,19 @@
+//TEST:REFLECTION:-profile ps_4_0 -target hlsl
+
+// Confirm that we reflect the contents of structure-buffer types correctly.
+
+struct S
+{
+ float2 a;
+ float b;
+ uint c;
+};
+
+StructuredBuffer<uint> x;
+StructuredBuffer<float2> y;
+StructuredBuffer<S> z;
+
+float4 main() : SV_Target
+{
+ return x[0] + y[0].xyxy + z[0].a.xyxy;
+} \ No newline at end of file