summaryrefslogtreecommitdiff
path: root/tests/reflection/matrix-layout.slang
diff options
context:
space:
mode:
Diffstat (limited to 'tests/reflection/matrix-layout.slang')
-rw-r--r--tests/reflection/matrix-layout.slang28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/reflection/matrix-layout.slang b/tests/reflection/matrix-layout.slang
new file mode 100644
index 000000000..a0c1cdff1
--- /dev/null
+++ b/tests/reflection/matrix-layout.slang
@@ -0,0 +1,28 @@
+//TEST:REFLECTION:-profile ps_4_0 -target hlsl
+//TEST:REFLECTION:-profile ps_4_0 -target hlsl -matrix-layout-row-major
+
+// Test that we apply matrix layout rules correctly.
+
+cbuffer A
+{
+ float3x4 aa;
+ row_major float3x4 ab;
+ column_major float3x4 ac;
+}
+
+struct SB
+{
+ float3x4 ba;
+ row_major float3x4 bb;
+ column_major float3x4 bc;
+};
+
+cbuffer B
+{
+ SB b;
+}
+
+float4 main() : SV_Target
+{
+ return 0.0;
+} \ No newline at end of file