semantic.arbitrary.location.decl.hlsl 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // Run: %dxc -T vs_6_0 -E main
  2. struct S {
  3. float c: C;
  4. float a: A;
  5. float b: B;
  6. };
  7. struct T {
  8. float e: E;
  9. S s;
  10. float d: D;
  11. };
  12. // CHECK: OpDecorate %in_var_N Location 0
  13. // CHECK-NEXT: OpDecorate %in_var_E Location 1
  14. // CHECK-NEXT: OpDecorate %in_var_C Location 2
  15. // CHECK-NEXT: OpDecorate %in_var_A Location 3
  16. // CHECK-NEXT: OpDecorate %in_var_B Location 4
  17. // CHECK-NEXT: OpDecorate %in_var_D Location 5
  18. // CHECK-NEXT: OpDecorate %in_var_M Location 6
  19. // CHECK-NEXT: OpDecorate %out_var_E Location 0
  20. // CHECK-NEXT: OpDecorate %out_var_C Location 1
  21. // CHECK-NEXT: OpDecorate %out_var_A Location 2
  22. // CHECK-NEXT: OpDecorate %out_var_B Location 3
  23. // CHECK-NEXT: OpDecorate %out_var_D Location 4
  24. // CHECK-NEXT: OpDecorate %out_var_Q Location 5
  25. // CHECK-NEXT: OpDecorate %out_var_P Location 6
  26. // Input semantics by declaration order: N, E, C, A, B, D, M
  27. // by alphabetic order: A, B, C, D, E, M, N
  28. // Output semantics by declaration order: E, C, A, B, D, Q, P
  29. // by alphabetic order: A, B, C, D, E, P, Q
  30. void main(in float input1 : N,
  31. in T input2 ,
  32. in float input3 : M,
  33. out T output1,
  34. out float output2: Q,
  35. out float output3: P
  36. ) {
  37. }