Skip to content

Commit f19fdb9

Browse files
Merge pull request #1283 from dj2/roll
Roll GLSLang, SPIRV-Tools and SPIRV-Headers
2 parents dffd33d + 7ec16b6 commit f19fdb9

9 files changed

Lines changed: 348 additions & 791 deletions

checkout_glslang_spirv_tools.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
22

3-
GLSLANG_REV=a4af7676feb011d61b1dfa8915bd41d9c5aaf22a
4-
SPIRV_TOOLS_REV=e82a428605f6ce0a07337b36f8ba3935c9f165ac
5-
SPIRV_HEADERS_REV=204cd131c42b90d129073719f2766293ce35c081
3+
GLSLANG_REV=c008fcb8cc0f6a413162fb5236d0c548cc1e0ef6
4+
SPIRV_TOOLS_REV=79f8caf9154a0328a87424354bd10ab69e811185
5+
SPIRV_HEADERS_REV=5dbc1c32182e17b8ab8e8158a802ecabaf35aad3
66

77
if [ -z $PROTOCOL ]; then
88
PROTOCOL=git

reference/opt/shaders-msl/frag/for-loop-init.frag

Lines changed: 50 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -11,62 +11,63 @@ struct main0_out
1111
fragment main0_out main0()
1212
{
1313
main0_out out = {};
14-
int _145;
15-
for (;;)
14+
switch (0u)
1615
{
17-
out.FragColor = 16;
18-
_145 = 0;
19-
for (; _145 < 25; )
16+
default:
2017
{
21-
out.FragColor += 10;
22-
_145++;
23-
continue;
24-
}
25-
for (int _146 = 1; _146 < 30; )
26-
{
27-
out.FragColor += 11;
28-
_146++;
29-
continue;
30-
}
31-
int _147;
32-
_147 = 0;
33-
for (; _147 < 20; )
34-
{
35-
out.FragColor += 12;
36-
_147++;
37-
continue;
38-
}
39-
int _62 = _147 + 3;
40-
out.FragColor += _62;
41-
if (_62 == 40)
42-
{
43-
for (int _151 = 0; _151 < 40; )
18+
out.FragColor = 16;
19+
for (int _143 = 0; _143 < 25; )
20+
{
21+
out.FragColor += 10;
22+
_143++;
23+
continue;
24+
}
25+
for (int _144 = 1; _144 < 30; )
26+
{
27+
out.FragColor += 11;
28+
_144++;
29+
continue;
30+
}
31+
int _145;
32+
_145 = 0;
33+
for (; _145 < 20; )
4434
{
45-
out.FragColor += 13;
46-
_151++;
35+
out.FragColor += 12;
36+
_145++;
4737
continue;
4838
}
39+
int _62 = _145 + 3;
40+
out.FragColor += _62;
41+
if (_62 == 40)
42+
{
43+
for (int _149 = 0; _149 < 40; )
44+
{
45+
out.FragColor += 13;
46+
_149++;
47+
continue;
48+
}
49+
break;
50+
}
51+
out.FragColor += _62;
52+
int2 _146;
53+
_146 = int2(0);
54+
for (; _146.x < 10; )
55+
{
56+
out.FragColor += _146.y;
57+
int2 _142 = _146;
58+
_142.x = _146.x + 4;
59+
_146 = _142;
60+
continue;
61+
}
62+
for (int _148 = _62; _148 < 40; )
63+
{
64+
out.FragColor += _148;
65+
_148++;
66+
continue;
67+
}
68+
out.FragColor += _62;
4969
break;
5070
}
51-
out.FragColor += _62;
52-
int2 _148;
53-
_148 = int2(0);
54-
for (; _148.x < 10; )
55-
{
56-
out.FragColor += _148.y;
57-
int2 _144 = _148;
58-
_144.x = _148.x + 4;
59-
_148 = _144;
60-
continue;
61-
}
62-
for (int _150 = _62; _150 < 40; )
63-
{
64-
out.FragColor += _150;
65-
_150++;
66-
continue;
67-
}
68-
out.FragColor += _62;
69-
break;
7071
}
7172
return out;
7273
}

reference/opt/shaders-ue4/asm/frag/global-constant-arrays.asm.frag

Lines changed: 98 additions & 321 deletions
Large diffs are not rendered by default.

reference/opt/shaders-ue4/asm/frag/padded-float-array-member-defef.asm.frag

Lines changed: 100 additions & 323 deletions
Large diffs are not rendered by default.

