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 |
|
John Kessenich | 2572b19 | 2016-09-19 23:12:48 -0600 | [diff] [blame] | 22 | cbuffer namelessdead {
|
| 23 | int a;
|
| 24 | };
|
| 25 |
|
John Kessenich | 2572b19 | 2016-09-19 23:12:48 -0600 | [diff] [blame] | 26 | struct N1 {
|
| 27 | float a;
|
| 28 | };
|
| 29 |
|
| 30 | struct N2 {
|
| 31 | float b;
|
| 32 | float c;
|
| 33 | float d;
|
| 34 | };
|
| 35 |
|
| 36 | struct N3 {
|
| 37 | N1 n1;
|
| 38 | N2 n2;
|
| 39 | };
|
| 40 |
|
| 41 | cbuffer nested {
|
| 42 | N3 foo;
|
John Kessenich | 2fcdd64 | 2017-06-19 15:41:11 -0600 | [diff] [blame] | 43 | }
|
John Kessenich | 2572b19 | 2016-09-19 23:12:48 -0600 | [diff] [blame] | 44 |
|
| 45 | struct TS {
|
| 46 | int a;
|
| 47 | int dead;
|
| 48 | };
|
| 49 |
|
| 50 | uniform TS s;
|
| 51 |
|
| 52 | uniform float uf1;
|
| 53 | uniform float uf2;
|
| 54 | uniform float ufDead3;
|
| 55 | uniform float ufDead4;
|
| 56 |
|
| 57 | uniform float2x2 dm22[10];
|
| 58 |
|
| 59 | struct deep1 {
|
| 60 | float2 va[3];
|
| 61 | bool b;
|
| 62 | };
|
| 63 |
|
| 64 | struct deep2 {
|
| 65 | int i;
|
| 66 | deep1 d1[4];
|
| 67 | };
|
| 68 |
|
| 69 | struct deep3 {
|
| 70 | float4 iv4;
|
| 71 | deep2 d2;
|
| 72 | int3 v3;
|
| 73 | };
|
| 74 |
|
John Kessenich | 2572b19 | 2016-09-19 23:12:48 -0600 | [diff] [blame] | 75 | uniform deep3 deepA[2], deepB[2], deepC[3], deepD[2];
|
| 76 |
|
| 77 | const bool control = true;
|
| 78 |
|
| 79 | void deadFunction()
|
| 80 | {
|
John Kessenich | 2572b19 | 2016-09-19 23:12:48 -0600 | [diff] [blame] | 81 | float4 v = anonDeadMember2;
|
| 82 | float f = ufDead4;
|
| 83 | }
|
| 84 |
|
| 85 | void liveFunction2()
|
| 86 | {
|
| 87 | float3 v = anonMember1;
|
| 88 | float f = uf1;
|
| 89 | }
|
| 90 |
|
| 91 | tbuffer abl {
|
John Kessenich | 2fcdd64 | 2017-06-19 15:41:11 -0600 | [diff] [blame] | 92 | float foo1;
|
| 93 | }
|
John Kessenich | 2572b19 | 2016-09-19 23:12:48 -0600 | [diff] [blame] | 94 |
|
| 95 | tbuffer abl2 {
|
John Kessenich | 2fcdd64 | 2017-06-19 15:41:11 -0600 | [diff] [blame] | 96 | float foo2;
|
| 97 | }
|
John Kessenich | 2572b19 | 2016-09-19 23:12:48 -0600 | [diff] [blame] | 98 |
|
| 99 | void flizv(in float attributeFloat, in float2 attributeFloat2, in float3 attributeFloat3, in float4 attributeFloat4, in float4x4 attributeMat4)
|
| 100 | {
|
| 101 | liveFunction2();
|
| 102 |
|
| 103 | if (! control)
|
| 104 | deadFunction();
|
| 105 |
|
| 106 | float f;
|
| 107 | int i;
|
| 108 | if (control) {
|
| 109 | liveFunction2();
|
| 110 | f = anonMember3.z;
|
| 111 | f = s.a;
|
John Kessenich | 2572b19 | 2016-09-19 23:12:48 -0600 | [diff] [blame] | 112 | f = m23[1].y + scalarAfterm23;
|
| 113 | f = c_m23[1].y + c_scalarAfterm23;
|
| 114 | f += scalarBeforeArray;
|
| 115 | f += floatArray[2];
|
| 116 | f += floatArray[4];
|
| 117 | f += scalarAfterArray;
|
John Kessenich | 2fcdd64 | 2017-06-19 15:41:11 -0600 | [diff] [blame] | 118 | f += m22[i][1][0];
|
John Kessenich | 2572b19 | 2016-09-19 23:12:48 -0600 | [diff] [blame] | 119 | f += dm22[3][0][1];
|
| 120 | f += m22[2][1].y;
|
John Kessenich | 2fcdd64 | 2017-06-19 15:41:11 -0600 | [diff] [blame] | 121 | f += foo.n1.a + foo.n2.b + foo.n2.c + foo.n2.d;
|
John Kessenich | 2572b19 | 2016-09-19 23:12:48 -0600 | [diff] [blame] | 122 | f += deepA[i].d2.d1[2].va[1].x;
|
| 123 | f += deepB[1].d2.d1[i].va[1].x;
|
| 124 | f += deepB[i].d2.d1[i].va[1].x;
|
| 125 | deep3 d = deepC[1];
|
| 126 | deep3 da[2] = deepD;
|
| 127 | } else
|
| 128 | f = ufDead3;
|
| 129 |
|
John Kessenich | 2fcdd64 | 2017-06-19 15:41:11 -0600 | [diff] [blame] | 130 | f += foo1 + foo2;
|
| 131 | f += foo2;
|
John Kessenich | 2572b19 | 2016-09-19 23:12:48 -0600 | [diff] [blame] | 132 |
|
| 133 | f += attributeFloat;
|
| 134 | f += attributeFloat2.x;
|
| 135 | f += attributeFloat3.x;
|
| 136 | f += attributeFloat4.x;
|
| 137 | f += attributeMat4[0][1];
|
| 138 | }
|