constant.matrix.hlsl 817 B

12345678910111213141516171819202122
  1. // Run: %dxc -T vs_6_0 -E main
  2. // TODO: actually emit constant SPIR-V instructions for the following tests.
  3. void main() {
  4. // CHECK: OpStore %a %float_1
  5. float1x1 a = float1x1(1.);
  6. // CHECK-NEXT: [[b:%\d+]] = OpCompositeConstruct %v2float %float_2 %float_3
  7. // CHECK-NEXT: OpStore %b [[b]]
  8. float1x2 b = float1x2(2., 3.);
  9. // CHECK-NEXT: [[c:%\d+]] = OpCompositeConstruct %v2float %float_4 %float_5
  10. // CHECK-NEXT: OpStore %c [[c]]
  11. float2x1 c = float2x1(4., 5.);
  12. // CHECK-NEXT: [[d0:%\d+]] = OpCompositeConstruct %v3float %float_6 %float_7 %float_8
  13. // CHECK-NEXT: [[d1:%\d+]] = OpCompositeConstruct %v3float %float_9 %float_10 %float_11
  14. // CHECK-NEXT: [[d:%\d+]] = OpCompositeConstruct %mat2v3float [[d0]] [[d1]]
  15. // CHECK-NEXT: OpStore %d [[d]]
  16. float2x3 d = float2x3(6., 7., 8., 9., 10., 11.);
  17. }