reference/opt/shaders-ue4/asm/frag/sample-mask-not-array.asm.frag

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ fragment main0_out main0(main0_in in [[stage_in]], constant type_View& View [[bu
462462
{
463463
_215 = in.in_var_TEXCOORD7;
464464
}
465-
float3 _216 = fast::max(Material.Material_VectorExpressions[1].xyz * float3(((1.0 + dot(float3(-1.0, -1.5, 3.0) / float3(sqrt(12.25)), normalize(float3x3(in.in_var_TEXCOORD10_centroid.xyz, cross(in.in_var_TEXCOORD11_centroid.xyz, in.in_var_TEXCOORD10_centroid.xyz) * float3(in.in_var_TEXCOORD11_centroid.w), in.in_var_TEXCOORD11_centroid.xyz) * normalize((float3(0.0, 0.0, 1.0) * float3(View.View_NormalOverrideParameter.w)) + View.View_NormalOverrideParameter.xyz)))) * 0.5) + 0.20000000298023223876953125), float3(0.0));
465+
float3 _216 = fast::max(Material.Material_VectorExpressions[1].xyz * float3(((1.0 + dot(float3(-0.2857142984867095947265625, -0.4285714328289031982421875, 0.857142865657806396484375), normalize(float3x3(in.in_var_TEXCOORD10_centroid.xyz, cross(in.in_var_TEXCOORD11_centroid.xyz, in.in_var_TEXCOORD10_centroid.xyz) * float3(in.in_var_TEXCOORD11_centroid.w), in.in_var_TEXCOORD11_centroid.xyz) * normalize((float3(0.0, 0.0, 1.0) * float3(View.View_NormalOverrideParameter.w)) + View.View_NormalOverrideParameter.xyz)))) * 0.5) + 0.20000000298023223876953125), float3(0.0));
466466
float3 _246;
467467
if (View.View_OutOfBoundsMask > 0.0)
468468
{

reference/opt/shaders-ue4/asm/vert/array-missing-copies.asm.vert

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -437,10 +437,8 @@ vertex main0_out main0(main0_in in [[stage_in]], constant type_View& View [[buff
437437
_396 = _354;
438438
}
439439
float _400 = fast::max(-127.0, MobileBasePass.MobileBasePass_Fog_ExponentialFogParameters.y * _396);
440-
float _405 = log(2.0);
441-
float _407 = 0.5 * (_405 * _405);
442440
float _417 = fast::max(-127.0, MobileBasePass.MobileBasePass_Fog_ExponentialFogParameters2.y * _396);
443-
float _428 = (_395 * ((abs(_400) > 0.00999999977648258209228515625) ? ((1.0 - exp2(-_400)) / _400) : (_405 - (_407 * _400)))) + (_394 * ((abs(_417) > 0.00999999977648258209228515625) ? ((1.0 - exp2(-_417)) / _417) : (_405 - (_407 * _417))));
441+
float _428 = (_395 * ((abs(_400) > 0.00999999977648258209228515625) ? ((1.0 - exp2(-_400)) / _400) : (0.693147182464599609375 - (0.2402265071868896484375 * _400)))) + (_394 * ((abs(_417) > 0.00999999977648258209228515625) ? ((1.0 - exp2(-_417)) / _417) : (0.693147182464599609375 - (0.2402265071868896484375 * _417))));
444442
float3 _459;
445443
if (MobileBasePass.MobileBasePass_Fog_InscatteringLightDirection.w >= 0.0)
446444
{

reference/opt/shaders/asm/frag/loop-body-dominator-continue-access.asm.frag

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -10,60 +10,60 @@ layout(binding = 0, std140) uniform Foo
1010
layout(location = 0) in vec3 fragWorld;
1111
layout(location = 0) out int _entryPointOutput;
1212

13-
int _240;
13+
int _228;
1414

1515
void main()
1616
{
17-
uint _227;
18-
int _236;
19-
for (;;)
17+
int _225;
18+
switch (0u)
2019
{
21-
_227 = 0u;
22-
bool _231;
23-
int _237;
24-
for (;;)
20+
default:
2521
{
26-
if (_227 < _11.shadowCascadesNum)
22+
bool _222;
23+
int _226;
24+
uint _219 = 0u;
25+
for (;;)
2726
{
28-
mat4 _228;
29-
for (;;)
27+
if (_219 < _11.shadowCascadesNum)
3028
{
31-
if (_11.test == 0)
29+
mat4 _220;
30+
switch (0u)
3231
{
33-
_228 = mat4(vec4(0.5, 0.0, 0.0, 0.0), vec4(0.0, 0.5, 0.0, 0.0), vec4(0.0, 0.0, 0.5, 0.0), vec4(0.0, 0.0, 0.0, 1.0));
32+
default:
33+
{
34+
if (_11.test == 0)
35+
{
36+
_220 = mat4(vec4(0.5, 0.0, 0.0, 0.0), vec4(0.0, 0.5, 0.0, 0.0), vec4(0.0, 0.0, 0.5, 0.0), vec4(0.0, 0.0, 0.0, 1.0));
37+
break;
38+
}
39+
_220 = mat4(vec4(1.0, 0.0, 0.0, 0.0), vec4(0.0, 1.0, 0.0, 0.0), vec4(0.0, 0.0, 1.0, 0.0), vec4(0.0, 0.0, 0.0, 1.0));
40+
break;
41+
}
42+
}
43+
vec4 _171 = (_220 * _11.lightVP[_219]) * vec4(fragWorld, 1.0);
44+
float _173 = _171.z;
45+
float _180 = _171.x;
46+
float _182 = _171.y;
47+
if ((((_173 >= 0.0) && (_173 <= 1.0)) && (max(_180, _182) <= 1.0)) && (min(_180, _182) >= 0.0))
48+
{
49+
_226 = int(_219);
50+
_222 = true;
3451
break;
3552
}
36-
_228 = mat4(vec4(1.0, 0.0, 0.0, 0.0), vec4(0.0, 1.0, 0.0, 0.0), vec4(0.0, 0.0, 1.0, 0.0), vec4(0.0, 0.0, 0.0, 1.0));
37-
break;
53+
_219++;
54+
continue;
3855
}
39-
vec4 _177 = (_228 * _11.lightVP[_227]) * vec4(fragWorld, 1.0);
40-
float _179 = _177.z;
41-
float _186 = _177.x;
42-
float _188 = _177.y;
43-
if ((((_179 >= 0.0) && (_179 <= 1.0)) && (max(_186, _188) <= 1.0)) && (min(_186, _188) >= 0.0))
56+
else
4457
{
45-
_237 = int(_227);
46-
_231 = true;
58+
_226 = _228;
59+
_222 = false;
4760
break;
4861
}
49-
_227++;
50-
continue;
5162
}
52-
else
53-
{
54-
_237 = _240;
55-
_231 = false;
56-
break;
57-
}
58-
}
59-
if (_231)
60-
{
61-
_236 = _237;
63+
_225 = -1;
6264
break;
6365
}
64-
_236 = -1;
65-
break;
6666
}
67-
_entryPointOutput = _236;
67+
_entryPointOutput = _225;
6868
}
6969

reference/opt/shaders/frag/for-loop-init.frag

Lines changed: 50 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -6,62 +6,63 @@ layout(location = 0) out mediump int FragColor;
66

77
void main()
88
{
9-
mediump int _145;
10-
for (;;)
9+
switch (0u)
1110
{
12-
FragColor = 16;
13-
_145 = 0;
14-
for (; _145 < 25; )
11+
default:
1512
{
16-
FragColor += 10;
17-
_145++;
18-
continue;
19-
}
20-
for (mediump int _146 = 1; _146 < 30; )
21-
{
22-
FragColor += 11;
23-
_146++;
24-
continue;
25-
}
26-
mediump int _147;
27-
_147 = 0;
28-
for (; _147 < 20; )
29-
{
30-
FragColor += 12;
31-
_147++;
32-
continue;
33-
}
34-
mediump int _62 = _147 + 3;
35-
FragColor += _62;
36-
if (_62 == 40)
37-
{
38-
for (mediump int _151 = 0; _151 < 40; )
13+
FragColor = 16;
14+
for (mediump int _143 = 0; _143 < 25; )
15+
{
16+
FragColor += 10;
17+
_143++;
18+
continue;
19+
}
20+
for (mediump int _144 = 1; _144 < 30; )
21+
{
22+
FragColor += 11;
23+
_144++;
24+
continue;
25+
}
26+
mediump int _145;
27+
_145 = 0;
28+
for (; _145 < 20; )
3929
{
40-
FragColor += 13;
41-
_151++;
30+
FragColor += 12;
31+
_145++;
4232
continue;
4333
}
34+
mediump int _62 = _145 + 3;
35+
FragColor += _62;
36+
if (_62 == 40)
37+
{
38+
for (mediump int _149 = 0; _149 < 40; )
39+
{
40+
FragColor += 13;
41+
_149++;
42+
continue;
43+
}
44+
break;
45+
}
46+
FragColor += _62;
47+
mediump ivec2 _146;
48+
_146 = ivec2(0);
49+
for (; _146.x < 10; )
50+
{
51+
FragColor += _146.y;
52+
mediump ivec2 _142 = _146;
53+
_142.x = _146.x + 4;
54+
_146 = _142;
55+
continue;
56+
}
57+
for (mediump int _148 = _62; _148 < 40; )
58+
{
59+
FragColor += _148;
60+
_148++;
61+
continue;
62+
}
63+
FragColor += _62;
4464
break;
4565
}
46-
FragColor += _62;
47-
mediump ivec2 _148;
48-
_148 = ivec2(0);
49-
for (; _148.x < 10; )
50-
{
51-
FragColor += _148.y;
52-
mediump ivec2 _144 = _148;
53-
_144.x = _148.x + 4;
54-
_148 = _144;
55-
continue;
56-
}
57-
for (mediump int _150 = _62; _150 < 40; )
58-
{
59-
FragColor += _150;
60-
_150++;
61-
continue;
62-
}
63-
FragColor += _62;
64-
break;
6566
}
6667
}
6768

reference/opt/shaders/frag/selection-block-dominator.frag

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,18 @@ layout(location = 0) out vec4 FragColor;
55

66
void main()
77
{
8-
for (;;)
8+
switch (0u)
99
{
10-
if (vIndex != 1)
10+
default:
1111
{
12-
FragColor = vec4(1.0);
12+
if (vIndex != 1)
13+
{
14+
FragColor = vec4(1.0);
15+
break;
16+
}
17+
FragColor = vec4(10.0);
1318
break;
1419
}
15-
FragColor = vec4(10.0);
16-
break;
1720
}
1821
}
1922

0 commit comments

Comments
 (0)