John Kessenich | 2572b19 | 2016-09-19 23:12:48 -0600 | [diff] [blame^] | 1 |
|
| 2 | cbuffer nameless {
|
| 3 | float3 anonMember1;
|
| 4 | float3x2 m23;
|
| 5 | int scalarAfterm23;
|
| 6 | float4 anonDeadMember2;
|
| 7 | float4 anonMember3;
|
| 8 | int scalarBeforeArray;
|
| 9 | float floatArray[5];
|
| 10 | int scalarAfterArray;
|
| 11 | float2x2 m22[9];
|
| 12 | };
|
| 13 |
|
| 14 | cbuffer c_nameless {
|
| 15 | float3 c_anonMember1;
|
| 16 | float3x2 c_m23;
|
| 17 | int c_scalarAfterm23;
|
| 18 | float4 c_anonDeadMember2;
|
| 19 | float4 c_anonMember3;
|
| 20 | };
|
| 21 |
|
| 22 | cbuffer named {
|
| 23 | float3 deadMember1;
|
| 24 | int scalar;
|
| 25 | float4 member2;
|
| 26 | float4 member3;
|
| 27 | float2 memfloat2;
|
| 28 | float memf1;
|
| 29 | bool memf2;
|
| 30 | int memf3;
|
| 31 | float2 memfloat2a;
|
| 32 | float2x2 m22[7];
|
| 33 | } ablock;
|
| 34 |
|
| 35 | cbuffer namelessdead {
|
| 36 | int a;
|
| 37 | };
|
| 38 |
|
| 39 | cbuffer namedDead {
|
| 40 | int b;
|
| 41 | } bblock;
|
| 42 |
|
| 43 | struct N1 {
|
| 44 | float a;
|
| 45 | };
|
| 46 |
|
| 47 | struct N2 {
|
| 48 | float b;
|
| 49 | float c;
|
| 50 | float d;
|
| 51 | };
|
| 52 |
|
| 53 | struct N3 {
|
| 54 | N1 n1;
|
| 55 | N2 n2;
|
| 56 | };
|
| 57 |
|
| 58 | cbuffer nested {
|
| 59 | N3 foo;
|
| 60 | } nest;
|
| 61 |
|
| 62 | struct TS {
|
| 63 | int a;
|
| 64 | int dead;
|
| 65 | };
|
| 66 |
|
| 67 | uniform TS s;
|
| 68 |
|
| 69 | uniform float uf1;
|
| 70 | uniform float uf2;
|
| 71 | uniform float ufDead3;
|
| 72 | uniform float ufDead4;
|
| 73 |
|
| 74 | uniform float2x2 dm22[10];
|
| 75 |
|
| 76 | struct deep1 {
|
| 77 | float2 va[3];
|
| 78 | bool b;
|
| 79 | };
|
| 80 |
|
| 81 | struct deep2 {
|
| 82 | int i;
|
| 83 | deep1 d1[4];
|
| 84 | };
|
| 85 |
|
| 86 | struct deep3 {
|
| 87 | float4 iv4;
|
| 88 | deep2 d2;
|
| 89 | int3 v3;
|
| 90 | };
|
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
|
| 95 | uniform deep3 deepA[2], deepB[2], deepC[3], deepD[2];
|
| 96 |
|
| 97 | const bool control = true;
|
| 98 |
|
| 99 | void deadFunction()
|
| 100 | {
|
| 101 | float3 v3 = ablock.deadMember1;
|
| 102 | float4 v = anonDeadMember2;
|
| 103 | float f = ufDead4;
|
| 104 | }
|
| 105 |
|
| 106 | void liveFunction2()
|
| 107 | {
|
| 108 | float3 v = anonMember1;
|
| 109 | float f = uf1;
|
| 110 | }
|
| 111 |
|
| 112 | tbuffer abl {
|
| 113 | float foo;
|
| 114 | } arrBl;
|
| 115 |
|
| 116 | tbuffer abl2 {
|
| 117 | float foo;
|
| 118 | } arrBl2;
|
| 119 |
|
| 120 | void flizv(in float attributeFloat, in float2 attributeFloat2, in float3 attributeFloat3, in float4 attributeFloat4, in float4x4 attributeMat4)
|
| 121 | {
|
| 122 | liveFunction2();
|
| 123 |
|
| 124 | if (! control)
|
| 125 | deadFunction();
|
| 126 |
|
| 127 | float f;
|
| 128 | int i;
|
| 129 | if (control) {
|
| 130 | liveFunction2();
|
| 131 | f = anonMember3.z;
|
| 132 | f = s.a;
|
| 133 | f = ablock.scalar;
|
| 134 | f = m23[1].y + scalarAfterm23;
|
| 135 | f = c_m23[1].y + c_scalarAfterm23;
|
| 136 | f += scalarBeforeArray;
|
| 137 | f += floatArray[2];
|
| 138 | f += floatArray[4];
|
| 139 | f += scalarAfterArray;
|
| 140 | f += ablock.memfloat2.x;
|
| 141 | f += ablock.memf1;
|
| 142 | f += float(ablock.memf2);
|
| 143 | f += ablock.memf3;
|
| 144 | f += ablock.memfloat2a.y;
|
| 145 | f += ablock.m22[i][1][0];
|
| 146 | f += dm22[3][0][1];
|
| 147 | f += m22[2][1].y;
|
| 148 | f += nest.foo.n1.a + nest.foo.n2.b + nest.foo.n2.c + nest.foo.n2.d;
|
| 149 | f += deepA[i].d2.d1[2].va[1].x;
|
| 150 | f += deepB[1].d2.d1[i].va[1].x;
|
| 151 | f += deepB[i].d2.d1[i].va[1].x;
|
| 152 | deep3 d = deepC[1];
|
| 153 | deep3 da[2] = deepD;
|
| 154 | } else
|
| 155 | f = ufDead3;
|
| 156 |
|
| 157 | f += arrBl.foo + arrBl.foo;
|
| 158 | f += arrBl2.foo;
|
| 159 |
|
| 160 | f += attributeFloat;
|
| 161 | f += attributeFloat2.x;
|
| 162 | f += attributeFloat3.x;
|
| 163 | f += attributeFloat4.x;
|
| 164 | f += attributeMat4[0][1];
|
| 165 | }
|