hlsl.reflection.vert 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  1. cbuffer nameless {
  2. float3 anonMember1;
  3. float3x2 m23;
  4. int scalarAfterm23;
  5. float4 anonDeadMember2;
  6. float4 anonMember3;
  7. int scalarBeforeArray;
  8. float floatArray[5];
  9. int scalarAfterArray;
  10. float2x2 m22[9];
  11. };
  12. cbuffer c_nameless {
  13. float3 c_anonMember1;
  14. float3x2 c_m23;
  15. int c_scalarAfterm23;
  16. float4 c_anonDeadMember2;
  17. float4 c_anonMember3;
  18. };
  19. cbuffer namelessdead {
  20. int a;
  21. };
  22. struct N1 {
  23. float a;
  24. };
  25. struct N2 {
  26. float b;
  27. float c;
  28. float d;
  29. };
  30. struct N3 {
  31. N1 n1;
  32. N2 n2;
  33. };
  34. cbuffer nested {
  35. N3 foo;
  36. }
  37. struct TS {
  38. int a;
  39. int dead;
  40. };
  41. uniform TS s;
  42. uniform float uf1;
  43. uniform float uf2;
  44. uniform float ufDead3;
  45. uniform float ufDead4;
  46. uniform float2x2 dm22[10];
  47. struct deep1 {
  48. float2 va[3];
  49. bool b;
  50. };
  51. struct deep2 {
  52. int i;
  53. deep1 d1[4];
  54. };
  55. struct deep3 {
  56. float4 iv4;
  57. deep2 d2;
  58. int3 v3;
  59. };
  60. uniform deep3 deepA[2], deepB[2], deepC[3], deepD[2];
  61. const bool control = true;
  62. void deadFunction()
  63. {
  64. float4 v = anonDeadMember2;
  65. float f = ufDead4;
  66. }
  67. void liveFunction2()
  68. {
  69. float3 v = anonMember1;
  70. float f = uf1;
  71. }
  72. tbuffer abl {
  73. float foo1;
  74. }
  75. tbuffer abl2 {
  76. float foo2;
  77. }
  78. void flizv(in float attributeFloat, in float2 attributeFloat2, in float3 attributeFloat3, in float4 attributeFloat4, in float4x4 attributeMat4)
  79. {
  80. liveFunction2();
  81. if (! control)
  82. deadFunction();
  83. float f;
  84. int i;
  85. if (control) {
  86. liveFunction2();
  87. f = anonMember3.z;
  88. f = s.a;
  89. f = m23[1].y + scalarAfterm23;
  90. f = c_m23[1].y + c_scalarAfterm23;
  91. f += scalarBeforeArray;
  92. f += floatArray[2];
  93. f += floatArray[4];
  94. f += scalarAfterArray;
  95. f += m22[i][1][0];
  96. f += dm22[3][0][1];
  97. f += m22[2][1].y;
  98. f += foo.n1.a + foo.n2.b + foo.n2.c + foo.n2.d;
  99. f += deepA[i].d2.d1[2].va[1].x;
  100. f += deepB[1].d2.d1[i].va[1].x;
  101. f += deepB[i].d2.d1[i].va[1].x;
  102. deep3 d = deepC[1];
  103. deep3 da[2] = deepD;
  104. } else
  105. f = ufDead3;
  106. f += foo1 + foo2;
  107. f += foo2;
  108. f += attributeFloat;
  109. f += attributeFloat2.x;
  110. f += attributeFloat3.x;
  111. f += attributeFloat4.x;
  112. f += attributeMat4[0][1];
  113. }