diff --git a/checkout_glslang_spirv_tools.sh b/checkout_glslang_spirv_tools.sh index 54171f2b..cf531329 100755 --- a/checkout_glslang_spirv_tools.sh +++ b/checkout_glslang_spirv_tools.sh @@ -1,7 +1,7 @@ #!/bin/bash -GLSLANG_REV=4b5159ea8170fa34e29f13448fddebf88e0a722a -SPIRV_TOOLS_REV=bbb29870b510f83f99994358179c9ea6838c3100 +GLSLANG_REV=5d0e01d9e7f9fae7609843d00f9fc5f41c3ddfdd +SPIRV_TOOLS_REV=e0d5544c9864e1b6852c4ab949892898b2866c3e SPIRV_HEADERS_REV=601d738723ac381741311c6c98c36d6170be14a2 if [ -z $PROTOCOL ]; then diff --git a/reference/opt/shaders-ue4/asm/frag/array-copy-error.asm.frag b/reference/opt/shaders-ue4/asm/frag/array-copy-error.asm.frag index e43b7bd3..73dc2eee 100644 --- a/reference/opt/shaders-ue4/asm/frag/array-copy-error.asm.frag +++ b/reference/opt/shaders-ue4/asm/frag/array-copy-error.asm.frag @@ -261,12 +261,6 @@ struct main0_in float4 in_var_TEXCOORD0_0 [[user(locn4)]]; }; -static inline __attribute__((always_inline)) -void _353() -{ - discard_fragment(); -} - fragment main0_out main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0)]], constant type_PrimitiveDither& PrimitiveDither [[buffer(1)]], constant type_PrimitiveFade& PrimitiveFade [[buffer(2)]], constant type_Material& Material [[buffer(3)]], texture2d Material_Texture2D_0 [[texture(0)]], texture2d Material_Texture2D_3 [[texture(1)]], sampler Material_Texture2D_0Sampler [[sampler(0)]], sampler Material_Texture2D_3Sampler [[sampler(1)]], float4 gl_FragCoord [[position]]) { main0_out out = {}; @@ -340,13 +334,13 @@ fragment main0_out main0(main0_in in [[stage_in]], constant type_View& View [[bu float _317 = fract(cos(dot(floor(gl_FragCoord.xy), float2(347.834503173828125, 3343.28369140625))) * 1000.0); if ((float((PrimitiveDither.PrimitiveDither_LODFactor < 0.0) ? ((PrimitiveDither.PrimitiveDither_LODFactor + 1.0) > _317) : (PrimitiveDither.PrimitiveDither_LODFactor < _317)) - 0.001000000047497451305389404296875) < 0.0) { - _353(); + discard_fragment(); } } } if ((((_218.z + ((fast::min(fast::max(1.0 - (_218.x * Material.Material_ScalarExpressions[2].y), 0.0), 1.0) + ((_237 + (_242.x * Material.Material_ScalarExpressions[2].z)) * 0.16666667163372039794921875)) + (-0.5))) * ((fast::clamp((View.View_RealTime * PrimitiveFade.PrimitiveFade_FadeTimeScaleBias.x) + PrimitiveFade.PrimitiveFade_FadeTimeScaleBias.y, 0.0, 1.0) + ((_237 + _254.x) * 0.16666667163372039794921875)) + (-0.5))) - 0.33329999446868896484375) < 0.0) { - _353(); + discard_fragment(); } float2 _351 = ((((in.in_var_TEXCOORD6.xy / float2(in.in_var_TEXCOORD6.w)) - View.View_TemporalAAJitter.xy) - ((in.in_var_TEXCOORD7.xy / float2(in.in_var_TEXCOORD7.w)) - View.View_TemporalAAJitter.zw)) * float2(0.2495000064373016357421875)) + float2(0.49999237060546875); out.gl_FragDepth = fast::min(_140.z / (_140.w + (sqrt(dot(_272, _272)) / (fast::max(sqrt(dot(_276, _276)) / sqrt(dot(_279, _279)), sqrt(dot(_284, _284)) / sqrt(dot(_287, _287))) / abs(dot(float3x3(View.View_ViewToTranslatedWorld[0].xyz, View.View_ViewToTranslatedWorld[1].xyz, View.View_ViewToTranslatedWorld[2].xyz) * float3(0.0, 0.0, 1.0), _151))))), gl_FragCoord.z); diff --git a/reference/opt/shaders-ue4/asm/frag/global-constant-arrays.asm.frag b/reference/opt/shaders-ue4/asm/frag/global-constant-arrays.asm.frag index 165b511b..89c22430 100644 --- a/reference/opt/shaders-ue4/asm/frag/global-constant-arrays.asm.frag +++ b/reference/opt/shaders-ue4/asm/frag/global-constant-arrays.asm.frag @@ -180,7 +180,7 @@ fragment main0_out main0(main0_in in [[stage_in]], constant type_Globals& _Globa float _665 = _633 + (((-_660.y) * _Globals.WhiteTint) * 0.0500000007450580596923828125); float _669 = _644 + ((_660.x * _Globals.WhiteTint) * 0.0500000007450580596923828125); float _674 = ((2.0 * _665) - (8.0 * _669)) + 4.0; - float2 _680 = select(float2(_616, ((((-3.0) * _616) * _616) + (2.86999988555908203125 * _616)) - 0.2750000059604644775390625), _653, bool2(_Globals.WhiteTemp < 4000.0)) + (float2((3.0 * _665) / _674, (2.0 * _669) / _674) - _653); + float2 _680 = select(float2(_616, (_616 * (((-3.0) * _616) + 2.86999988555908203125)) - 0.2750000059604644775390625), _653, bool2(_Globals.WhiteTemp < 4000.0)) + (float2((3.0 * _665) / _674, (2.0 * _669) / _674) - _653); float _681 = _680.x; float _682 = _680.y; float _683 = fast::max(_682, 1.0000000133514319600180897396058e-10); diff --git a/reference/opt/shaders-ue4/asm/frag/padded-float-array-member-defef.asm.frag b/reference/opt/shaders-ue4/asm/frag/padded-float-array-member-defef.asm.frag index feb976b8..dc928e5d 100644 --- a/reference/opt/shaders-ue4/asm/frag/padded-float-array-member-defef.asm.frag +++ b/reference/opt/shaders-ue4/asm/frag/padded-float-array-member-defef.asm.frag @@ -102,7 +102,7 @@ constant spvUnsafeArray _506 = spvUnsafeArray({ -2.3010299 constant spvUnsafeArray _507 = spvUnsafeArray({ 0.801995217800140380859375, 1.19800484180450439453125, 1.5943000316619873046875, 1.99730002880096435546875, 2.3782999515533447265625, 2.7683999538421630859375, 3.0515000820159912109375, 3.2746293544769287109375, 3.32743072509765625, 3.32743072509765625 }); constant float3 _523 = {}; -constant float3 _3123 = {}; +constant float3 _3124 = {}; struct main0_out { @@ -182,7 +182,7 @@ fragment main0_out main0(main0_in in [[stage_in]], constant type_Globals& _Globa float _691 = _659 + (((-_686.y) * _Globals.WhiteTint) * 0.0500000007450580596923828125); float _695 = _670 + ((_686.x * _Globals.WhiteTint) * 0.0500000007450580596923828125); float _700 = ((2.0 * _691) - (8.0 * _695)) + 4.0; - float2 _706 = select(float2(_642, ((((-3.0) * _642) * _642) + (2.86999988555908203125 * _642)) - 0.2750000059604644775390625), _679, bool2(_Globals.WhiteTemp < 4000.0)) + (float2((3.0 * _691) / _700, (2.0 * _695) / _700) - _679); + float2 _706 = select(float2(_642, (_642 * (((-3.0) * _642) + 2.86999988555908203125)) - 0.2750000059604644775390625), _679, bool2(_Globals.WhiteTemp < 4000.0)) + (float2((3.0 * _691) / _700, (2.0 * _695) / _700) - _679); float _707 = _706.x; float _708 = _706.y; float _709 = fast::max(_708, 1.0000000133514319600180897396058e-10); @@ -327,7 +327,7 @@ fragment main0_out main0(main0_in in [[stage_in]], constant type_Globals& _Globa float3 _1215; if (_Globals.ColorShadow_Tint2.w == 0.0) { - float3 _1157 = _3123; + float3 _1157 = _3124; _1157.x = dot(_932, _Globals.ColorMatrixR_ColorCurveCd1.xyz); float3 _1162 = _1157; _1162.y = dot(_932, _Globals.ColorMatrixG_ColorCurveCd3Cm3.xyz); diff --git a/reference/opt/shaders-ue4/asm/frag/phi-variable-declaration.asm.frag b/reference/opt/shaders-ue4/asm/frag/phi-variable-declaration.asm.frag index e43b7bd3..73dc2eee 100644 --- a/reference/opt/shaders-ue4/asm/frag/phi-variable-declaration.asm.frag +++ b/reference/opt/shaders-ue4/asm/frag/phi-variable-declaration.asm.frag @@ -261,12 +261,6 @@ struct main0_in float4 in_var_TEXCOORD0_0 [[user(locn4)]]; }; -static inline __attribute__((always_inline)) -void _353() -{ - discard_fragment(); -} - fragment main0_out main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0)]], constant type_PrimitiveDither& PrimitiveDither [[buffer(1)]], constant type_PrimitiveFade& PrimitiveFade [[buffer(2)]], constant type_Material& Material [[buffer(3)]], texture2d Material_Texture2D_0 [[texture(0)]], texture2d Material_Texture2D_3 [[texture(1)]], sampler Material_Texture2D_0Sampler [[sampler(0)]], sampler Material_Texture2D_3Sampler [[sampler(1)]], float4 gl_FragCoord [[position]]) { main0_out out = {}; @@ -340,13 +334,13 @@ fragment main0_out main0(main0_in in [[stage_in]], constant type_View& View [[bu float _317 = fract(cos(dot(floor(gl_FragCoord.xy), float2(347.834503173828125, 3343.28369140625))) * 1000.0); if ((float((PrimitiveDither.PrimitiveDither_LODFactor < 0.0) ? ((PrimitiveDither.PrimitiveDither_LODFactor + 1.0) > _317) : (PrimitiveDither.PrimitiveDither_LODFactor < _317)) - 0.001000000047497451305389404296875) < 0.0) { - _353(); + discard_fragment(); } } } if ((((_218.z + ((fast::min(fast::max(1.0 - (_218.x * Material.Material_ScalarExpressions[2].y), 0.0), 1.0) + ((_237 + (_242.x * Material.Material_ScalarExpressions[2].z)) * 0.16666667163372039794921875)) + (-0.5))) * ((fast::clamp((View.View_RealTime * PrimitiveFade.PrimitiveFade_FadeTimeScaleBias.x) + PrimitiveFade.PrimitiveFade_FadeTimeScaleBias.y, 0.0, 1.0) + ((_237 + _254.x) * 0.16666667163372039794921875)) + (-0.5))) - 0.33329999446868896484375) < 0.0) { - _353(); + discard_fragment(); } float2 _351 = ((((in.in_var_TEXCOORD6.xy / float2(in.in_var_TEXCOORD6.w)) - View.View_TemporalAAJitter.xy) - ((in.in_var_TEXCOORD7.xy / float2(in.in_var_TEXCOORD7.w)) - View.View_TemporalAAJitter.zw)) * float2(0.2495000064373016357421875)) + float2(0.49999237060546875); out.gl_FragDepth = fast::min(_140.z / (_140.w + (sqrt(dot(_272, _272)) / (fast::max(sqrt(dot(_276, _276)) / sqrt(dot(_279, _279)), sqrt(dot(_284, _284)) / sqrt(dot(_287, _287))) / abs(dot(float3x3(View.View_ViewToTranslatedWorld[0].xyz, View.View_ViewToTranslatedWorld[1].xyz, View.View_ViewToTranslatedWorld[2].xyz) * float3(0.0, 0.0, 1.0), _151))))), gl_FragCoord.z); diff --git a/reference/opt/shaders-ue4/asm/tesc/hs-incorrect-base-type.asm.tesc b/reference/opt/shaders-ue4/asm/tesc/hs-incorrect-base-type.asm.tesc index 47a95766..ec5d9960 100644 --- a/reference/opt/shaders-ue4/asm/tesc/hs-incorrect-base-type.asm.tesc +++ b/reference/opt/shaders-ue4/asm/tesc/hs-incorrect-base-type.asm.tesc @@ -263,7 +263,7 @@ struct type_StructuredBuffer_v4float float4 _m0[1]; }; -constant float4 _600 = {}; +constant float4 _602 = {}; struct main0_out { @@ -328,7 +328,7 @@ kernel void main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0) float4 _328 = float4(param_var_I[_313].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); float4 _336 = float4(param_var_I[_315].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); float4 _344 = float4(param_var_I[_316].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); - spvUnsafeArray _392 = spvUnsafeArray({ param_var_I[gl_InvocationID].Position, (((((float4(2.0) * param_var_I[gl_InvocationID].Position) + param_var_I[_313].Position) - (float4(dot(param_var_I[_313].Position - param_var_I[gl_InvocationID].Position, _301)) * _301)) * float4(0.3333333432674407958984375)) + ((((float4(2.0) * param_var_I[_315].Position) + param_var_I[_316].Position) - (float4(dot(param_var_I[_316].Position - param_var_I[_315].Position, _336)) * _336)) * float4(0.3333333432674407958984375))) * float4(0.5), (((((float4(2.0) * param_var_I[_313].Position) + param_var_I[gl_InvocationID].Position) - (float4(dot(param_var_I[gl_InvocationID].Position - param_var_I[_313].Position, _328)) * _328)) * float4(0.3333333432674407958984375)) + ((((float4(2.0) * param_var_I[_316].Position) + param_var_I[_315].Position) - (float4(dot(param_var_I[_315].Position - param_var_I[_316].Position, _344)) * _344)) * float4(0.3333333432674407958984375))) * float4(0.5) }); + spvUnsafeArray _392 = spvUnsafeArray({ param_var_I[gl_InvocationID].Position, ((((float4(2.0) * param_var_I[gl_InvocationID].Position) + param_var_I[_313].Position) - (float4(dot(param_var_I[_313].Position - param_var_I[gl_InvocationID].Position, _301)) * _301)) + (((float4(2.0) * param_var_I[_315].Position) + param_var_I[_316].Position) - (float4(dot(param_var_I[_316].Position - param_var_I[_315].Position, _336)) * _336))) * float4(0.16666667163372039794921875), ((((float4(2.0) * param_var_I[_313].Position) + param_var_I[gl_InvocationID].Position) - (float4(dot(param_var_I[gl_InvocationID].Position - param_var_I[_313].Position, _328)) * _328)) + (((float4(2.0) * param_var_I[_316].Position) + param_var_I[_315].Position) - (float4(dot(param_var_I[_315].Position - param_var_I[_316].Position, _344)) * _344))) * float4(0.16666667163372039794921875) }); gl_out[gl_InvocationID].out_var_TEXCOORD10_centroid = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; gl_out[gl_InvocationID].out_var_TEXCOORD11_centroid = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; gl_out[gl_InvocationID].out_var_COLOR0 = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.Color; @@ -346,7 +346,7 @@ kernel void main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0) if (gl_InvocationID == 0u) { float4 _450 = (((((temp_var_hullMainRetVal[0u].WorldPosition[1] + temp_var_hullMainRetVal[0u].WorldPosition[2]) + temp_var_hullMainRetVal[1u].WorldPosition[1]) + temp_var_hullMainRetVal[1u].WorldPosition[2]) + temp_var_hullMainRetVal[2u].WorldPosition[1]) + temp_var_hullMainRetVal[2u].WorldPosition[2]) * float4(0.16666667163372039794921875); - float4 _463 = _600; + float4 _463 = _602; _463.x = 0.5 * (temp_var_hullMainRetVal[1u].TessellationMultiplier + temp_var_hullMainRetVal[2u].TessellationMultiplier); float4 _469 = _463; _469.y = 0.5 * (temp_var_hullMainRetVal[2u].TessellationMultiplier + temp_var_hullMainRetVal[0u].TessellationMultiplier); diff --git a/reference/opt/shaders-ue4/asm/tesc/hs-input-array-access.asm.tesc b/reference/opt/shaders-ue4/asm/tesc/hs-input-array-access.asm.tesc index f41095a3..848aa9ab 100644 --- a/reference/opt/shaders-ue4/asm/tesc/hs-input-array-access.asm.tesc +++ b/reference/opt/shaders-ue4/asm/tesc/hs-input-array-access.asm.tesc @@ -304,7 +304,7 @@ struct type_Primitive float4 Primitive_CustomPrimitiveData[4]; }; -constant float4 _611 = {}; +constant float4 _613 = {}; struct main0_out { @@ -391,7 +391,7 @@ kernel void main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0) float4 _336 = float4(param_var_I[_254].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); float4 _344 = float4(param_var_I[_256].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); float4 _352 = float4(param_var_I[_257].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); - spvUnsafeArray _402 = spvUnsafeArray({ param_var_I[gl_InvocationID].Position, (((((float4(2.0) * param_var_I[gl_InvocationID].Position) + param_var_I[_254].Position) - (float4(dot(param_var_I[_254].Position - param_var_I[gl_InvocationID].Position, _247)) * _247)) * float4(0.3333333432674407958984375)) + ((((float4(2.0) * param_var_I[_256].Position) + param_var_I[_257].Position) - (float4(dot(param_var_I[_257].Position - param_var_I[_256].Position, _344)) * _344)) * float4(0.3333333432674407958984375))) * float4(0.5), (((((float4(2.0) * param_var_I[_254].Position) + param_var_I[gl_InvocationID].Position) - (float4(dot(param_var_I[gl_InvocationID].Position - param_var_I[_254].Position, _336)) * _336)) * float4(0.3333333432674407958984375)) + ((((float4(2.0) * param_var_I[_257].Position) + param_var_I[_256].Position) - (float4(dot(param_var_I[_256].Position - param_var_I[_257].Position, _352)) * _352)) * float4(0.3333333432674407958984375))) * float4(0.5) }); + spvUnsafeArray _402 = spvUnsafeArray({ param_var_I[gl_InvocationID].Position, ((((float4(2.0) * param_var_I[gl_InvocationID].Position) + param_var_I[_254].Position) - (float4(dot(param_var_I[_254].Position - param_var_I[gl_InvocationID].Position, _247)) * _247)) + (((float4(2.0) * param_var_I[_256].Position) + param_var_I[_257].Position) - (float4(dot(param_var_I[_257].Position - param_var_I[_256].Position, _344)) * _344))) * float4(0.16666667163372039794921875), ((((float4(2.0) * param_var_I[_254].Position) + param_var_I[gl_InvocationID].Position) - (float4(dot(param_var_I[gl_InvocationID].Position - param_var_I[_254].Position, _336)) * _336)) + (((float4(2.0) * param_var_I[_257].Position) + param_var_I[_256].Position) - (float4(dot(param_var_I[_256].Position - param_var_I[_257].Position, _352)) * _352))) * float4(0.16666667163372039794921875) }); gl_out[gl_InvocationID].out_var_TEXCOORD10_centroid = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; gl_out[gl_InvocationID].out_var_TEXCOORD11_centroid = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; gl_out[gl_InvocationID].out_var_VS_To_DS_Position = param_var_I[gl_InvocationID].Position; @@ -414,7 +414,7 @@ kernel void main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0) if (gl_InvocationID == 0u) { float4 _461 = (((((temp_var_hullMainRetVal[0u].WorldPosition[1] + temp_var_hullMainRetVal[0u].WorldPosition[2]) + temp_var_hullMainRetVal[1u].WorldPosition[1]) + temp_var_hullMainRetVal[1u].WorldPosition[2]) + temp_var_hullMainRetVal[2u].WorldPosition[1]) + temp_var_hullMainRetVal[2u].WorldPosition[2]) * float4(0.16666667163372039794921875); - float4 _474 = _611; + float4 _474 = _613; _474.x = 0.5 * (temp_var_hullMainRetVal[1u].TessellationMultiplier + temp_var_hullMainRetVal[2u].TessellationMultiplier); float4 _480 = _474; _480.y = 0.5 * (temp_var_hullMainRetVal[2u].TessellationMultiplier + temp_var_hullMainRetVal[0u].TessellationMultiplier); diff --git a/reference/opt/shaders-ue4/asm/tesc/hs-texcoord-array.asm.tesc b/reference/opt/shaders-ue4/asm/tesc/hs-texcoord-array.asm.tesc index 51c2a1de..674992ca 100644 --- a/reference/opt/shaders-ue4/asm/tesc/hs-texcoord-array.asm.tesc +++ b/reference/opt/shaders-ue4/asm/tesc/hs-texcoord-array.asm.tesc @@ -286,7 +286,7 @@ struct type_Primitive float4 Primitive_CustomPrimitiveData[4]; }; -constant float4 _535 = {}; +constant float4 _537 = {}; struct main0_out { @@ -343,7 +343,7 @@ kernel void main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0) float4 _269 = float4(param_var_I[_254].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); float4 _277 = float4(param_var_I[_256].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); float4 _285 = float4(param_var_I[_257].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); - spvUnsafeArray _333 = spvUnsafeArray({ param_var_I[gl_InvocationID].Position, (((((float4(2.0) * param_var_I[gl_InvocationID].Position) + param_var_I[_254].Position) - (float4(dot(param_var_I[_254].Position - param_var_I[gl_InvocationID].Position, _247)) * _247)) * float4(0.3333333432674407958984375)) + ((((float4(2.0) * param_var_I[_256].Position) + param_var_I[_257].Position) - (float4(dot(param_var_I[_257].Position - param_var_I[_256].Position, _277)) * _277)) * float4(0.3333333432674407958984375))) * float4(0.5), (((((float4(2.0) * param_var_I[_254].Position) + param_var_I[gl_InvocationID].Position) - (float4(dot(param_var_I[gl_InvocationID].Position - param_var_I[_254].Position, _269)) * _269)) * float4(0.3333333432674407958984375)) + ((((float4(2.0) * param_var_I[_257].Position) + param_var_I[_256].Position) - (float4(dot(param_var_I[_256].Position - param_var_I[_257].Position, _285)) * _285)) * float4(0.3333333432674407958984375))) * float4(0.5) }); + spvUnsafeArray _333 = spvUnsafeArray({ param_var_I[gl_InvocationID].Position, ((((float4(2.0) * param_var_I[gl_InvocationID].Position) + param_var_I[_254].Position) - (float4(dot(param_var_I[_254].Position - param_var_I[gl_InvocationID].Position, _247)) * _247)) + (((float4(2.0) * param_var_I[_256].Position) + param_var_I[_257].Position) - (float4(dot(param_var_I[_257].Position - param_var_I[_256].Position, _277)) * _277))) * float4(0.16666667163372039794921875), ((((float4(2.0) * param_var_I[_254].Position) + param_var_I[gl_InvocationID].Position) - (float4(dot(param_var_I[gl_InvocationID].Position - param_var_I[_254].Position, _269)) * _269)) + (((float4(2.0) * param_var_I[_257].Position) + param_var_I[_256].Position) - (float4(dot(param_var_I[_256].Position - param_var_I[_257].Position, _285)) * _285))) * float4(0.16666667163372039794921875) }); gl_out[gl_InvocationID].out_var_TEXCOORD10_centroid = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; gl_out[gl_InvocationID].out_var_TEXCOORD11_centroid = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; gl_out[gl_InvocationID].out_var_COLOR0 = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.Color; @@ -358,7 +358,7 @@ kernel void main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0) if (gl_InvocationID == 0u) { float4 _385 = (((((temp_var_hullMainRetVal[0u].WorldPosition[1] + temp_var_hullMainRetVal[0u].WorldPosition[2]) + temp_var_hullMainRetVal[1u].WorldPosition[1]) + temp_var_hullMainRetVal[1u].WorldPosition[2]) + temp_var_hullMainRetVal[2u].WorldPosition[1]) + temp_var_hullMainRetVal[2u].WorldPosition[2]) * float4(0.16666667163372039794921875); - float4 _398 = _535; + float4 _398 = _537; _398.x = 0.5 * (temp_var_hullMainRetVal[1u].TessellationMultiplier + temp_var_hullMainRetVal[2u].TessellationMultiplier); float4 _404 = _398; _404.y = 0.5 * (temp_var_hullMainRetVal[2u].TessellationMultiplier + temp_var_hullMainRetVal[0u].TessellationMultiplier); diff --git a/reference/opt/shaders/asm/frag/complex-name-workarounds.asm.frag b/reference/opt/shaders/asm/frag/complex-name-workarounds.asm.frag index c07f1657..d68f84b4 100644 --- a/reference/opt/shaders/asm/frag/complex-name-workarounds.asm.frag +++ b/reference/opt/shaders/asm/frag/complex-name-workarounds.asm.frag @@ -7,10 +7,9 @@ layout(location = 0) out vec4 b; void main() { vec4 _28 = (_ + a) + _; - vec4 _34 = (_ - a) + a; b = _28; - b = _34; + b = _; b = _28; - b = _34; + b = _; } diff --git a/reference/shaders-msl-no-opt/comp/loop.comp b/reference/shaders-msl-no-opt/comp/loop.comp index 74c8b4c2..34fe64b0 100644 --- a/reference/shaders-msl-no-opt/comp/loop.comp +++ b/reference/shaders-msl-no-opt/comp/loop.comp @@ -16,7 +16,7 @@ struct SSBO2 constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -kernel void main0(const device SSBO& _24 [[buffer(0)]], device SSBO2& _177 [[buffer(1)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]]) +kernel void main0(const device SSBO& _24 [[buffer(0)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]]) { uint ident = gl_GlobalInvocationID.x; float4 idat = _24.in_data[ident]; @@ -87,25 +87,5 @@ kernel void main0(const device SSBO& _24 [[buffer(0)]], device SSBO2& _177 [[buf k += 10; continue; } - k = 0; - do - { - k++; - } while (k > 10); - int l = 0; - for (;;) - { - if (l == 5) - { - int _172 = l; - l = _172 + 1; - continue; - } - idat += float4(1.0); - int _172 = l; - l = _172 + 1; - continue; - } - _177.out_data[ident] = idat; } diff --git a/reference/shaders-msl-no-opt/comp/return.comp b/reference/shaders-msl-no-opt/comp/return.comp index 5e0bdcc3..04cacea9 100644 --- a/reference/shaders-msl-no-opt/comp/return.comp +++ b/reference/shaders-msl-no-opt/comp/return.comp @@ -25,7 +25,8 @@ kernel void main0(device SSBO2& _27 [[buffer(0)]], uint3 gl_GlobalInvocationID [ return; } } - for (int i = 0; i < 20; i++) + int i = 0; + while (i < 20) { if (i == 10) { diff --git a/reference/shaders-msl-no-opt/vert/functions_nested.vert b/reference/shaders-msl-no-opt/vert/functions_nested.vert index 5ef90014..98c55aaa 100644 --- a/reference/shaders-msl-no-opt/vert/functions_nested.vert +++ b/reference/shaders-msl-no-opt/vert/functions_nested.vert @@ -27,8 +27,6 @@ struct VertexConstantsBuffer float4 vc[16]; }; -constant float4 _295 = {}; - struct main0_out { float4 tc0 [[user(locn0)]]; diff --git a/reference/shaders-msl/vert/packed_matrix.vert b/reference/shaders-msl/vert/packed_matrix.vert index f54519b3..9d901d5b 100644 --- a/reference/shaders-msl/vert/packed_matrix.vert +++ b/reference/shaders-msl/vert/packed_matrix.vert @@ -40,11 +40,11 @@ vertex main0_out main0(main0_in in [[stage_in]], constant _15& _17 [[buffer(0)]] main0_out out = {}; float3 _91; float3 _13; - do + for (;;) { _13 = normalize(float4(in.m_25.xyz, 0.0) * _17._m1); break; - } while (false); + } float4 _39 = _44._m0 * float4(float3(_44._m3) + (in.m_25.xyz * (_44._m6 + _44._m7)), 1.0); out.m_72 = _13; float4 _74 = _39; diff --git a/reference/shaders-no-opt/asm/frag/for-loop-dedicated-merge-block-inverted.asm.invalid.frag b/reference/shaders-no-opt/asm/frag/for-loop-dedicated-merge-block-inverted.asm.invalid.frag new file mode 100644 index 00000000..16c7dc36 --- /dev/null +++ b/reference/shaders-no-opt/asm/frag/for-loop-dedicated-merge-block-inverted.asm.invalid.frag @@ -0,0 +1,11 @@ +#version 450 + +void main() +{ + int _13; + for (int _12 = 0; !(_12 == 16); _12 = _13) + { + _13 = _12 + 1; + } +} + diff --git a/reference/shaders-no-opt/asm/frag/for-loop-dedicated-merge-block-non-inverted.asm.invalid.frag b/reference/shaders-no-opt/asm/frag/for-loop-dedicated-merge-block-non-inverted.asm.invalid.frag new file mode 100644 index 00000000..b4c06318 --- /dev/null +++ b/reference/shaders-no-opt/asm/frag/for-loop-dedicated-merge-block-non-inverted.asm.invalid.frag @@ -0,0 +1,11 @@ +#version 450 + +void main() +{ + int _13; + for (int _12 = 0; _12 != 16; _12 = _13) + { + _13 = _12 + 1; + } +} + diff --git a/reference/shaders-no-opt/comp/loop.comp b/reference/shaders-no-opt/comp/loop.comp index 33888dd7..2ba731cd 100644 --- a/reference/shaders-no-opt/comp/loop.comp +++ b/reference/shaders-no-opt/comp/loop.comp @@ -7,11 +7,6 @@ layout(binding = 0, std430) readonly buffer SSBO vec4 in_data[]; } _24; -layout(binding = 1, std430) writeonly buffer SSBO2 -{ - vec4 out_data[]; -} _177; - void main() { uint ident = gl_GlobalInvocationID.x; @@ -83,25 +78,5 @@ void main() k += 10; continue; } - k = 0; - do - { - k++; - } while (k > 10); - int l = 0; - for (;;) - { - if (l == 5) - { - int _172 = l; - l = _172 + 1; - continue; - } - idat += vec4(1.0); - int _172 = l; - l = _172 + 1; - continue; - } - _177.out_data[ident] = idat; } diff --git a/reference/shaders-no-opt/comp/return.comp b/reference/shaders-no-opt/comp/return.comp index 4be20e93..4802be22 100644 --- a/reference/shaders-no-opt/comp/return.comp +++ b/reference/shaders-no-opt/comp/return.comp @@ -21,7 +21,8 @@ void main() return; } } - for (int i = 0; i < 20; i++) + int i = 0; + while (i < 20) { if (i == 10) { diff --git a/shaders-no-opt/asm/frag/for-loop-dedicated-merge-block-inverted.asm.frag b/shaders-no-opt/asm/frag/for-loop-dedicated-merge-block-inverted.asm.invalid.frag similarity index 100% rename from shaders-no-opt/asm/frag/for-loop-dedicated-merge-block-inverted.asm.frag rename to shaders-no-opt/asm/frag/for-loop-dedicated-merge-block-inverted.asm.invalid.frag diff --git a/shaders-no-opt/asm/frag/for-loop-dedicated-merge-block-non-inverted.asm.frag b/shaders-no-opt/asm/frag/for-loop-dedicated-merge-block-non-inverted.asm.invalid.frag similarity index 100% rename from shaders-no-opt/asm/frag/for-loop-dedicated-merge-block-non-inverted.asm.frag rename to shaders-no-opt/asm/frag/for-loop-dedicated-merge-block-non-inverted.asm.invalid.frag