diff options
Diffstat (limited to 'tests/language-feature/types')
| -rw-r--r-- | tests/language-feature/types/matrix-layout-uniform.slang | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/language-feature/types/matrix-layout-uniform.slang b/tests/language-feature/types/matrix-layout-uniform.slang new file mode 100644 index 000000000..ed72ccdca --- /dev/null +++ b/tests/language-feature/types/matrix-layout-uniform.slang @@ -0,0 +1,19 @@ +//TEST:SIMPLE(filecheck=HLSL): -target hlsl -profile vs_6_0 -entry Main + +// HLSL: #pragma pack_matrix(column_major) +// HLSL-NOT: row_major float4x4 worldToClip +// HLSL: row_major float4x4 instanceMeshToWorld + +[shader("vertex")] +void Main( + uniform column_major float4x4 worldToClip, + out float4 SV_Position : SV_Position, + in row_major float4x4 instanceMeshToWorld : instanceMeshToWorld, + in float3 vertexPositionInMesh : vertexPositionInMesh +) +{ + SV_Position = mul( + mul(worldToClip, instanceMeshToWorld), + float4(vertexPositionInMesh, 1.f), + ); +}
\ No newline at end of file |
