legacy_struct.hlsl 584 B

12345678910111213141516171819202122232425262728
  1. // RUN: %dxc -E main -T ps_6_0 %s | FileCheck %s
  2. // CHECK: %"dx.alignment.legacy.$Globals" = type { float, %dx.alignment.legacy.struct.S, <4 x i32> }
  3. // CHECK: %dx.alignment.legacy.struct.S = type { i32, i32, i32, <2 x i32>, i32, i32, i32 }
  4. RasterizerOrderedBuffer<float4> r;
  5. min16float min16float_val;
  6. struct S {
  7. bool t;
  8. bool t3;
  9. int m2;
  10. bool2 t2;
  11. int m;
  12. min16int i;
  13. int x;
  14. };
  15. S s;
  16. bool4x1 b;
  17. float4 main(float4 p: SV_Position) : SV_Target {
  18. min16float min16float_local = min16float_val;
  19. if (min16float_local != 0) {
  20. return 1;
  21. }
  22. return r[0] + b[0] + s.m + s.x;
  23. }