diff --git a/reference/opt/shaders-hlsl/asm/comp/access-chain-invalidate.asm.comp b/reference/opt/shaders-hlsl/asm/comp/access-chain-invalidate.asm.comp index b8265fc9..9e3b90fa 100644 --- a/reference/opt/shaders-hlsl/asm/comp/access-chain-invalidate.asm.comp +++ b/reference/opt/shaders-hlsl/asm/comp/access-chain-invalidate.asm.comp @@ -1,15 +1,15 @@ -RWByteAddressBuffer _4 : register(u0); +RWByteAddressBuffer _6 : register(u0); void comp_main() { - uint _21 = _4.Load(_4.Load(0) * 4 + 4); - for (uint _23 = 0u; _23 < 64u; ) + uint _21 = _6.Load(_6.Load(0) * 4 + 4); + for (uint _40 = 0u; _40 < 64u; ) { - _4.Store(_23 * 4 + 4, 0u); - _23++; + _6.Store(_40 * 4 + 4, 0u); + _40++; continue; } - _4.Store(_4.Load(0) * 4 + 4, _21); + _6.Store(_6.Load(0) * 4 + 4, _21); } [numthreads(1, 1, 1)] diff --git a/reference/opt/shaders-hlsl/asm/comp/atomic-decrement.asm.comp b/reference/opt/shaders-hlsl/asm/comp/atomic-decrement.asm.comp index c534ceab..0f56123d 100644 --- a/reference/opt/shaders-hlsl/asm/comp/atomic-decrement.asm.comp +++ b/reference/opt/shaders-hlsl/asm/comp/atomic-decrement.asm.comp @@ -9,9 +9,9 @@ struct SPIRV_Cross_Input void comp_main() { - uint _29; - u0_counter.InterlockedAdd(0, -1, _29); - u0[asint(asfloat(_29))] = uint(int(gl_GlobalInvocationID.x)).x; + uint _24; + u0_counter.InterlockedAdd(0, -1, _24); + u0[asint(asfloat(_24))] = uint(int(gl_GlobalInvocationID.x)).x; } [numthreads(4, 1, 1)] diff --git a/reference/opt/shaders-hlsl/asm/comp/atomic-increment.asm.comp b/reference/opt/shaders-hlsl/asm/comp/atomic-increment.asm.comp index 5e7d282d..bf1fdebe 100644 --- a/reference/opt/shaders-hlsl/asm/comp/atomic-increment.asm.comp +++ b/reference/opt/shaders-hlsl/asm/comp/atomic-increment.asm.comp @@ -9,9 +9,9 @@ struct SPIRV_Cross_Input void comp_main() { - uint _29; - u0_counter.InterlockedAdd(0, 1, _29); - u0[asint(asfloat(_29))] = uint(int(gl_GlobalInvocationID.x)).x; + uint _24; + u0_counter.InterlockedAdd(0, 1, _24); + u0[asint(asfloat(_24))] = uint(int(gl_GlobalInvocationID.x)).x; } [numthreads(4, 1, 1)] diff --git a/reference/opt/shaders-hlsl/asm/frag/cbuffer-stripped.asm.frag b/reference/opt/shaders-hlsl/asm/frag/cbuffer-stripped.asm.frag index b410010d..b51bc9cc 100644 --- a/reference/opt/shaders-hlsl/asm/frag/cbuffer-stripped.asm.frag +++ b/reference/opt/shaders-hlsl/asm/frag/cbuffer-stripped.asm.frag @@ -1,26 +1,26 @@ -cbuffer _4_5 : register(b0) +cbuffer _6_7 : register(b0) { - column_major float2x4 _5_m0 : packoffset(c0); - float4 _5_m1 : packoffset(c4); + column_major float2x4 _7_m0 : packoffset(c0); + float4 _7_m1 : packoffset(c4); }; -static float2 _3; +static float2 _4; struct SPIRV_Cross_Output { - float2 _3 : SV_Target0; + float2 _4 : SV_Target0; }; void frag_main() { - _3 = mul(_5_m0, _5_m1); + _4 = mul(_7_m0, _7_m1); } SPIRV_Cross_Output main() { frag_main(); SPIRV_Cross_Output stage_output; - stage_output._3 = _3; + stage_output._4 = _4; return stage_output; } diff --git a/reference/opt/shaders-hlsl/asm/frag/image-extract-reuse.asm.frag b/reference/opt/shaders-hlsl/asm/frag/image-extract-reuse.asm.frag index 2527d10f..0f858d21 100644 --- a/reference/opt/shaders-hlsl/asm/frag/image-extract-reuse.asm.frag +++ b/reference/opt/shaders-hlsl/asm/frag/image-extract-reuse.asm.frag @@ -17,9 +17,9 @@ uint2 spvTextureSize(Texture2D Tex, uint Level, out uint Param) void frag_main() { + uint _18_dummy_parameter; uint _19_dummy_parameter; - uint _20_dummy_parameter; - Size = int2(spvTextureSize(uTexture, uint(0), _19_dummy_parameter)) + int2(spvTextureSize(uTexture, uint(1), _20_dummy_parameter)); + Size = int2(spvTextureSize(uTexture, uint(0), _18_dummy_parameter)) + int2(spvTextureSize(uTexture, uint(1), _19_dummy_parameter)); } SPIRV_Cross_Output main() diff --git a/reference/opt/shaders-hlsl/asm/frag/implicit-read-dep-phi.asm.frag b/reference/opt/shaders-hlsl/asm/frag/implicit-read-dep-phi.asm.frag index 67f14fcc..a991b64c 100644 --- a/reference/opt/shaders-hlsl/asm/frag/implicit-read-dep-phi.asm.frag +++ b/reference/opt/shaders-hlsl/asm/frag/implicit-read-dep-phi.asm.frag @@ -17,22 +17,22 @@ struct SPIRV_Cross_Output void frag_main() { float phi; - float4 _36; - int _51; - _51 = 0; + float4 _45; + int _57; + _57 = 0; phi = 1.0f; - _36 = float4(1.0f, 2.0f, 1.0f, 2.0f); + _45 = float4(1.0f, 2.0f, 1.0f, 2.0f); for (;;) { - FragColor = _36; - if (_51 < 4) + FragColor = _45; + if (_57 < 4) { - if (v0[_51] > 0.0f) + if (v0[_57] > 0.0f) { - float2 _48 = phi.xx; - _51++; + float2 _43 = phi.xx; + _57++; phi += 2.0f; - _36 = uImage.SampleLevel(_uImage_sampler, _48, 0.0f); + _45 = uImage.SampleLevel(_uImage_sampler, _43, 0.0f); continue; } else diff --git a/reference/opt/shaders-hlsl/asm/frag/line-directive.line.asm.frag b/reference/opt/shaders-hlsl/asm/frag/line-directive.line.asm.frag index 4a1cf2ee..413e17c8 100644 --- a/reference/opt/shaders-hlsl/asm/frag/line-directive.line.asm.frag +++ b/reference/opt/shaders-hlsl/asm/frag/line-directive.line.asm.frag @@ -30,14 +30,14 @@ void frag_main() FragColor = 4.0f; } #line 19 "test.frag" - for (int _127 = 0; float(_127) < (40.0f + vColor); ) + for (int _131 = 0; float(_131) < (40.0f + vColor); ) { #line 21 "test.frag" FragColor += 0.20000000298023223876953125f; #line 22 "test.frag" FragColor += 0.300000011920928955078125f; #line 19 "test.frag" - _127 += (int(vColor) + 5); + _131 += (int(vColor) + 5); continue; } #line 25 "test.frag" diff --git a/reference/opt/shaders-hlsl/asm/frag/lut-promotion-initializer.asm.frag b/reference/opt/shaders-hlsl/asm/frag/lut-promotion-initializer.asm.frag index 5deae3a5..c17bc403 100644 --- a/reference/opt/shaders-hlsl/asm/frag/lut-promotion-initializer.asm.frag +++ b/reference/opt/shaders-hlsl/asm/frag/lut-promotion-initializer.asm.frag @@ -1,6 +1,6 @@ -static const float _46[16] = { 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f }; -static const float4 _76[4] = { 0.0f.xxxx, 1.0f.xxxx, 8.0f.xxxx, 5.0f.xxxx }; -static const float4 _90[4] = { 20.0f.xxxx, 30.0f.xxxx, 50.0f.xxxx, 60.0f.xxxx }; +static const float _16[16] = { 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f }; +static const float4 _60[4] = { 0.0f.xxxx, 1.0f.xxxx, 8.0f.xxxx, 5.0f.xxxx }; +static const float4 _104[4] = { 20.0f.xxxx, 30.0f.xxxx, 50.0f.xxxx, 60.0f.xxxx }; static float FragColor; static int index; @@ -17,34 +17,34 @@ struct SPIRV_Cross_Output void frag_main() { - float4 foobar[4] = _76; - float4 baz[4] = _76; - FragColor = _46[index]; + float4 foobar[4] = _60; + float4 baz[4] = _60; + FragColor = _16[index]; if (index < 10) { - FragColor += _46[index ^ 1]; + FragColor += _16[index ^ 1]; } else { - FragColor += _46[index & 1]; + FragColor += _16[index & 1]; } - bool _99 = index > 30; - if (_99) + bool _63 = index > 30; + if (_63) { - FragColor += _76[index & 3].y; + FragColor += _60[index & 3].y; } else { - FragColor += _76[index & 1].x; + FragColor += _60[index & 1].x; } - if (_99) + if (_63) { foobar[1].z = 20.0f; } - int _37 = index & 3; - FragColor += foobar[_37].z; - baz = _90; - FragColor += baz[_37].z; + int _91 = index & 3; + FragColor += foobar[_91].z; + baz = _104; + FragColor += baz[_91].z; } SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input) diff --git a/reference/opt/shaders-hlsl/asm/frag/unreachable.asm.frag b/reference/opt/shaders-hlsl/asm/frag/unreachable.asm.frag index 4a024c8e..9f51a1d6 100644 --- a/reference/opt/shaders-hlsl/asm/frag/unreachable.asm.frag +++ b/reference/opt/shaders-hlsl/asm/frag/unreachable.asm.frag @@ -13,21 +13,21 @@ struct SPIRV_Cross_Output void frag_main() { - float4 _33; + float4 _46; for (;;) { if (counter == 10) { - _33 = 10.0f.xxxx; + _46 = 10.0f.xxxx; break; } else { - _33 = 30.0f.xxxx; + _46 = 30.0f.xxxx; break; } } - FragColor = _33; + FragColor = _46; } SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input) diff --git a/reference/opt/shaders-hlsl/asm/vert/spec-constant-op-composite.asm.vert b/reference/opt/shaders-hlsl/asm/vert/spec-constant-op-composite.asm.vert index 3bccae3e..b09e78e8 100644 --- a/reference/opt/shaders-hlsl/asm/vert/spec-constant-op-composite.asm.vert +++ b/reference/opt/shaders-hlsl/asm/vert/spec-constant-op-composite.asm.vert @@ -1,35 +1,35 @@ #ifndef SPIRV_CROSS_CONSTANT_ID_201 #define SPIRV_CROSS_CONSTANT_ID_201 -10 #endif -static const int _7 = SPIRV_CROSS_CONSTANT_ID_201; -static const int _20 = (_7 + 2); +static const int _13 = SPIRV_CROSS_CONSTANT_ID_201; +static const int _15 = (_13 + 2); #ifndef SPIRV_CROSS_CONSTANT_ID_202 #define SPIRV_CROSS_CONSTANT_ID_202 100u #endif -static const uint _8 = SPIRV_CROSS_CONSTANT_ID_202; -static const uint _25 = (_8 % 5u); -static const int4 _30 = int4(20, 30, _20, _20); -static const int2 _32 = int2(_30.y, _30.x); -static const int _33 = _30.y; +static const uint _24 = SPIRV_CROSS_CONSTANT_ID_202; +static const uint _26 = (_24 % 5u); +static const int4 _36 = int4(20, 30, _15, _15); +static const int2 _41 = int2(_36.y, _36.x); +static const int _60 = _36.y; static float4 gl_Position; -static int _4; +static int _58; struct SPIRV_Cross_Output { - nointerpolation int _4 : TEXCOORD0; + nointerpolation int _58 : TEXCOORD0; float4 gl_Position : SV_Position; }; void vert_main() { float4 _63 = 0.0f.xxxx; - _63.y = float(_20); - _63.z = float(_25); - float4 _52 = _63 + float4(_30); - float2 _56 = _52.xy + float2(_32); - gl_Position = float4(_56.x, _56.y, _52.z, _52.w); - _4 = _33; + _63.y = float(_15); + _63.z = float(_26); + float4 _39 = _63 + float4(_36); + float2 _46 = _39.xy + float2(_41); + gl_Position = float4(_46.x, _46.y, _39.z, _39.w); + _58 = _60; } SPIRV_Cross_Output main() @@ -37,6 +37,6 @@ SPIRV_Cross_Output main() vert_main(); SPIRV_Cross_Output stage_output; stage_output.gl_Position = gl_Position; - stage_output._4 = _4; + stage_output._58 = _58; return stage_output; } diff --git a/reference/opt/shaders-msl/asm/comp/atomic-decrement.asm.comp b/reference/opt/shaders-msl/asm/comp/atomic-decrement.asm.comp index 513f8763..f51c0b3d 100644 --- a/reference/opt/shaders-msl/asm/comp/atomic-decrement.asm.comp +++ b/reference/opt/shaders-msl/asm/comp/atomic-decrement.asm.comp @@ -21,7 +21,7 @@ struct u0_counters kernel void main0(device u0_counters& u0_counter [[buffer(0)]], texture2d u0 [[texture(0)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]]) { - uint _29 = atomic_fetch_sub_explicit((device atomic_uint*)&u0_counter.c, 1, memory_order_relaxed); - u0.write(uint4(uint(int(gl_GlobalInvocationID.x))), spvTexelBufferCoord(as_type(as_type(_29)))); + uint _24 = atomic_fetch_sub_explicit((device atomic_uint*)&u0_counter.c, 1, memory_order_relaxed); + u0.write(uint4(uint(int(gl_GlobalInvocationID.x))), spvTexelBufferCoord(as_type(as_type(_24)))); } diff --git a/reference/opt/shaders-msl/asm/comp/atomic-increment.asm.comp b/reference/opt/shaders-msl/asm/comp/atomic-increment.asm.comp index 55c41374..c2da55f8 100644 --- a/reference/opt/shaders-msl/asm/comp/atomic-increment.asm.comp +++ b/reference/opt/shaders-msl/asm/comp/atomic-increment.asm.comp @@ -21,7 +21,7 @@ struct u0_counters kernel void main0(device u0_counters& u0_counter [[buffer(0)]], texture2d u0 [[texture(0)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]]) { - uint _29 = atomic_fetch_add_explicit((device atomic_uint*)&u0_counter.c, 1, memory_order_relaxed); - u0.write(uint4(uint(int(gl_GlobalInvocationID.x))), spvTexelBufferCoord(as_type(as_type(_29)))); + uint _24 = atomic_fetch_add_explicit((device atomic_uint*)&u0_counter.c, 1, memory_order_relaxed); + u0.write(uint4(uint(int(gl_GlobalInvocationID.x))), spvTexelBufferCoord(as_type(as_type(_24)))); } diff --git a/reference/opt/shaders-msl/asm/comp/buffer-write-relative-addr.asm.comp b/reference/opt/shaders-msl/asm/comp/buffer-write-relative-addr.asm.comp index db0ade34..3935486a 100644 --- a/reference/opt/shaders-msl/asm/comp/buffer-write-relative-addr.asm.comp +++ b/reference/opt/shaders-msl/asm/comp/buffer-write-relative-addr.asm.comp @@ -19,11 +19,11 @@ struct cb5_struct kernel void main0(constant cb5_struct& cb0_5 [[buffer(0)]], texture2d u0 [[texture(0)]], uint3 gl_LocalInvocationID [[thread_position_in_threadgroup]]) { - uint _44 = as_type(as_type(int(gl_LocalInvocationID.x) << 4)) >> 2u; - uint4 _51 = as_type(cb0_5._m0[uint(as_type(as_type(int(gl_LocalInvocationID.x)))) + 1u]); - u0.write(_51.xxxx, spvTexelBufferCoord(_44)); - u0.write(_51.yyyy, spvTexelBufferCoord((_44 + 1u))); - u0.write(_51.zzzz, spvTexelBufferCoord((_44 + 2u))); - u0.write(_51.wwww, spvTexelBufferCoord((_44 + 3u))); + uint _41 = as_type(as_type(int(gl_LocalInvocationID.x) << 4)) >> 2u; + uint4 _50 = as_type(cb0_5._m0[uint(as_type(as_type(int(gl_LocalInvocationID.x)))) + 1u]); + u0.write(_50.xxxx, spvTexelBufferCoord(_41)); + u0.write(_50.yyyy, spvTexelBufferCoord((_41 + 1u))); + u0.write(_50.zzzz, spvTexelBufferCoord((_41 + 2u))); + u0.write(_50.wwww, spvTexelBufferCoord((_41 + 3u))); } diff --git a/reference/opt/shaders-msl/asm/comp/buffer-write.asm.comp b/reference/opt/shaders-msl/asm/comp/buffer-write.asm.comp index 89e8d83e..f464abf5 100644 --- a/reference/opt/shaders-msl/asm/comp/buffer-write.asm.comp +++ b/reference/opt/shaders-msl/asm/comp/buffer-write.asm.comp @@ -17,8 +17,8 @@ struct cb float value; }; -kernel void main0(constant cb& _6 [[buffer(0)]], texture2d _buffer [[texture(0)]], uint3 gl_WorkGroupID [[threadgroup_position_in_grid]], uint gl_LocalInvocationIndex [[thread_index_in_threadgroup]]) +kernel void main0(constant cb& _8 [[buffer(0)]], texture2d _buffer [[texture(0)]], uint3 gl_WorkGroupID [[threadgroup_position_in_grid]], uint gl_LocalInvocationIndex [[thread_index_in_threadgroup]]) { - _buffer.write(float4(_6.value), spvTexelBufferCoord(((32u * gl_WorkGroupID.x) + gl_LocalInvocationIndex))); + _buffer.write(float4(_8.value), spvTexelBufferCoord(((32u * gl_WorkGroupID.x) + gl_LocalInvocationIndex))); } diff --git a/reference/opt/shaders-msl/asm/comp/quantize.asm.comp b/reference/opt/shaders-msl/asm/comp/quantize.asm.comp index 672c2b20..461bf7b8 100644 --- a/reference/opt/shaders-msl/asm/comp/quantize.asm.comp +++ b/reference/opt/shaders-msl/asm/comp/quantize.asm.comp @@ -24,11 +24,11 @@ struct SSBO0 float4 vec4_val; }; -kernel void main0(device SSBO0& _4 [[buffer(0)]]) +kernel void main0(device SSBO0& _12 [[buffer(0)]]) { - _4.scalar = spvQuantizeToF16(_4.scalar); - _4.vec2_val = spvQuantizeToF16(_4.vec2_val); - _4.vec3_val = spvQuantizeToF16(_4.vec3_val); - _4.vec4_val = spvQuantizeToF16(_4.vec4_val); + _12.scalar = spvQuantizeToF16(_12.scalar); + _12.vec2_val = spvQuantizeToF16(_12.vec2_val); + _12.vec3_val = spvQuantizeToF16(_12.vec3_val); + _12.vec4_val = spvQuantizeToF16(_12.vec4_val); } diff --git a/reference/opt/shaders-msl/asm/comp/relaxed-block-layout.asm.comp b/reference/opt/shaders-msl/asm/comp/relaxed-block-layout.asm.comp index 6728a4e2..1464bd8e 100644 --- a/reference/opt/shaders-msl/asm/comp/relaxed-block-layout.asm.comp +++ b/reference/opt/shaders-msl/asm/comp/relaxed-block-layout.asm.comp @@ -12,11 +12,11 @@ struct foo packed_half2 wibble; }; -kernel void main0(device foo& _8 [[buffer(0)]], uint3 gl_LocalInvocationID [[thread_position_in_threadgroup]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]], uint3 gl_WorkGroupID [[threadgroup_position_in_grid]], uint3 gl_NumWorkGroups [[threadgroups_per_grid]]) +kernel void main0(device foo& _10 [[buffer(0)]], uint3 gl_LocalInvocationID [[thread_position_in_threadgroup]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]], uint3 gl_WorkGroupID [[threadgroup_position_in_grid]], uint3 gl_NumWorkGroups [[threadgroups_per_grid]]) { - _8.bar = gl_LocalInvocationID.x; - _8.baz = float3(gl_GlobalInvocationID); - _8.blah = uchar4(uint4(uint4(uchar4(_8.blah)).xyz + gl_WorkGroupID, 0u)); - _8.wibble = half2(float2(half2(_8.wibble)) * float2(gl_NumWorkGroups.xy)); + _10.bar = gl_LocalInvocationID.x; + _10.baz = float3(gl_GlobalInvocationID); + _10.blah = uchar4(uint4(uint4(uchar4(_10.blah)).xyz + gl_WorkGroupID, 0u)); + _10.wibble = half2(float2(half2(_10.wibble)) * float2(gl_NumWorkGroups.xy)); } diff --git a/reference/opt/shaders-msl/asm/comp/specialization-constant-workgroup.asm.comp b/reference/opt/shaders-msl/asm/comp/specialization-constant-workgroup.asm.comp index 1e2880f4..eb13541c 100644 --- a/reference/opt/shaders-msl/asm/comp/specialization-constant-workgroup.asm.comp +++ b/reference/opt/shaders-msl/asm/comp/specialization-constant-workgroup.asm.comp @@ -8,14 +8,14 @@ struct SSBO float a; }; -constant uint _5_tmp [[function_constant(10)]]; -constant uint _5 = is_function_constant_defined(_5_tmp) ? _5_tmp : 9u; -constant uint _6_tmp [[function_constant(12)]]; -constant uint _6 = is_function_constant_defined(_6_tmp) ? _6_tmp : 4u; -constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(_5, 20u, _6); +constant uint _19_tmp [[function_constant(10)]]; +constant uint _19 = is_function_constant_defined(_19_tmp) ? _19_tmp : 9u; +constant uint _21_tmp [[function_constant(12)]]; +constant uint _21 = is_function_constant_defined(_21_tmp) ? _21_tmp : 4u; +constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(_19, 20u, _21); -kernel void main0(device SSBO& _4 [[buffer(0)]]) +kernel void main0(device SSBO& _6 [[buffer(0)]]) { - _4.a += 1.0; + _6.a += 1.0; } diff --git a/reference/opt/shaders-msl/asm/comp/variable-pointers-2.asm.comp b/reference/opt/shaders-msl/asm/comp/variable-pointers-2.asm.comp index a276b400..fd34476a 100644 --- a/reference/opt/shaders-msl/asm/comp/variable-pointers-2.asm.comp +++ b/reference/opt/shaders-msl/asm/comp/variable-pointers-2.asm.comp @@ -20,26 +20,26 @@ kernel void main0(device foo& buf [[buffer(0)]], constant bar& cb [[buffer(1)]], bool _71 = cb.d != 0; device foo* _72 = _71 ? &buf : nullptr; device foo* _67 = _72; - device foo* _45 = _72; + device foo* _65 = _72; thread uint3* _79 = _71 ? &gl_GlobalInvocationID : &gl_LocalInvocationID; thread uint3* _74 = _79; + device int* _49; device int* _52; - device int* _55; - _52 = &_72->a[0u]; - _55 = &buf.a[0u]; - int _57; - int _58; + _49 = &_72->a[0u]; + _52 = &buf.a[0u]; + int _54; + int _55; for (;;) { - _57 = *_52; - _58 = *_55; - if (_57 != _58) + _54 = *_49; + _55 = *_52; + if (_54 != _55) { - int _66 = (_57 + _58) + int((*_79).x); - *_52 = _66; - *_55 = _66; + int _63 = (_54 + _55) + int((*_79).x); + *_49 = _63; + *_52 = _63; + _49 = &_49[1u]; _52 = &_52[1u]; - _55 = &_55[1u]; continue; } else diff --git a/reference/opt/shaders-msl/asm/comp/vector-builtin-type-cast-func.asm.comp b/reference/opt/shaders-msl/asm/comp/vector-builtin-type-cast-func.asm.comp index afbcadd0..84aac2d4 100644 --- a/reference/opt/shaders-msl/asm/comp/vector-builtin-type-cast-func.asm.comp +++ b/reference/opt/shaders-msl/asm/comp/vector-builtin-type-cast-func.asm.comp @@ -12,14 +12,14 @@ constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(16u, 16u, 1u); kernel void main0(constant cb1_struct& cb0_1 [[buffer(0)]], texture2d u0 [[texture(0)]], uint3 gl_LocalInvocationID [[thread_position_in_threadgroup]]) { - int2 _46 = int2(u0.get_width(), u0.get_height()) >> int2(uint2(4u)); + int2 _37 = int2(u0.get_width(), u0.get_height()) >> int2(uint2(4u)); int _98; _98 = 0; - for (; _98 < _46.y; _98++) + for (; _98 < _37.y; _98++) { - for (int _99 = 0; _99 < _46.x; ) + for (int _99 = 0; _99 < _37.x; ) { - u0.write(cb0_1._RESERVED_IDENTIFIER_FIXUP_m0[0].xxxx, uint2(((_46 * int3(gl_LocalInvocationID).xy) + int2(_98, _99)))); + u0.write(cb0_1._RESERVED_IDENTIFIER_FIXUP_m0[0].xxxx, uint2(((_37 * int3(gl_LocalInvocationID).xy) + int2(_98, _99)))); _99++; continue; } diff --git a/reference/opt/shaders-msl/asm/comp/vector-builtin-type-cast.asm.comp b/reference/opt/shaders-msl/asm/comp/vector-builtin-type-cast.asm.comp index e572525e..19999fed 100644 --- a/reference/opt/shaders-msl/asm/comp/vector-builtin-type-cast.asm.comp +++ b/reference/opt/shaders-msl/asm/comp/vector-builtin-type-cast.asm.comp @@ -12,14 +12,14 @@ constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(16u, 16u, 1u); kernel void main0(constant cb1_struct& cb0_1 [[buffer(0)]], texture2d u0 [[texture(0)]], uint3 gl_LocalInvocationID [[thread_position_in_threadgroup]]) { - int2 _40 = int2(u0.get_width(), u0.get_height()) >> int2(uint2(4u)); + int2 _20 = int2(u0.get_width(), u0.get_height()) >> int2(uint2(4u)); int _80; _80 = 0; - for (; _80 < _40.y; _80++) + for (; _80 < _20.y; _80++) { - for (int _81 = 0; _81 < _40.x; ) + for (int _81 = 0; _81 < _20.x; ) { - u0.write(cb0_1._RESERVED_IDENTIFIER_FIXUP_m0[0].xxxx, uint2(((_40 * int3(gl_LocalInvocationID).xy) + int2(_80, _81)))); + u0.write(cb0_1._RESERVED_IDENTIFIER_FIXUP_m0[0].xxxx, uint2(((_20 * int3(gl_LocalInvocationID).xy) + int2(_80, _81)))); _81++; continue; } diff --git a/reference/opt/shaders-msl/asm/frag/descriptor-array-unnamed.asm.frag b/reference/opt/shaders-msl/asm/frag/descriptor-array-unnamed.asm.frag index 58f02ad0..82cefddd 100644 --- a/reference/opt/shaders-msl/asm/frag/descriptor-array-unnamed.asm.frag +++ b/reference/opt/shaders-msl/asm/frag/descriptor-array-unnamed.asm.frag @@ -3,46 +3,46 @@ using namespace metal; -struct _4 +struct _6 { float4 _m0; }; -struct _6 +struct _8 { int _m0; }; -struct _7 +struct _9 { float4 _m0; }; struct main0_out { - float4 m_3 [[color(0)]]; + float4 m_4 [[color(0)]]; }; -fragment main0_out main0(const device _4* _5_0 [[buffer(0)]], const device _4* _5_1 [[buffer(1)]], const device _4* _5_2 [[buffer(2)]], const device _4* _5_3 [[buffer(3)]], constant _6& _20 [[buffer(4)]], constant _7* _8_0 [[buffer(5)]], constant _7* _8_1 [[buffer(6)]], constant _7* _8_2 [[buffer(7)]], constant _7* _8_3 [[buffer(8)]]) +fragment main0_out main0(const device _6* _7_0 [[buffer(0)]], const device _6* _7_1 [[buffer(1)]], const device _6* _7_2 [[buffer(2)]], const device _6* _7_3 [[buffer(3)]], constant _8& _21 [[buffer(4)]], constant _9* _10_0 [[buffer(5)]], constant _9* _10_1 [[buffer(6)]], constant _9* _10_2 [[buffer(7)]], constant _9* _10_3 [[buffer(8)]]) { - const device _4* _5[] = + const device _6* _7[] = { - _5_0, - _5_1, - _5_2, - _5_3, + _7_0, + _7_1, + _7_2, + _7_3, }; - constant _7* _8[] = + constant _9* _10[] = { - _8_0, - _8_1, - _8_2, - _8_3, + _10_0, + _10_1, + _10_2, + _10_3, }; main0_out out = {}; - out.m_3 = fma(_8[_20._m0]->_m0, float4(0.20000000298023223876953125), _5[_20._m0]->_m0); + out.m_4 = fma(_10[_21._m0]->_m0, float4(0.20000000298023223876953125), _7[_21._m0]->_m0); return out; } diff --git a/reference/opt/shaders-msl/asm/frag/extract-packed-from-composite.asm.frag b/reference/opt/shaders-msl/asm/frag/extract-packed-from-composite.asm.frag index 09f8ed8c..cc8e6ac9 100644 --- a/reference/opt/shaders-msl/asm/frag/extract-packed-from-composite.asm.frag +++ b/reference/opt/shaders-msl/asm/frag/extract-packed-from-composite.asm.frag @@ -20,11 +20,11 @@ struct main0_out float4 _entryPointOutput [[color(0)]]; }; -fragment main0_out main0(constant buf& _11 [[buffer(0)]], float4 gl_FragCoord [[position]]) +fragment main0_out main0(constant buf& _15 [[buffer(0)]], float4 gl_FragCoord [[position]]) { main0_out out = {}; - int _68 = int(gl_FragCoord.x) % 16; - out._entryPointOutput = float4(dot(float3(_11.results[_68].a), _11.bar.xyz), _11.results[_68].b, 0.0, 0.0); + int _70 = int(gl_FragCoord.x) % 16; + out._entryPointOutput = float4(dot(float3(_15.results[_70].a), _15.bar.xyz), _15.results[_70].b, 0.0, 0.0); return out; } diff --git a/reference/opt/shaders-msl/asm/frag/implicit-read-dep-phi.asm.frag b/reference/opt/shaders-msl/asm/frag/implicit-read-dep-phi.asm.frag index dd977a99..b72c12f8 100644 --- a/reference/opt/shaders-msl/asm/frag/implicit-read-dep-phi.asm.frag +++ b/reference/opt/shaders-msl/asm/frag/implicit-read-dep-phi.asm.frag @@ -17,22 +17,22 @@ fragment main0_out main0(main0_in in [[stage_in]], texture2d uImage [[tex { main0_out out = {}; float phi; - float4 _36; - int _51; - _51 = 0; + float4 _45; + int _57; + _57 = 0; phi = 1.0; - _36 = float4(1.0, 2.0, 1.0, 2.0); + _45 = float4(1.0, 2.0, 1.0, 2.0); for (;;) { - out.FragColor = _36; - if (_51 < 4) + out.FragColor = _45; + if (_57 < 4) { - if (in.v0[_51] > 0.0) + if (in.v0[_57] > 0.0) { - float2 _48 = float2(phi); - _51++; + float2 _43 = float2(phi); + _57++; phi += 2.0; - _36 = uImage.sample(uImageSmplr, _48, level(0.0)); + _45 = uImage.sample(uImageSmplr, _43, level(0.0)); continue; } else diff --git a/reference/opt/shaders-msl/asm/frag/line-directive.line.asm.frag b/reference/opt/shaders-msl/asm/frag/line-directive.line.asm.frag index 27b7d477..d7fac07c 100644 --- a/reference/opt/shaders-msl/asm/frag/line-directive.line.asm.frag +++ b/reference/opt/shaders-msl/asm/frag/line-directive.line.asm.frag @@ -33,14 +33,14 @@ fragment main0_out main0(main0_in in [[stage_in]]) out.FragColor = 4.0; } #line 19 "test.frag" - for (int _127 = 0; float(_127) < (40.0 + in.vColor); ) + for (int _131 = 0; float(_131) < (40.0 + in.vColor); ) { #line 21 "test.frag" out.FragColor += 0.20000000298023223876953125; #line 22 "test.frag" out.FragColor += 0.300000011920928955078125; #line 19 "test.frag" - _127 += (int(in.vColor) + 5); + _131 += (int(in.vColor) + 5); continue; } #line 25 "test.frag" diff --git a/reference/opt/shaders-msl/asm/frag/locations-components.asm.frag b/reference/opt/shaders-msl/asm/frag/locations-components.asm.frag index 07ab82ac..191adb49 100644 --- a/reference/opt/shaders-msl/asm/frag/locations-components.asm.frag +++ b/reference/opt/shaders-msl/asm/frag/locations-components.asm.frag @@ -10,23 +10,23 @@ struct main0_out struct main0_in { - float2 m_2 [[user(locn1)]]; - float m_3 [[user(locn1_2)]]; - float m_4 [[user(locn2), flat]]; - uint m_5 [[user(locn2_1)]]; - uint m_6 [[user(locn2_2)]]; + float2 m_8 [[user(locn1)]]; + float m_16 [[user(locn1_2)]]; + float m_22 [[user(locn2), flat]]; + uint m_28 [[user(locn2_1)]]; + uint m_33 [[user(locn2_2)]]; }; fragment main0_out main0(main0_in in [[stage_in]]) { main0_out out = {}; float4 v1; - v1 = float4(in.m_2.x, in.m_2.y, v1.z, v1.w); - v1.z = in.m_3; + v1 = float4(in.m_8.x, in.m_8.y, v1.z, v1.w); + v1.z = in.m_16; float4 v2; - v2.x = in.m_4; - v2.y = as_type(in.m_5); - v2.z = as_type(in.m_6); + v2.x = in.m_22; + v2.y = as_type(in.m_28); + v2.z = as_type(in.m_33); out.o0.y = float(as_type(as_type(as_type(v2.y) + as_type(v2.z)))); out.o0.x = v1.y + v2.x; out.o0 = float4(out.o0.x, out.o0.y, v1.z, v1.x); diff --git a/reference/opt/shaders-msl/asm/frag/lut-promotion-initializer.asm.frag b/reference/opt/shaders-msl/asm/frag/lut-promotion-initializer.asm.frag index 72697663..d9851b66 100644 --- a/reference/opt/shaders-msl/asm/frag/lut-promotion-initializer.asm.frag +++ b/reference/opt/shaders-msl/asm/frag/lut-promotion-initializer.asm.frag @@ -44,9 +44,9 @@ struct spvUnsafeArray } }; -constant spvUnsafeArray _46 = spvUnsafeArray({ 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0 }); -constant spvUnsafeArray _76 = spvUnsafeArray({ float4(0.0), float4(1.0), float4(8.0), float4(5.0) }); -constant spvUnsafeArray _90 = spvUnsafeArray({ float4(20.0), float4(30.0), float4(50.0), float4(60.0) }); +constant spvUnsafeArray _16 = spvUnsafeArray({ 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0 }); +constant spvUnsafeArray _60 = spvUnsafeArray({ float4(0.0), float4(1.0), float4(8.0), float4(5.0) }); +constant spvUnsafeArray _104 = spvUnsafeArray({ float4(20.0), float4(30.0), float4(50.0), float4(60.0) }); struct main0_out { @@ -63,32 +63,32 @@ fragment main0_out main0(main0_in in [[stage_in]]) spvUnsafeArray foobar = spvUnsafeArray({ float4(0.0), float4(1.0), float4(8.0), float4(5.0) }); spvUnsafeArray baz = spvUnsafeArray({ float4(0.0), float4(1.0), float4(8.0), float4(5.0) }); main0_out out = {}; - out.FragColor = _46[in.index]; + out.FragColor = _16[in.index]; if (in.index < 10) { - out.FragColor += _46[in.index ^ 1]; + out.FragColor += _16[in.index ^ 1]; } else { - out.FragColor += _46[in.index & 1]; + out.FragColor += _16[in.index & 1]; } - bool _99 = in.index > 30; - if (_99) + bool _63 = in.index > 30; + if (_63) { - out.FragColor += _76[in.index & 3].y; + out.FragColor += _60[in.index & 3].y; } else { - out.FragColor += _76[in.index & 1].x; + out.FragColor += _60[in.index & 1].x; } - if (_99) + if (_63) { foobar[1].z = 20.0; } - int _37 = in.index & 3; - out.FragColor += foobar[_37].z; - baz = _90; - out.FragColor += baz[_37].z; + int _91 = in.index & 3; + out.FragColor += foobar[_91].z; + baz = _104; + out.FragColor += baz[_91].z; return out; } diff --git a/reference/opt/shaders-msl/asm/frag/pull-model-interpolation.asm.msl23.frag b/reference/opt/shaders-msl/asm/frag/pull-model-interpolation.asm.msl23.frag index 6a6b1622..da79768b 100644 --- a/reference/opt/shaders-msl/asm/frag/pull-model-interpolation.asm.msl23.frag +++ b/reference/opt/shaders-msl/asm/frag/pull-model-interpolation.asm.msl23.frag @@ -154,24 +154,24 @@ fragment main0_out main0(main0_in in [[stage_in]], uint gl_SampleID [[sample_id] out.FragColor.x += in.s_w_1.interpolate_at_centroid(); out.FragColor.x += in.s_w_0.interpolate_at_sample(2); out.FragColor.x += in.s_w_1.interpolate_at_offset(float2(-0.100000001490116119384765625, 0.100000001490116119384765625) + 0.4375); - float2 _328 = out.FragColor.xy + in.baz.interpolate_at_sample(gl_SampleID); - out.FragColor = float4(_328.x, _328.y, out.FragColor.z, out.FragColor.w); + float2 _329 = out.FragColor.xy + in.baz.interpolate_at_sample(gl_SampleID); + out.FragColor = float4(_329.x, _329.y, out.FragColor.z, out.FragColor.w); out.FragColor.x += in.baz.interpolate_at_centroid().x; out.FragColor.y += in.baz.interpolate_at_sample(3).y; out.FragColor.z += in.baz.interpolate_at_offset(float2(-0.100000001490116119384765625, 0.100000001490116119384765625) + 0.4375).y; - float2 _353 = out.FragColor.xy + in.a_1.interpolate_at_centroid(); - out.FragColor = float4(_353.x, _353.y, out.FragColor.z, out.FragColor.w); - float2 _360 = out.FragColor.xy + in.a_0.interpolate_at_sample(2); - out.FragColor = float4(_360.x, _360.y, out.FragColor.z, out.FragColor.w); - float2 _367 = out.FragColor.xy + in.a_1.interpolate_at_offset(float2(-0.100000001490116119384765625, 0.100000001490116119384765625) + 0.4375); - out.FragColor = float4(_367.x, _367.y, out.FragColor.z, out.FragColor.w); + float2 _354 = out.FragColor.xy + in.a_1.interpolate_at_centroid(); + out.FragColor = float4(_354.x, _354.y, out.FragColor.z, out.FragColor.w); + float2 _361 = out.FragColor.xy + in.a_0.interpolate_at_sample(2); + out.FragColor = float4(_361.x, _361.y, out.FragColor.z, out.FragColor.w); + float2 _368 = out.FragColor.xy + in.a_1.interpolate_at_offset(float2(-0.100000001490116119384765625, 0.100000001490116119384765625) + 0.4375); + out.FragColor = float4(_368.x, _368.y, out.FragColor.z, out.FragColor.w); out.FragColor += s.z; - float2 _379 = out.FragColor.xy + in.s_z.interpolate_at_centroid().yy; - out.FragColor = float4(_379.x, _379.y, out.FragColor.z, out.FragColor.w); - float2 _387 = out.FragColor.yz + in.s_z.interpolate_at_sample(3).xy; - out.FragColor = float4(out.FragColor.x, _387.x, _387.y, out.FragColor.w); - float2 _395 = out.FragColor.zw + in.s_z.interpolate_at_offset(float2(-0.100000001490116119384765625, 0.100000001490116119384765625) + 0.4375).wx; - out.FragColor = float4(out.FragColor.x, out.FragColor.y, _395.x, _395.y); + float2 _380 = out.FragColor.xy + in.s_z.interpolate_at_centroid().yy; + out.FragColor = float4(_380.x, _380.y, out.FragColor.z, out.FragColor.w); + float2 _388 = out.FragColor.yz + in.s_z.interpolate_at_sample(3).xy; + out.FragColor = float4(out.FragColor.x, _388.x, _388.y, out.FragColor.w); + float2 _396 = out.FragColor.zw + in.s_z.interpolate_at_offset(float2(-0.100000001490116119384765625, 0.100000001490116119384765625) + 0.4375).wx; + out.FragColor = float4(out.FragColor.x, out.FragColor.y, _396.x, _396.y); out.FragColor += s.u[0]; out.FragColor += in.s_u_1.interpolate_at_centroid(); out.FragColor += in.s_u_0.interpolate_at_sample(2); diff --git a/reference/opt/shaders-msl/asm/frag/unreachable.asm.frag b/reference/opt/shaders-msl/asm/frag/unreachable.asm.frag index 918a0b9c..750911f2 100644 --- a/reference/opt/shaders-msl/asm/frag/unreachable.asm.frag +++ b/reference/opt/shaders-msl/asm/frag/unreachable.asm.frag @@ -16,21 +16,21 @@ struct main0_in fragment main0_out main0(main0_in in [[stage_in]]) { main0_out out = {}; - float4 _33; + float4 _46; for (;;) { if (in.counter == 10) { - _33 = float4(10.0); + _46 = float4(10.0); break; } else { - _33 = float4(30.0); + _46 = float4(30.0); break; } } - out.FragColor = _33; + out.FragColor = _46; return out; } diff --git a/reference/opt/shaders-msl/asm/frag/vector-shuffle-oom.asm.frag b/reference/opt/shaders-msl/asm/frag/vector-shuffle-oom.asm.frag index 2031b335..4ac725ae 100644 --- a/reference/opt/shaders-msl/asm/frag/vector-shuffle-oom.asm.frag +++ b/reference/opt/shaders-msl/asm/frag/vector-shuffle-oom.asm.frag @@ -3,19 +3,19 @@ using namespace metal; -struct _28 +struct _15 { float4 _m0; }; -struct _6 +struct _3 { float4 _m0; float _m1; float4 _m2; }; -struct _10 +struct _4 { float3 _m0; packed_float3 _m1; @@ -44,7 +44,7 @@ struct _10 float4 _m24; }; -struct _18 +struct _7 { float4x4 _m0; float4x4 _m1; @@ -90,188 +90,188 @@ struct _18 struct main0_out { - float4 m_5 [[color(0)]]; + float4 m_4317 [[color(0)]]; }; -fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _10& _11 [[buffer(1)]], constant _18& _19 [[buffer(2)]], texture2d _8 [[texture(0)]], texture2d _12 [[texture(1)]], texture2d _14 [[texture(2)]], sampler _9 [[sampler(0)]], sampler _13 [[sampler(1)]], sampler _15 [[sampler(2)]], float4 gl_FragCoord [[position]]) +fragment main0_out main0(constant _3& _22044 [[buffer(0)]], constant _4& _12348 [[buffer(1)]], constant _7& _15259 [[buffer(2)]], texture2d _5785 [[texture(0)]], texture2d _3312 [[texture(1)]], texture2d _4862 [[texture(2)]], sampler _5688 [[sampler(0)]], sampler _4646 [[sampler(1)]], sampler _3594 [[sampler(2)]], float4 gl_FragCoord [[position]]) { main0_out out = {}; - float4 _88 = _7._m2 * _7._m0.xyxy; - float2 _95 = _88.xy; - float2 _96 = _88.zw; - float2 _97 = fast::clamp(fma(gl_FragCoord.xy, _19._m23.xy, float2(0.0, -2.0) * _7._m0.xy), _95, _96); - float3 _109 = float3(_11._m5) * fast::clamp(_8.sample(_9, _97, level(0.0)).w * _7._m1, 0.0, 1.0); - float4 _113 = _12.sample(_13, _97, level(0.0)); - float _114 = _113.y; - float3 _129; - if (_114 > 0.0) + float4 _17581 = _22044._m2 * _22044._m0.xyxy; + float2 _7011 = _17581.xy; + float2 _21058 = _17581.zw; + float2 _13149 = fast::clamp(fma(gl_FragCoord.xy, _15259._m23.xy, float2(0.0, -2.0) * _22044._m0.xy), _7011, _21058); + float3 _12103 = float3(_12348._m5) * fast::clamp(_5785.sample(_5688, _13149, level(0.0)).w * _22044._m1, 0.0, 1.0); + float4 _17670 = _3312.sample(_4646, _13149, level(0.0)); + float _16938 = _17670.y; + float3 _7719; + if (_16938 > 0.0) { - _129 = _109 + (_14.sample(_15, _97, level(0.0)).xyz * fast::clamp(_114 * _113.z, 0.0, 1.0)); + _7719 = _12103 + (_4862.sample(_3594, _13149, level(0.0)).xyz * fast::clamp(_16938 * _17670.z, 0.0, 1.0)); } else { - _129 = _109; + _7719 = _12103; } - float2 _144 = fast::clamp(fma(gl_FragCoord.xy, _19._m23.xy, float2(-1.0) * _7._m0.xy), _95, _96); - float3 _156 = float3(_11._m5) * fast::clamp(_8.sample(_9, _144, level(0.0)).w * _7._m1, 0.0, 1.0); - float4 _160 = _12.sample(_13, _144, level(0.0)); - float _161 = _160.y; - float3 _176; - if (_161 > 0.0) + float2 _13150 = fast::clamp(fma(gl_FragCoord.xy, _15259._m23.xy, float2(-1.0) * _22044._m0.xy), _7011, _21058); + float3 _12104 = float3(_12348._m5) * fast::clamp(_5785.sample(_5688, _13150, level(0.0)).w * _22044._m1, 0.0, 1.0); + float4 _17671 = _3312.sample(_4646, _13150, level(0.0)); + float _16939 = _17671.y; + float3 _7720; + if (_16939 > 0.0) { - _176 = _156 + (_14.sample(_15, _144, level(0.0)).xyz * fast::clamp(_161 * _160.z, 0.0, 1.0)); + _7720 = _12104 + (_4862.sample(_3594, _13150, level(0.0)).xyz * fast::clamp(_16939 * _17671.z, 0.0, 1.0)); } else { - _176 = _156; + _7720 = _12104; } - float2 _191 = fast::clamp(fma(gl_FragCoord.xy, _19._m23.xy, float2(0.0, -1.0) * _7._m0.xy), _95, _96); - float3 _203 = float3(_11._m5) * fast::clamp(_8.sample(_9, _191, level(0.0)).w * _7._m1, 0.0, 1.0); - float4 _207 = _12.sample(_13, _191, level(0.0)); - float _208 = _207.y; - float3 _223; - if (_208 > 0.0) + float2 _13151 = fast::clamp(fma(gl_FragCoord.xy, _15259._m23.xy, float2(0.0, -1.0) * _22044._m0.xy), _7011, _21058); + float3 _12105 = float3(_12348._m5) * fast::clamp(_5785.sample(_5688, _13151, level(0.0)).w * _22044._m1, 0.0, 1.0); + float4 _17672 = _3312.sample(_4646, _13151, level(0.0)); + float _16940 = _17672.y; + float3 _7721; + if (_16940 > 0.0) { - _223 = _203 + (_14.sample(_15, _191, level(0.0)).xyz * fast::clamp(_208 * _207.z, 0.0, 1.0)); + _7721 = _12105 + (_4862.sample(_3594, _13151, level(0.0)).xyz * fast::clamp(_16940 * _17672.z, 0.0, 1.0)); } else { - _223 = _203; + _7721 = _12105; } - float2 _238 = fast::clamp(fma(gl_FragCoord.xy, _19._m23.xy, float2(1.0, -1.0) * _7._m0.xy), _95, _96); - float3 _250 = float3(_11._m5) * fast::clamp(_8.sample(_9, _238, level(0.0)).w * _7._m1, 0.0, 1.0); - float4 _254 = _12.sample(_13, _238, level(0.0)); - float _255 = _254.y; - float3 _270; - if (_255 > 0.0) + float2 _13152 = fast::clamp(fma(gl_FragCoord.xy, _15259._m23.xy, float2(1.0, -1.0) * _22044._m0.xy), _7011, _21058); + float3 _12106 = float3(_12348._m5) * fast::clamp(_5785.sample(_5688, _13152, level(0.0)).w * _22044._m1, 0.0, 1.0); + float4 _17673 = _3312.sample(_4646, _13152, level(0.0)); + float _16941 = _17673.y; + float3 _7722; + if (_16941 > 0.0) { - _270 = _250 + (_14.sample(_15, _238, level(0.0)).xyz * fast::clamp(_255 * _254.z, 0.0, 1.0)); + _7722 = _12106 + (_4862.sample(_3594, _13152, level(0.0)).xyz * fast::clamp(_16941 * _17673.z, 0.0, 1.0)); } else { - _270 = _250; + _7722 = _12106; } - float2 _285 = fast::clamp(fma(gl_FragCoord.xy, _19._m23.xy, float2(-2.0, 0.0) * _7._m0.xy), _95, _96); - float3 _297 = float3(_11._m5) * fast::clamp(_8.sample(_9, _285, level(0.0)).w * _7._m1, 0.0, 1.0); - float4 _301 = _12.sample(_13, _285, level(0.0)); - float _302 = _301.y; - float3 _317; - if (_302 > 0.0) + float2 _13153 = fast::clamp(fma(gl_FragCoord.xy, _15259._m23.xy, float2(-2.0, 0.0) * _22044._m0.xy), _7011, _21058); + float3 _12107 = float3(_12348._m5) * fast::clamp(_5785.sample(_5688, _13153, level(0.0)).w * _22044._m1, 0.0, 1.0); + float4 _17674 = _3312.sample(_4646, _13153, level(0.0)); + float _16942 = _17674.y; + float3 _7723; + if (_16942 > 0.0) { - _317 = _297 + (_14.sample(_15, _285, level(0.0)).xyz * fast::clamp(_302 * _301.z, 0.0, 1.0)); + _7723 = _12107 + (_4862.sample(_3594, _13153, level(0.0)).xyz * fast::clamp(_16942 * _17674.z, 0.0, 1.0)); } else { - _317 = _297; + _7723 = _12107; } - float2 _332 = fast::clamp(fma(gl_FragCoord.xy, _19._m23.xy, float2(-1.0, 0.0) * _7._m0.xy), _95, _96); - float3 _344 = float3(_11._m5) * fast::clamp(_8.sample(_9, _332, level(0.0)).w * _7._m1, 0.0, 1.0); - float4 _348 = _12.sample(_13, _332, level(0.0)); - float _349 = _348.y; - float3 _364; - if (_349 > 0.0) + float2 _13154 = fast::clamp(fma(gl_FragCoord.xy, _15259._m23.xy, float2(-1.0, 0.0) * _22044._m0.xy), _7011, _21058); + float3 _12108 = float3(_12348._m5) * fast::clamp(_5785.sample(_5688, _13154, level(0.0)).w * _22044._m1, 0.0, 1.0); + float4 _17675 = _3312.sample(_4646, _13154, level(0.0)); + float _16943 = _17675.y; + float3 _7724; + if (_16943 > 0.0) { - _364 = _344 + (_14.sample(_15, _332, level(0.0)).xyz * fast::clamp(_349 * _348.z, 0.0, 1.0)); + _7724 = _12108 + (_4862.sample(_3594, _13154, level(0.0)).xyz * fast::clamp(_16943 * _17675.z, 0.0, 1.0)); } else { - _364 = _344; + _7724 = _12108; } - float2 _379 = fast::clamp(gl_FragCoord.xy * _19._m23.xy, _95, _96); - float3 _391 = float3(_11._m5) * fast::clamp(_8.sample(_9, _379, level(0.0)).w * _7._m1, 0.0, 1.0); - float4 _395 = _12.sample(_13, _379, level(0.0)); - float _396 = _395.y; - float3 _411; - if (_396 > 0.0) + float2 _13155 = fast::clamp(gl_FragCoord.xy * _15259._m23.xy, _7011, _21058); + float3 _12109 = float3(_12348._m5) * fast::clamp(_5785.sample(_5688, _13155, level(0.0)).w * _22044._m1, 0.0, 1.0); + float4 _17676 = _3312.sample(_4646, _13155, level(0.0)); + float _16944 = _17676.y; + float3 _7725; + if (_16944 > 0.0) { - _411 = _391 + (_14.sample(_15, _379, level(0.0)).xyz * fast::clamp(_396 * _395.z, 0.0, 1.0)); + _7725 = _12109 + (_4862.sample(_3594, _13155, level(0.0)).xyz * fast::clamp(_16944 * _17676.z, 0.0, 1.0)); } else { - _411 = _391; + _7725 = _12109; } - float2 _426 = fast::clamp(fma(gl_FragCoord.xy, _19._m23.xy, float2(1.0, 0.0) * _7._m0.xy), _95, _96); - float3 _438 = float3(_11._m5) * fast::clamp(_8.sample(_9, _426, level(0.0)).w * _7._m1, 0.0, 1.0); - float4 _442 = _12.sample(_13, _426, level(0.0)); - float _443 = _442.y; - float3 _458; - if (_443 > 0.0) + float2 _13156 = fast::clamp(fma(gl_FragCoord.xy, _15259._m23.xy, float2(1.0, 0.0) * _22044._m0.xy), _7011, _21058); + float3 _12110 = float3(_12348._m5) * fast::clamp(_5785.sample(_5688, _13156, level(0.0)).w * _22044._m1, 0.0, 1.0); + float4 _17677 = _3312.sample(_4646, _13156, level(0.0)); + float _16945 = _17677.y; + float3 _7726; + if (_16945 > 0.0) { - _458 = _438 + (_14.sample(_15, _426, level(0.0)).xyz * fast::clamp(_443 * _442.z, 0.0, 1.0)); + _7726 = _12110 + (_4862.sample(_3594, _13156, level(0.0)).xyz * fast::clamp(_16945 * _17677.z, 0.0, 1.0)); } else { - _458 = _438; + _7726 = _12110; } - float2 _473 = fast::clamp(fma(gl_FragCoord.xy, _19._m23.xy, float2(2.0, 0.0) * _7._m0.xy), _95, _96); - float3 _485 = float3(_11._m5) * fast::clamp(_8.sample(_9, _473, level(0.0)).w * _7._m1, 0.0, 1.0); - float4 _489 = _12.sample(_13, _473, level(0.0)); - float _490 = _489.y; - float3 _505; - if (_490 > 0.0) + float2 _13157 = fast::clamp(fma(gl_FragCoord.xy, _15259._m23.xy, float2(2.0, 0.0) * _22044._m0.xy), _7011, _21058); + float3 _12111 = float3(_12348._m5) * fast::clamp(_5785.sample(_5688, _13157, level(0.0)).w * _22044._m1, 0.0, 1.0); + float4 _17678 = _3312.sample(_4646, _13157, level(0.0)); + float _16946 = _17678.y; + float3 _7727; + if (_16946 > 0.0) { - _505 = _485 + (_14.sample(_15, _473, level(0.0)).xyz * fast::clamp(_490 * _489.z, 0.0, 1.0)); + _7727 = _12111 + (_4862.sample(_3594, _13157, level(0.0)).xyz * fast::clamp(_16946 * _17678.z, 0.0, 1.0)); } else { - _505 = _485; + _7727 = _12111; } - float2 _520 = fast::clamp(fma(gl_FragCoord.xy, _19._m23.xy, float2(-1.0, 1.0) * _7._m0.xy), _95, _96); - float3 _532 = float3(_11._m5) * fast::clamp(_8.sample(_9, _520, level(0.0)).w * _7._m1, 0.0, 1.0); - float4 _536 = _12.sample(_13, _520, level(0.0)); - float _537 = _536.y; - float3 _552; - if (_537 > 0.0) + float2 _13158 = fast::clamp(fma(gl_FragCoord.xy, _15259._m23.xy, float2(-1.0, 1.0) * _22044._m0.xy), _7011, _21058); + float3 _12112 = float3(_12348._m5) * fast::clamp(_5785.sample(_5688, _13158, level(0.0)).w * _22044._m1, 0.0, 1.0); + float4 _17679 = _3312.sample(_4646, _13158, level(0.0)); + float _16947 = _17679.y; + float3 _7728; + if (_16947 > 0.0) { - _552 = _532 + (_14.sample(_15, _520, level(0.0)).xyz * fast::clamp(_537 * _536.z, 0.0, 1.0)); + _7728 = _12112 + (_4862.sample(_3594, _13158, level(0.0)).xyz * fast::clamp(_16947 * _17679.z, 0.0, 1.0)); } else { - _552 = _532; + _7728 = _12112; } - float2 _567 = fast::clamp(fma(gl_FragCoord.xy, _19._m23.xy, float2(0.0, 1.0) * _7._m0.xy), _95, _96); - float3 _579 = float3(_11._m5) * fast::clamp(_8.sample(_9, _567, level(0.0)).w * _7._m1, 0.0, 1.0); - float4 _583 = _12.sample(_13, _567, level(0.0)); - float _584 = _583.y; - float3 _599; - if (_584 > 0.0) + float2 _13159 = fast::clamp(fma(gl_FragCoord.xy, _15259._m23.xy, float2(0.0, 1.0) * _22044._m0.xy), _7011, _21058); + float3 _12113 = float3(_12348._m5) * fast::clamp(_5785.sample(_5688, _13159, level(0.0)).w * _22044._m1, 0.0, 1.0); + float4 _17680 = _3312.sample(_4646, _13159, level(0.0)); + float _16948 = _17680.y; + float3 _7729; + if (_16948 > 0.0) { - _599 = _579 + (_14.sample(_15, _567, level(0.0)).xyz * fast::clamp(_584 * _583.z, 0.0, 1.0)); + _7729 = _12113 + (_4862.sample(_3594, _13159, level(0.0)).xyz * fast::clamp(_16948 * _17680.z, 0.0, 1.0)); } else { - _599 = _579; + _7729 = _12113; } - float2 _614 = fast::clamp(fma(gl_FragCoord.xy, _19._m23.xy, _7._m0.xy), _95, _96); - float3 _626 = float3(_11._m5) * fast::clamp(_8.sample(_9, _614, level(0.0)).w * _7._m1, 0.0, 1.0); - float4 _630 = _12.sample(_13, _614, level(0.0)); - float _631 = _630.y; - float3 _646; - if (_631 > 0.0) + float2 _13160 = fast::clamp(fma(gl_FragCoord.xy, _15259._m23.xy, _22044._m0.xy), _7011, _21058); + float3 _12114 = float3(_12348._m5) * fast::clamp(_5785.sample(_5688, _13160, level(0.0)).w * _22044._m1, 0.0, 1.0); + float4 _17681 = _3312.sample(_4646, _13160, level(0.0)); + float _16949 = _17681.y; + float3 _7730; + if (_16949 > 0.0) { - _646 = _626 + (_14.sample(_15, _614, level(0.0)).xyz * fast::clamp(_631 * _630.z, 0.0, 1.0)); + _7730 = _12114 + (_4862.sample(_3594, _13160, level(0.0)).xyz * fast::clamp(_16949 * _17681.z, 0.0, 1.0)); } else { - _646 = _626; + _7730 = _12114; } - float2 _661 = fast::clamp(fma(gl_FragCoord.xy, _19._m23.xy, float2(0.0, 2.0) * _7._m0.xy), _95, _96); - float3 _673 = float3(_11._m5) * fast::clamp(_8.sample(_9, _661, level(0.0)).w * _7._m1, 0.0, 1.0); - float4 _677 = _12.sample(_13, _661, level(0.0)); - float _678 = _677.y; - float3 _693; - if (_678 > 0.0) + float2 _13161 = fast::clamp(fma(gl_FragCoord.xy, _15259._m23.xy, float2(0.0, 2.0) * _22044._m0.xy), _7011, _21058); + float3 _12115 = float3(_12348._m5) * fast::clamp(_5785.sample(_5688, _13161, level(0.0)).w * _22044._m1, 0.0, 1.0); + float4 _17682 = _3312.sample(_4646, _13161, level(0.0)); + float _16950 = _17682.y; + float3 _7731; + if (_16950 > 0.0) { - _693 = _673 + (_14.sample(_15, _661, level(0.0)).xyz * fast::clamp(_678 * _677.z, 0.0, 1.0)); + _7731 = _12115 + (_4862.sample(_3594, _13161, level(0.0)).xyz * fast::clamp(_16950 * _17682.z, 0.0, 1.0)); } else { - _693 = _673; + _7731 = _12115; } - float3 _702 = (((((((((((((_129 * 0.5).xyz + (_176 * 0.5)).xyz + (_223 * 0.75)).xyz + (_270 * 0.5)).xyz + (_317 * 0.5)).xyz + (_364 * 0.75)).xyz + (_411 * 1.0)).xyz + (_458 * 0.75)).xyz + (_505 * 0.5)).xyz + (_552 * 0.5)).xyz + (_599 * 0.75)).xyz + (_646 * 0.5)).xyz + (_693 * 0.5)).xyz * float3(0.125); - _28 _750 = _28{ float4(_702.x, _702.y, _702.z, float4(0.0).w) }; - _750._m0.w = 1.0; - out.m_5 = _750._m0; + float3 _13750 = (((((((((((((_7719 * 0.5).xyz + (_7720 * 0.5)).xyz + (_7721 * 0.75)).xyz + (_7722 * 0.5)).xyz + (_7723 * 0.5)).xyz + (_7724 * 0.75)).xyz + (_7725 * 1.0)).xyz + (_7726 * 0.75)).xyz + (_7727 * 0.5)).xyz + (_7728 * 0.5)).xyz + (_7729 * 0.75)).xyz + (_7730 * 0.5)).xyz + (_7731 * 0.5)).xyz * float3(0.125); + _15 _25050 = _15{ float4(_13750.x, _13750.y, _13750.z, float4(0.0).w) }; + _25050._m0.w = 1.0; + out.m_4317 = _25050._m0; return out; } diff --git a/reference/opt/shaders-msl/asm/vert/packed-bool-to-uint.asm.vert b/reference/opt/shaders-msl/asm/vert/packed-bool-to-uint.asm.vert index 1926ff9e..a0f383c9 100644 --- a/reference/opt/shaders-msl/asm/vert/packed-bool-to-uint.asm.vert +++ b/reference/opt/shaders-msl/asm/vert/packed-bool-to-uint.asm.vert @@ -25,11 +25,11 @@ struct main0_in float4 a_position [[attribute(0)]]; }; -vertex main0_out main0(main0_in in [[stage_in]], constant defaultUniformsVS& _9 [[buffer(0)]], uint gl_VertexIndex [[vertex_id]]) +vertex main0_out main0(main0_in in [[stage_in]], constant defaultUniformsVS& _11 [[buffer(0)]], uint gl_VertexIndex [[vertex_id]]) { main0_out out = {}; - out.gl_Position = _9.umatrix * float4(_9.uquad[int(gl_VertexIndex)].x, _9.uquad[int(gl_VertexIndex)].y, in.a_position.z, in.a_position.w); - if (_9.flags.flags[0] != 0u) + out.gl_Position = _11.umatrix * float4(_11.uquad[int(gl_VertexIndex)].x, _11.uquad[int(gl_VertexIndex)].y, in.a_position.z, in.a_position.w); + if (_11.flags.flags[0] != 0u) { out.gl_Position.z = 0.0; } diff --git a/reference/opt/shaders-msl/asm/vert/packed-bool2-to-packed_uint2.asm.vert b/reference/opt/shaders-msl/asm/vert/packed-bool2-to-packed_uint2.asm.vert index ee206385..4d137ebf 100644 --- a/reference/opt/shaders-msl/asm/vert/packed-bool2-to-packed_uint2.asm.vert +++ b/reference/opt/shaders-msl/asm/vert/packed-bool2-to-packed_uint2.asm.vert @@ -25,11 +25,11 @@ struct main0_in float4 a_position [[attribute(0)]]; }; -vertex main0_out main0(main0_in in [[stage_in]], constant defaultUniformsVS& _9 [[buffer(0)]], uint gl_VertexIndex [[vertex_id]]) +vertex main0_out main0(main0_in in [[stage_in]], constant defaultUniformsVS& _11 [[buffer(0)]], uint gl_VertexIndex [[vertex_id]]) { main0_out out = {}; - out.gl_Position = _9.umatrix * float4(_9.uquad[int(gl_VertexIndex)].x, _9.uquad[int(gl_VertexIndex)].y, in.a_position.z, in.a_position.w); - if (_9.flags.flags[0].x != 0u) + out.gl_Position = _11.umatrix * float4(_11.uquad[int(gl_VertexIndex)].x, _11.uquad[int(gl_VertexIndex)].y, in.a_position.z, in.a_position.w); + if (_11.flags.flags[0].x != 0u) { out.gl_Position.z = 0.0; } diff --git a/reference/opt/shaders-msl/asm/vert/spec-constant-op-composite.asm.vert b/reference/opt/shaders-msl/asm/vert/spec-constant-op-composite.asm.vert index 196057a7..c48a426e 100644 --- a/reference/opt/shaders-msl/asm/vert/spec-constant-op-composite.asm.vert +++ b/reference/opt/shaders-msl/asm/vert/spec-constant-op-composite.asm.vert @@ -3,20 +3,20 @@ using namespace metal; -constant int _7_tmp [[function_constant(201)]]; -constant int _7 = is_function_constant_defined(_7_tmp) ? _7_tmp : -10; -constant int _20 = (_7 + 2); -constant uint _8_tmp [[function_constant(202)]]; -constant uint _8 = is_function_constant_defined(_8_tmp) ? _8_tmp : 100u; -constant uint _25 = (_8 % 5u); -constant int _30 = _7 - (-3) * (_7 / (-3)); -constant int4 _32 = int4(20, 30, _20, _30); -constant int2 _34 = int2(_32.y, _32.x); -constant int _35 = _32.y; +constant int _13_tmp [[function_constant(201)]]; +constant int _13 = is_function_constant_defined(_13_tmp) ? _13_tmp : -10; +constant int _15 = (_13 + 2); +constant uint _24_tmp [[function_constant(202)]]; +constant uint _24 = is_function_constant_defined(_24_tmp) ? _24_tmp : 100u; +constant uint _26 = (_24 % 5u); +constant int _61 = _13 - (-3) * (_13 / (-3)); +constant int4 _36 = int4(20, 30, _15, _61); +constant int2 _41 = int2(_36.y, _36.x); +constant int _62 = _36.y; struct main0_out { - int m_4 [[user(locn0)]]; + int m_58 [[user(locn0)]]; float4 gl_Position [[position]]; }; @@ -24,12 +24,12 @@ vertex main0_out main0() { main0_out out = {}; float4 _66 = float4(0.0); - _66.y = float(_20); - _66.z = float(_25); - float4 _55 = _66 + float4(_32); - float2 _59 = _55.xy + float2(_34); - out.gl_Position = float4(_59.x, _59.y, _55.z, _55.w); - out.m_4 = _35; + _66.y = float(_15); + _66.z = float(_26); + float4 _39 = _66 + float4(_36); + float2 _46 = _39.xy + float2(_41); + out.gl_Position = float4(_46.x, _46.y, _39.z, _39.w); + out.m_58 = _62; return out; } diff --git a/reference/opt/shaders-msl/vulkan/frag/demote-to-helper-forwarding.asm.vk.nocompat.msl23.frag b/reference/opt/shaders-msl/vulkan/frag/demote-to-helper-forwarding.asm.vk.nocompat.msl23.frag index 274cea2d..05d5eb4a 100644 --- a/reference/opt/shaders-msl/vulkan/frag/demote-to-helper-forwarding.asm.vk.nocompat.msl23.frag +++ b/reference/opt/shaders-msl/vulkan/frag/demote-to-helper-forwarding.asm.vk.nocompat.msl23.frag @@ -13,9 +13,9 @@ fragment main0_out main0() main0_out out = {}; bool gl_HelperInvocation = {}; gl_HelperInvocation = simd_is_helper_thread(); - bool _15 = gl_HelperInvocation; + bool _9 = gl_HelperInvocation; gl_HelperInvocation = true, discard_fragment(); - if (!_15) + if (!_9) { out.FragColor = float4(1.0, 0.0, 0.0, 1.0); } diff --git a/reference/opt/shaders-ue4/asm/tesc/hs-incorrect-base-type.invalid.asm.tesc b/reference/opt/shaders-ue4/asm/tesc/hs-incorrect-base-type.invalid.asm.tesc index 84540d35..7741719b 100644 --- a/reference/opt/shaders-ue4/asm/tesc/hs-incorrect-base-type.invalid.asm.tesc +++ b/reference/opt/shaders-ue4/asm/tesc/hs-incorrect-base-type.invalid.asm.tesc @@ -263,7 +263,7 @@ struct type_StructuredBuffer_v4float float4 _m0[1]; }; -constant float4 _142 = {}; +constant float4 _140 = {}; struct main0_out { @@ -308,26 +308,26 @@ kernel void main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0) threadgroup_barrier(mem_flags::mem_threadgroup); if (gl_InvocationID >= 3) return; - spvUnsafeArray _144 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD10_centroid, gl_in[3].in_var_TEXCOORD10_centroid, gl_in[4].in_var_TEXCOORD10_centroid, gl_in[5].in_var_TEXCOORD10_centroid, gl_in[6].in_var_TEXCOORD10_centroid, gl_in[7].in_var_TEXCOORD10_centroid, gl_in[8].in_var_TEXCOORD10_centroid, gl_in[9].in_var_TEXCOORD10_centroid, gl_in[10].in_var_TEXCOORD10_centroid, gl_in[11].in_var_TEXCOORD10_centroid }); - spvUnsafeArray _145 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD11_centroid, gl_in[1].in_var_TEXCOORD11_centroid, gl_in[2].in_var_TEXCOORD11_centroid, gl_in[3].in_var_TEXCOORD11_centroid, gl_in[4].in_var_TEXCOORD11_centroid, gl_in[5].in_var_TEXCOORD11_centroid, gl_in[6].in_var_TEXCOORD11_centroid, gl_in[7].in_var_TEXCOORD11_centroid, gl_in[8].in_var_TEXCOORD11_centroid, gl_in[9].in_var_TEXCOORD11_centroid, gl_in[10].in_var_TEXCOORD11_centroid, gl_in[11].in_var_TEXCOORD11_centroid }); - spvUnsafeArray _146 = spvUnsafeArray({ gl_in[0].in_var_COLOR0, gl_in[1].in_var_COLOR0, gl_in[2].in_var_COLOR0, gl_in[3].in_var_COLOR0, gl_in[4].in_var_COLOR0, gl_in[5].in_var_COLOR0, gl_in[6].in_var_COLOR0, gl_in[7].in_var_COLOR0, gl_in[8].in_var_COLOR0, gl_in[9].in_var_COLOR0, gl_in[10].in_var_COLOR0, gl_in[11].in_var_COLOR0 }); - spvUnsafeArray, 12> _147 = spvUnsafeArray, 12>({ spvUnsafeArray({ gl_in[0].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[1].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[2].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[3].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[4].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[5].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[6].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[7].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[8].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[9].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[10].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[11].in_var_TEXCOORD0_0 }) }); - spvUnsafeArray _148 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD4, gl_in[1].in_var_TEXCOORD4, gl_in[2].in_var_TEXCOORD4, gl_in[3].in_var_TEXCOORD4, gl_in[4].in_var_TEXCOORD4, gl_in[5].in_var_TEXCOORD4, gl_in[6].in_var_TEXCOORD4, gl_in[7].in_var_TEXCOORD4, gl_in[8].in_var_TEXCOORD4, gl_in[9].in_var_TEXCOORD4, gl_in[10].in_var_TEXCOORD4, gl_in[11].in_var_TEXCOORD4 }); - spvUnsafeArray _149 = spvUnsafeArray({ gl_in[0].in_var_PRIMITIVE_ID, gl_in[1].in_var_PRIMITIVE_ID, gl_in[2].in_var_PRIMITIVE_ID, gl_in[3].in_var_PRIMITIVE_ID, gl_in[4].in_var_PRIMITIVE_ID, gl_in[5].in_var_PRIMITIVE_ID, gl_in[6].in_var_PRIMITIVE_ID, gl_in[7].in_var_PRIMITIVE_ID, gl_in[8].in_var_PRIMITIVE_ID, gl_in[9].in_var_PRIMITIVE_ID, gl_in[10].in_var_PRIMITIVE_ID, gl_in[11].in_var_PRIMITIVE_ID }); - spvUnsafeArray _150 = spvUnsafeArray({ gl_in[0].in_var_LIGHTMAP_ID, gl_in[1].in_var_LIGHTMAP_ID, gl_in[2].in_var_LIGHTMAP_ID, gl_in[3].in_var_LIGHTMAP_ID, gl_in[4].in_var_LIGHTMAP_ID, gl_in[5].in_var_LIGHTMAP_ID, gl_in[6].in_var_LIGHTMAP_ID, gl_in[7].in_var_LIGHTMAP_ID, gl_in[8].in_var_LIGHTMAP_ID, gl_in[9].in_var_LIGHTMAP_ID, gl_in[10].in_var_LIGHTMAP_ID, gl_in[11].in_var_LIGHTMAP_ID }); - spvUnsafeArray _259 = spvUnsafeArray({ gl_in[0].in_var_VS_To_DS_Position, gl_in[1].in_var_VS_To_DS_Position, gl_in[2].in_var_VS_To_DS_Position, gl_in[3].in_var_VS_To_DS_Position, gl_in[4].in_var_VS_To_DS_Position, gl_in[5].in_var_VS_To_DS_Position, gl_in[6].in_var_VS_To_DS_Position, gl_in[7].in_var_VS_To_DS_Position, gl_in[8].in_var_VS_To_DS_Position, gl_in[9].in_var_VS_To_DS_Position, gl_in[10].in_var_VS_To_DS_Position, gl_in[11].in_var_VS_To_DS_Position }); - spvUnsafeArray _284 = spvUnsafeArray({ FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[0], _145[0], _146[0], _147[0], _148[0], _149[0], _150[0] } }, FBasePassInterpolantsVSToDS{ { } }, _259[0] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[1], _145[1], _146[1], _147[1], _148[1], _149[1], _150[1] } }, FBasePassInterpolantsVSToDS{ { } }, _259[1] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[2], _145[2], _146[2], _147[2], _148[2], _149[2], _150[2] } }, FBasePassInterpolantsVSToDS{ { } }, _259[2] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[3], _145[3], _146[3], _147[3], _148[3], _149[3], _150[3] } }, FBasePassInterpolantsVSToDS{ { } }, _259[3] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[4], _145[4], _146[4], _147[4], _148[4], _149[4], _150[4] } }, FBasePassInterpolantsVSToDS{ { } }, _259[4] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[5], _145[5], _146[5], _147[5], _148[5], _149[5], _150[5] } }, FBasePassInterpolantsVSToDS{ { } }, _259[5] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[6], _145[6], _146[6], _147[6], _148[6], _149[6], _150[6] } }, FBasePassInterpolantsVSToDS{ { } }, _259[6] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[7], _145[7], _146[7], _147[7], _148[7], _149[7], _150[7] } }, FBasePassInterpolantsVSToDS{ { } }, _259[7] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[8], _145[8], _146[8], _147[8], _148[8], _149[8], _150[8] } }, FBasePassInterpolantsVSToDS{ { } }, _259[8] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[9], _145[9], _146[9], _147[9], _148[9], _149[9], _150[9] } }, FBasePassInterpolantsVSToDS{ { } }, _259[9] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[10], _145[10], _146[10], _147[10], _148[10], _149[10], _150[10] } }, FBasePassInterpolantsVSToDS{ { } }, _259[10] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[11], _145[11], _146[11], _147[11], _148[11], _149[11], _150[11] } }, FBasePassInterpolantsVSToDS{ { } }, _259[11] } }); - spvUnsafeArray param_var_I = _284; - float4 _301 = float4(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); - float3 _310 = View_PrimitiveSceneData._m0[(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.PrimitiveId * 26u) + 22u].xyz * float3x3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz, cross(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz) * float3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.w), param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz); - uint _313 = (gl_InvocationID < 2u) ? (gl_InvocationID + 1u) : 0u; - uint _314 = 2u * gl_InvocationID; - uint _315 = 3u + _314; - uint _316 = _314 + 4u; - 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 _142 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD10_centroid, gl_in[3].in_var_TEXCOORD10_centroid, gl_in[4].in_var_TEXCOORD10_centroid, gl_in[5].in_var_TEXCOORD10_centroid, gl_in[6].in_var_TEXCOORD10_centroid, gl_in[7].in_var_TEXCOORD10_centroid, gl_in[8].in_var_TEXCOORD10_centroid, gl_in[9].in_var_TEXCOORD10_centroid, gl_in[10].in_var_TEXCOORD10_centroid, gl_in[11].in_var_TEXCOORD10_centroid }); + spvUnsafeArray _143 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD11_centroid, gl_in[1].in_var_TEXCOORD11_centroid, gl_in[2].in_var_TEXCOORD11_centroid, gl_in[3].in_var_TEXCOORD11_centroid, gl_in[4].in_var_TEXCOORD11_centroid, gl_in[5].in_var_TEXCOORD11_centroid, gl_in[6].in_var_TEXCOORD11_centroid, gl_in[7].in_var_TEXCOORD11_centroid, gl_in[8].in_var_TEXCOORD11_centroid, gl_in[9].in_var_TEXCOORD11_centroid, gl_in[10].in_var_TEXCOORD11_centroid, gl_in[11].in_var_TEXCOORD11_centroid }); + spvUnsafeArray _144 = spvUnsafeArray({ gl_in[0].in_var_COLOR0, gl_in[1].in_var_COLOR0, gl_in[2].in_var_COLOR0, gl_in[3].in_var_COLOR0, gl_in[4].in_var_COLOR0, gl_in[5].in_var_COLOR0, gl_in[6].in_var_COLOR0, gl_in[7].in_var_COLOR0, gl_in[8].in_var_COLOR0, gl_in[9].in_var_COLOR0, gl_in[10].in_var_COLOR0, gl_in[11].in_var_COLOR0 }); + spvUnsafeArray, 12> _145 = spvUnsafeArray, 12>({ spvUnsafeArray({ gl_in[0].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[1].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[2].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[3].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[4].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[5].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[6].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[7].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[8].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[9].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[10].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[11].in_var_TEXCOORD0_0 }) }); + spvUnsafeArray _146 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD4, gl_in[1].in_var_TEXCOORD4, gl_in[2].in_var_TEXCOORD4, gl_in[3].in_var_TEXCOORD4, gl_in[4].in_var_TEXCOORD4, gl_in[5].in_var_TEXCOORD4, gl_in[6].in_var_TEXCOORD4, gl_in[7].in_var_TEXCOORD4, gl_in[8].in_var_TEXCOORD4, gl_in[9].in_var_TEXCOORD4, gl_in[10].in_var_TEXCOORD4, gl_in[11].in_var_TEXCOORD4 }); + spvUnsafeArray _147 = spvUnsafeArray({ gl_in[0].in_var_PRIMITIVE_ID, gl_in[1].in_var_PRIMITIVE_ID, gl_in[2].in_var_PRIMITIVE_ID, gl_in[3].in_var_PRIMITIVE_ID, gl_in[4].in_var_PRIMITIVE_ID, gl_in[5].in_var_PRIMITIVE_ID, gl_in[6].in_var_PRIMITIVE_ID, gl_in[7].in_var_PRIMITIVE_ID, gl_in[8].in_var_PRIMITIVE_ID, gl_in[9].in_var_PRIMITIVE_ID, gl_in[10].in_var_PRIMITIVE_ID, gl_in[11].in_var_PRIMITIVE_ID }); + spvUnsafeArray _148 = spvUnsafeArray({ gl_in[0].in_var_LIGHTMAP_ID, gl_in[1].in_var_LIGHTMAP_ID, gl_in[2].in_var_LIGHTMAP_ID, gl_in[3].in_var_LIGHTMAP_ID, gl_in[4].in_var_LIGHTMAP_ID, gl_in[5].in_var_LIGHTMAP_ID, gl_in[6].in_var_LIGHTMAP_ID, gl_in[7].in_var_LIGHTMAP_ID, gl_in[8].in_var_LIGHTMAP_ID, gl_in[9].in_var_LIGHTMAP_ID, gl_in[10].in_var_LIGHTMAP_ID, gl_in[11].in_var_LIGHTMAP_ID }); + spvUnsafeArray _257 = spvUnsafeArray({ gl_in[0].in_var_VS_To_DS_Position, gl_in[1].in_var_VS_To_DS_Position, gl_in[2].in_var_VS_To_DS_Position, gl_in[3].in_var_VS_To_DS_Position, gl_in[4].in_var_VS_To_DS_Position, gl_in[5].in_var_VS_To_DS_Position, gl_in[6].in_var_VS_To_DS_Position, gl_in[7].in_var_VS_To_DS_Position, gl_in[8].in_var_VS_To_DS_Position, gl_in[9].in_var_VS_To_DS_Position, gl_in[10].in_var_VS_To_DS_Position, gl_in[11].in_var_VS_To_DS_Position }); + spvUnsafeArray _282 = spvUnsafeArray({ FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[0], _143[0], _144[0], _145[0], _146[0], _147[0], _148[0] } }, FBasePassInterpolantsVSToDS{ { } }, _257[0] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[1], _143[1], _144[1], _145[1], _146[1], _147[1], _148[1] } }, FBasePassInterpolantsVSToDS{ { } }, _257[1] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[2], _143[2], _144[2], _145[2], _146[2], _147[2], _148[2] } }, FBasePassInterpolantsVSToDS{ { } }, _257[2] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[3], _143[3], _144[3], _145[3], _146[3], _147[3], _148[3] } }, FBasePassInterpolantsVSToDS{ { } }, _257[3] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[4], _143[4], _144[4], _145[4], _146[4], _147[4], _148[4] } }, FBasePassInterpolantsVSToDS{ { } }, _257[4] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[5], _143[5], _144[5], _145[5], _146[5], _147[5], _148[5] } }, FBasePassInterpolantsVSToDS{ { } }, _257[5] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[6], _143[6], _144[6], _145[6], _146[6], _147[6], _148[6] } }, FBasePassInterpolantsVSToDS{ { } }, _257[6] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[7], _143[7], _144[7], _145[7], _146[7], _147[7], _148[7] } }, FBasePassInterpolantsVSToDS{ { } }, _257[7] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[8], _143[8], _144[8], _145[8], _146[8], _147[8], _148[8] } }, FBasePassInterpolantsVSToDS{ { } }, _257[8] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[9], _143[9], _144[9], _145[9], _146[9], _147[9], _148[9] } }, FBasePassInterpolantsVSToDS{ { } }, _257[9] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[10], _143[10], _144[10], _145[10], _146[10], _147[10], _148[10] } }, FBasePassInterpolantsVSToDS{ { } }, _257[10] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[11], _143[11], _144[11], _145[11], _146[11], _147[11], _148[11] } }, FBasePassInterpolantsVSToDS{ { } }, _257[11] } }); + spvUnsafeArray param_var_I = _282; + float4 _299 = float4(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float3 _308 = View_PrimitiveSceneData._m0[(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.PrimitiveId * 26u) + 22u].xyz * float3x3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz, cross(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz) * float3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.w), param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz); + uint _311 = (gl_InvocationID < 2u) ? (gl_InvocationID + 1u) : 0u; + uint _312 = 2u * gl_InvocationID; + uint _313 = 3u + _312; + uint _314 = _312 + 4u; + float4 _326 = float4(param_var_I[_311].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float4 _334 = float4(param_var_I[_313].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float4 _342 = float4(param_var_I[_314].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + spvUnsafeArray _390 = spvUnsafeArray({ param_var_I[gl_InvocationID].Position, (((((float4(2.0) * param_var_I[gl_InvocationID].Position) + param_var_I[_311].Position) - (float4(dot(param_var_I[_311].Position - param_var_I[gl_InvocationID].Position, _299)) * _299)) * float4(0.3333333432674407958984375)) + ((((float4(2.0) * param_var_I[_313].Position) + param_var_I[_314].Position) - (float4(dot(param_var_I[_314].Position - param_var_I[_313].Position, _334)) * _334)) * float4(0.3333333432674407958984375))) * float4(0.5), (((((float4(2.0) * param_var_I[_311].Position) + param_var_I[gl_InvocationID].Position) - (float4(dot(param_var_I[gl_InvocationID].Position - param_var_I[_311].Position, _326)) * _326)) * float4(0.3333333432674407958984375)) + ((((float4(2.0) * param_var_I[_314].Position) + param_var_I[_313].Position) - (float4(dot(param_var_I[_313].Position - param_var_I[_314].Position, _342)) * _342)) * float4(0.3333333432674407958984375))) * float4(0.5) }); 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; @@ -336,60 +336,60 @@ kernel void main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0) gl_out[gl_InvocationID].out_var_PRIMITIVE_ID = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.PrimitiveId; gl_out[gl_InvocationID].out_var_LIGHTMAP_ID = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.LightmapDataIndex; gl_out[gl_InvocationID].out_var_VS_To_DS_Position = param_var_I[gl_InvocationID].Position; - gl_out[gl_InvocationID].out_var_PN_POSITION = _392; - gl_out[gl_InvocationID].out_var_PN_DisplacementScales = _310; + gl_out[gl_InvocationID].out_var_PN_POSITION = _390; + gl_out[gl_InvocationID].out_var_PN_DisplacementScales = _308; gl_out[gl_InvocationID].out_var_PN_TessellationMultiplier = 1.0; gl_out[gl_InvocationID].out_var_PN_WorldDisplacementMultiplier = 1.0; - temp_var_hullMainRetVal[gl_InvocationID] = FPNTessellationHSToDS{ param_var_I[gl_InvocationID], _392, _310, 1.0, 1.0 }; + temp_var_hullMainRetVal[gl_InvocationID] = FPNTessellationHSToDS{ param_var_I[gl_InvocationID], _390, _308, 1.0, 1.0 }; threadgroup_barrier(mem_flags::mem_device | mem_flags::mem_threadgroup); 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; - _463.x = 0.5 * (temp_var_hullMainRetVal[1u].TessellationMultiplier + temp_var_hullMainRetVal[2u].TessellationMultiplier); - _463.y = 0.5 * (temp_var_hullMainRetVal[2u].TessellationMultiplier + temp_var_hullMainRetVal[0u].TessellationMultiplier); - _463.z = 0.5 * (temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier); - _463.w = 0.333000004291534423828125 * ((temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier) + temp_var_hullMainRetVal[2u].TessellationMultiplier); - float4 _589; + float4 _448 = (((((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 _461; + _461.x = 0.5 * (temp_var_hullMainRetVal[1u].TessellationMultiplier + temp_var_hullMainRetVal[2u].TessellationMultiplier); + _461.y = 0.5 * (temp_var_hullMainRetVal[2u].TessellationMultiplier + temp_var_hullMainRetVal[0u].TessellationMultiplier); + _461.z = 0.5 * (temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier); + _461.w = 0.333000004291534423828125 * ((temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier) + temp_var_hullMainRetVal[2u].TessellationMultiplier); + float4 _587; for (;;) { - float4 _489 = View.View_ViewToClip * float4(0.0); - float4 _494 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[0u].WorldPosition[0].xyz, 1.0); - float3 _495 = _494.xyz; - float3 _496 = _489.xyz; - float _498 = _494.w; - float _499 = _489.w; - float4 _516 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[1u].WorldPosition[0].xyz, 1.0); - float3 _517 = _516.xyz; - float _519 = _516.w; - float4 _537 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[2u].WorldPosition[0].xyz, 1.0); - float3 _538 = _537.xyz; - float _540 = _537.w; - if (any((((int3((_495 - _496) < float3(_498 + _499)) + (int3(2) * int3((_495 + _496) > float3((-_498) - _499)))) | (int3((_517 - _496) < float3(_519 + _499)) + (int3(2) * int3((_517 + _496) > float3((-_519) - _499))))) | (int3((_538 - _496) < float3(_540 + _499)) + (int3(2) * int3((_538 + _496) > float3((-_540) - _499))))) != int3(3))) + float4 _487 = View.View_ViewToClip * float4(0.0); + float4 _492 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[0u].WorldPosition[0].xyz, 1.0); + float3 _493 = _492.xyz; + float3 _494 = _487.xyz; + float _496 = _492.w; + float _497 = _487.w; + float4 _514 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[1u].WorldPosition[0].xyz, 1.0); + float3 _515 = _514.xyz; + float _517 = _514.w; + float4 _535 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[2u].WorldPosition[0].xyz, 1.0); + float3 _536 = _535.xyz; + float _538 = _535.w; + if (any((((int3((_493 - _494) < float3(_496 + _497)) + (int3(2) * int3((_493 + _494) > float3((-_496) - _497)))) | (int3((_515 - _494) < float3(_517 + _497)) + (int3(2) * int3((_515 + _494) > float3((-_517) - _497))))) | (int3((_536 - _494) < float3(_538 + _497)) + (int3(2) * int3((_536 + _494) > float3((-_538) - _497))))) != int3(3))) { - _589 = float4(0.0); + _587 = float4(0.0); break; } - float3 _558 = temp_var_hullMainRetVal[0u].WorldPosition[0].xyz - temp_var_hullMainRetVal[1u].WorldPosition[0].xyz; - float3 _559 = temp_var_hullMainRetVal[1u].WorldPosition[0].xyz - temp_var_hullMainRetVal[2u].WorldPosition[0].xyz; - float3 _560 = temp_var_hullMainRetVal[2u].WorldPosition[0].xyz - temp_var_hullMainRetVal[0u].WorldPosition[0].xyz; - float3 _563 = (float3(0.5) * (temp_var_hullMainRetVal[0u].WorldPosition[0].xyz + temp_var_hullMainRetVal[1u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); - float3 _566 = (float3(0.5) * (temp_var_hullMainRetVal[1u].WorldPosition[0].xyz + temp_var_hullMainRetVal[2u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); - float3 _569 = (float3(0.5) * (temp_var_hullMainRetVal[2u].WorldPosition[0].xyz + temp_var_hullMainRetVal[0u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); - float _573 = sqrt(dot(_559, _559) / dot(_566, _566)); - float _577 = sqrt(dot(_560, _560) / dot(_569, _569)); - float _581 = sqrt(dot(_558, _558) / dot(_563, _563)); - float4 _582 = float4(_573, _577, _581, 1.0); - _582.w = 0.333000004291534423828125 * ((_573 + _577) + _581); - _589 = float4(View.View_AdaptiveTessellationFactor) * _582; + float3 _556 = temp_var_hullMainRetVal[0u].WorldPosition[0].xyz - temp_var_hullMainRetVal[1u].WorldPosition[0].xyz; + float3 _557 = temp_var_hullMainRetVal[1u].WorldPosition[0].xyz - temp_var_hullMainRetVal[2u].WorldPosition[0].xyz; + float3 _558 = temp_var_hullMainRetVal[2u].WorldPosition[0].xyz - temp_var_hullMainRetVal[0u].WorldPosition[0].xyz; + float3 _561 = (float3(0.5) * (temp_var_hullMainRetVal[0u].WorldPosition[0].xyz + temp_var_hullMainRetVal[1u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float3 _564 = (float3(0.5) * (temp_var_hullMainRetVal[1u].WorldPosition[0].xyz + temp_var_hullMainRetVal[2u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float3 _567 = (float3(0.5) * (temp_var_hullMainRetVal[2u].WorldPosition[0].xyz + temp_var_hullMainRetVal[0u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float _571 = sqrt(dot(_557, _557) / dot(_564, _564)); + float _575 = sqrt(dot(_558, _558) / dot(_567, _567)); + float _579 = sqrt(dot(_556, _556) / dot(_561, _561)); + float4 _580 = float4(_571, _575, _579, 1.0); + _580.w = 0.333000004291534423828125 * ((_571 + _575) + _579); + _587 = float4(View.View_AdaptiveTessellationFactor) * _580; break; } - float4 _591 = fast::clamp(_463 * _589, float4(1.0), float4(15.0)); - spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[0u] = half(_591.x); - spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[1u] = half(_591.y); - spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[2u] = half(_591.z); - spvTessLevel[gl_PrimitiveID].insideTessellationFactor = half(_591.w); - patchOut.out_var_PN_POSITION9 = _450 + ((_450 - (((temp_var_hullMainRetVal[2u].WorldPosition[0] + temp_var_hullMainRetVal[1u].WorldPosition[0]) + temp_var_hullMainRetVal[0u].WorldPosition[0]) * float4(0.3333333432674407958984375))) * float4(0.5)); + float4 _589 = fast::clamp(_461 * _587, float4(1.0), float4(15.0)); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[0u] = half(_589.x); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[1u] = half(_589.y); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[2u] = half(_589.z); + spvTessLevel[gl_PrimitiveID].insideTessellationFactor = half(_589.w); + patchOut.out_var_PN_POSITION9 = _448 + ((_448 - (((temp_var_hullMainRetVal[2u].WorldPosition[0] + temp_var_hullMainRetVal[1u].WorldPosition[0]) + temp_var_hullMainRetVal[0u].WorldPosition[0]) * float4(0.3333333432674407958984375))) * float4(0.5)); } } diff --git a/reference/opt/shaders-ue4/asm/tesc/hs-input-array-access.invalid.asm.tesc b/reference/opt/shaders-ue4/asm/tesc/hs-input-array-access.invalid.asm.tesc index 3bfbb69c..df2dc815 100644 --- a/reference/opt/shaders-ue4/asm/tesc/hs-input-array-access.invalid.asm.tesc +++ b/reference/opt/shaders-ue4/asm/tesc/hs-input-array-access.invalid.asm.tesc @@ -304,7 +304,7 @@ struct type_Primitive float4 Primitive_CustomPrimitiveData[4]; }; -constant float4 _140 = {}; +constant float4 _136 = {}; struct main0_out { @@ -350,114 +350,114 @@ kernel void main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0) threadgroup_barrier(mem_flags::mem_threadgroup); if (gl_InvocationID >= 3) return; - spvUnsafeArray _142 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD10_centroid, gl_in[3].in_var_TEXCOORD10_centroid, gl_in[4].in_var_TEXCOORD10_centroid, gl_in[5].in_var_TEXCOORD10_centroid, gl_in[6].in_var_TEXCOORD10_centroid, gl_in[7].in_var_TEXCOORD10_centroid, gl_in[8].in_var_TEXCOORD10_centroid, gl_in[9].in_var_TEXCOORD10_centroid, gl_in[10].in_var_TEXCOORD10_centroid, gl_in[11].in_var_TEXCOORD10_centroid }); - spvUnsafeArray _143 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD11_centroid, gl_in[1].in_var_TEXCOORD11_centroid, gl_in[2].in_var_TEXCOORD11_centroid, gl_in[3].in_var_TEXCOORD11_centroid, gl_in[4].in_var_TEXCOORD11_centroid, gl_in[5].in_var_TEXCOORD11_centroid, gl_in[6].in_var_TEXCOORD11_centroid, gl_in[7].in_var_TEXCOORD11_centroid, gl_in[8].in_var_TEXCOORD11_centroid, gl_in[9].in_var_TEXCOORD11_centroid, gl_in[10].in_var_TEXCOORD11_centroid, gl_in[11].in_var_TEXCOORD11_centroid }); - spvUnsafeArray _192 = spvUnsafeArray({ gl_in[0].in_var_VS_To_DS_Position, gl_in[1].in_var_VS_To_DS_Position, gl_in[2].in_var_VS_To_DS_Position, gl_in[3].in_var_VS_To_DS_Position, gl_in[4].in_var_VS_To_DS_Position, gl_in[5].in_var_VS_To_DS_Position, gl_in[6].in_var_VS_To_DS_Position, gl_in[7].in_var_VS_To_DS_Position, gl_in[8].in_var_VS_To_DS_Position, gl_in[9].in_var_VS_To_DS_Position, gl_in[10].in_var_VS_To_DS_Position, gl_in[11].in_var_VS_To_DS_Position }); - spvUnsafeArray _193 = spvUnsafeArray({ gl_in[0].in_var_VS_To_DS_VertexID, gl_in[1].in_var_VS_To_DS_VertexID, gl_in[2].in_var_VS_To_DS_VertexID, gl_in[3].in_var_VS_To_DS_VertexID, gl_in[4].in_var_VS_To_DS_VertexID, gl_in[5].in_var_VS_To_DS_VertexID, gl_in[6].in_var_VS_To_DS_VertexID, gl_in[7].in_var_VS_To_DS_VertexID, gl_in[8].in_var_VS_To_DS_VertexID, gl_in[9].in_var_VS_To_DS_VertexID, gl_in[10].in_var_VS_To_DS_VertexID, gl_in[11].in_var_VS_To_DS_VertexID }); - spvUnsafeArray _230 = spvUnsafeArray({ FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[0], _143[0] } }, _192[0], _193[0] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[1], _143[1] } }, _192[1], _193[1] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[2], _143[2] } }, _192[2], _193[2] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[3], _143[3] } }, _192[3], _193[3] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[4], _143[4] } }, _192[4], _193[4] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[5], _143[5] } }, _192[5], _193[5] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[6], _143[6] } }, _192[6], _193[6] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[7], _143[7] } }, _192[7], _193[7] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[8], _143[8] } }, _192[8], _193[8] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[9], _143[9] } }, _192[9], _193[9] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[10], _143[10] } }, _192[10], _193[10] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[11], _143[11] } }, _192[11], _193[11] } }); - spvUnsafeArray param_var_I = _230; - float4 _247 = float4(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); - float3 _251 = Primitive.Primitive_NonUniformScale.xyz * float3x3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz, cross(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz) * float3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.w), param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz); - uint _254 = (gl_InvocationID < 2u) ? (gl_InvocationID + 1u) : 0u; - uint _255 = 2u * gl_InvocationID; - uint _256 = 3u + _255; - uint _257 = _255 + 4u; - uint _264 = (_254 < 2u) ? (_254 + 1u) : 0u; - uint _265 = 2u * _254; - uint _266 = 3u + _265; - uint _267 = _265 + 4u; - float4 _279 = float4(param_var_I[9u + gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); - float4 _315; - float4 _316; - float4 _317; - float4 _318; - if ((param_var_I[_266].VertexID < param_var_I[_254].VertexID) || ((param_var_I[_266].VertexID == param_var_I[_254].VertexID) && (param_var_I[_267].VertexID < param_var_I[_264].VertexID))) + spvUnsafeArray _138 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD10_centroid, gl_in[3].in_var_TEXCOORD10_centroid, gl_in[4].in_var_TEXCOORD10_centroid, gl_in[5].in_var_TEXCOORD10_centroid, gl_in[6].in_var_TEXCOORD10_centroid, gl_in[7].in_var_TEXCOORD10_centroid, gl_in[8].in_var_TEXCOORD10_centroid, gl_in[9].in_var_TEXCOORD10_centroid, gl_in[10].in_var_TEXCOORD10_centroid, gl_in[11].in_var_TEXCOORD10_centroid }); + spvUnsafeArray _139 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD11_centroid, gl_in[1].in_var_TEXCOORD11_centroid, gl_in[2].in_var_TEXCOORD11_centroid, gl_in[3].in_var_TEXCOORD11_centroid, gl_in[4].in_var_TEXCOORD11_centroid, gl_in[5].in_var_TEXCOORD11_centroid, gl_in[6].in_var_TEXCOORD11_centroid, gl_in[7].in_var_TEXCOORD11_centroid, gl_in[8].in_var_TEXCOORD11_centroid, gl_in[9].in_var_TEXCOORD11_centroid, gl_in[10].in_var_TEXCOORD11_centroid, gl_in[11].in_var_TEXCOORD11_centroid }); + spvUnsafeArray _188 = spvUnsafeArray({ gl_in[0].in_var_VS_To_DS_Position, gl_in[1].in_var_VS_To_DS_Position, gl_in[2].in_var_VS_To_DS_Position, gl_in[3].in_var_VS_To_DS_Position, gl_in[4].in_var_VS_To_DS_Position, gl_in[5].in_var_VS_To_DS_Position, gl_in[6].in_var_VS_To_DS_Position, gl_in[7].in_var_VS_To_DS_Position, gl_in[8].in_var_VS_To_DS_Position, gl_in[9].in_var_VS_To_DS_Position, gl_in[10].in_var_VS_To_DS_Position, gl_in[11].in_var_VS_To_DS_Position }); + spvUnsafeArray _189 = spvUnsafeArray({ gl_in[0].in_var_VS_To_DS_VertexID, gl_in[1].in_var_VS_To_DS_VertexID, gl_in[2].in_var_VS_To_DS_VertexID, gl_in[3].in_var_VS_To_DS_VertexID, gl_in[4].in_var_VS_To_DS_VertexID, gl_in[5].in_var_VS_To_DS_VertexID, gl_in[6].in_var_VS_To_DS_VertexID, gl_in[7].in_var_VS_To_DS_VertexID, gl_in[8].in_var_VS_To_DS_VertexID, gl_in[9].in_var_VS_To_DS_VertexID, gl_in[10].in_var_VS_To_DS_VertexID, gl_in[11].in_var_VS_To_DS_VertexID }); + spvUnsafeArray _226 = spvUnsafeArray({ FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[0], _139[0] } }, _188[0], _189[0] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[1], _139[1] } }, _188[1], _189[1] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[2], _139[2] } }, _188[2], _189[2] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[3], _139[3] } }, _188[3], _189[3] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[4], _139[4] } }, _188[4], _189[4] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[5], _139[5] } }, _188[5], _189[5] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[6], _139[6] } }, _188[6], _189[6] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[7], _139[7] } }, _188[7], _189[7] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[8], _139[8] } }, _188[8], _189[8] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[9], _139[9] } }, _188[9], _189[9] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[10], _139[10] } }, _188[10], _189[10] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[11], _139[11] } }, _188[11], _189[11] } }); + spvUnsafeArray param_var_I = _226; + float4 _243 = float4(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float3 _247 = Primitive.Primitive_NonUniformScale.xyz * float3x3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz, cross(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz) * float3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.w), param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz); + uint _250 = (gl_InvocationID < 2u) ? (gl_InvocationID + 1u) : 0u; + uint _251 = 2u * gl_InvocationID; + uint _252 = 3u + _251; + uint _253 = _251 + 4u; + uint _260 = (_250 < 2u) ? (_250 + 1u) : 0u; + uint _261 = 2u * _250; + uint _262 = 3u + _261; + uint _263 = _261 + 4u; + float4 _275 = float4(param_var_I[9u + gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float4 _311; + float4 _312; + float4 _313; + float4 _314; + if ((param_var_I[_262].VertexID < param_var_I[_250].VertexID) || ((param_var_I[_262].VertexID == param_var_I[_250].VertexID) && (param_var_I[_263].VertexID < param_var_I[_260].VertexID))) { - _315 = param_var_I[_267].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; - _316 = param_var_I[_267].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; - _317 = param_var_I[_266].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; - _318 = param_var_I[_266].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; + _311 = param_var_I[_263].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; + _312 = param_var_I[_263].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; + _313 = param_var_I[_262].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; + _314 = param_var_I[_262].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; } else { - _315 = param_var_I[_264].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; - _316 = param_var_I[_264].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; - _317 = param_var_I[_254].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; - _318 = param_var_I[_254].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; + _311 = param_var_I[_260].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; + _312 = param_var_I[_260].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; + _313 = param_var_I[_250].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; + _314 = param_var_I[_250].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; } - float4 _324 = float4(_318.xyz, 0.0); - float4 _328 = float4(_316.xyz, 0.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) }); + float4 _320 = float4(_314.xyz, 0.0); + float4 _324 = float4(_312.xyz, 0.0); + float4 _332 = float4(param_var_I[_250].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float4 _340 = float4(param_var_I[_252].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float4 _348 = float4(param_var_I[_253].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + spvUnsafeArray _398 = spvUnsafeArray({ param_var_I[gl_InvocationID].Position, (((((float4(2.0) * param_var_I[gl_InvocationID].Position) + param_var_I[_250].Position) - (float4(dot(param_var_I[_250].Position - param_var_I[gl_InvocationID].Position, _243)) * _243)) * float4(0.3333333432674407958984375)) + ((((float4(2.0) * param_var_I[_252].Position) + param_var_I[_253].Position) - (float4(dot(param_var_I[_253].Position - param_var_I[_252].Position, _340)) * _340)) * float4(0.3333333432674407958984375))) * float4(0.5), (((((float4(2.0) * param_var_I[_250].Position) + param_var_I[gl_InvocationID].Position) - (float4(dot(param_var_I[gl_InvocationID].Position - param_var_I[_250].Position, _332)) * _332)) * float4(0.3333333432674407958984375)) + ((((float4(2.0) * param_var_I[_253].Position) + param_var_I[_252].Position) - (float4(dot(param_var_I[_252].Position - param_var_I[_253].Position, _348)) * _348)) * float4(0.3333333432674407958984375))) * float4(0.5) }); 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; gl_out[gl_InvocationID].out_var_VS_To_DS_VertexID = param_var_I[gl_InvocationID].VertexID; - gl_out[gl_InvocationID].out_var_PN_POSITION = _402; - gl_out[gl_InvocationID].out_var_PN_DisplacementScales = _251; + gl_out[gl_InvocationID].out_var_PN_POSITION = _398; + gl_out[gl_InvocationID].out_var_PN_DisplacementScales = _247; gl_out[gl_InvocationID].out_var_PN_TessellationMultiplier = 1.0; gl_out[gl_InvocationID].out_var_PN_WorldDisplacementMultiplier = 1.0; gl_out[gl_InvocationID].out_var_PN_DominantVertex = float2(0.0); - gl_out[gl_InvocationID].out_var_PN_DominantVertex1 = _279; + gl_out[gl_InvocationID].out_var_PN_DominantVertex1 = _275; gl_out[gl_InvocationID].out_var_PN_DominantVertex2 = param_var_I[9u + gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz; gl_out[gl_InvocationID].out_var_PN_DominantEdge = float2(0.0); gl_out[gl_InvocationID].out_var_PN_DominantEdge1 = float2(0.0); - gl_out[gl_InvocationID].out_var_PN_DominantEdge2 = _324; - gl_out[gl_InvocationID].out_var_PN_DominantEdge3 = _328; - gl_out[gl_InvocationID].out_var_PN_DominantEdge4 = _317.xyz; - gl_out[gl_InvocationID].out_var_PN_DominantEdge5 = _315.xyz; - temp_var_hullMainRetVal[gl_InvocationID] = FPNTessellationHSToDS{ param_var_I[gl_InvocationID], _402, _251, 1.0, 1.0, FHullShaderConstantDominantVertexData{ float2(0.0), _279, param_var_I[9u + gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz }, FHullShaderConstantDominantEdgeData{ float2(0.0), float2(0.0), _324, _328, _317.xyz, _315.xyz } }; + gl_out[gl_InvocationID].out_var_PN_DominantEdge2 = _320; + gl_out[gl_InvocationID].out_var_PN_DominantEdge3 = _324; + gl_out[gl_InvocationID].out_var_PN_DominantEdge4 = _313.xyz; + gl_out[gl_InvocationID].out_var_PN_DominantEdge5 = _311.xyz; + temp_var_hullMainRetVal[gl_InvocationID] = FPNTessellationHSToDS{ param_var_I[gl_InvocationID], _398, _247, 1.0, 1.0, FHullShaderConstantDominantVertexData{ float2(0.0), _275, param_var_I[9u + gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz }, FHullShaderConstantDominantEdgeData{ float2(0.0), float2(0.0), _320, _324, _313.xyz, _311.xyz } }; threadgroup_barrier(mem_flags::mem_device | mem_flags::mem_threadgroup); 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; - _474.x = 0.5 * (temp_var_hullMainRetVal[1u].TessellationMultiplier + temp_var_hullMainRetVal[2u].TessellationMultiplier); - _474.y = 0.5 * (temp_var_hullMainRetVal[2u].TessellationMultiplier + temp_var_hullMainRetVal[0u].TessellationMultiplier); - _474.z = 0.5 * (temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier); - _474.w = 0.333000004291534423828125 * ((temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier) + temp_var_hullMainRetVal[2u].TessellationMultiplier); - float4 _600; + float4 _457 = (((((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 _470; + _470.x = 0.5 * (temp_var_hullMainRetVal[1u].TessellationMultiplier + temp_var_hullMainRetVal[2u].TessellationMultiplier); + _470.y = 0.5 * (temp_var_hullMainRetVal[2u].TessellationMultiplier + temp_var_hullMainRetVal[0u].TessellationMultiplier); + _470.z = 0.5 * (temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier); + _470.w = 0.333000004291534423828125 * ((temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier) + temp_var_hullMainRetVal[2u].TessellationMultiplier); + float4 _596; for (;;) { - float4 _500 = View.View_ViewToClip * float4(0.0); - float4 _505 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[0u].WorldPosition[0].xyz, 1.0); - float3 _506 = _505.xyz; - float3 _507 = _500.xyz; - float _509 = _505.w; - float _510 = _500.w; - float4 _527 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[1u].WorldPosition[0].xyz, 1.0); - float3 _528 = _527.xyz; - float _530 = _527.w; - float4 _548 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[2u].WorldPosition[0].xyz, 1.0); - float3 _549 = _548.xyz; - float _551 = _548.w; - if (any((((int3((_506 - _507) < float3(_509 + _510)) + (int3(2) * int3((_506 + _507) > float3((-_509) - _510)))) | (int3((_528 - _507) < float3(_530 + _510)) + (int3(2) * int3((_528 + _507) > float3((-_530) - _510))))) | (int3((_549 - _507) < float3(_551 + _510)) + (int3(2) * int3((_549 + _507) > float3((-_551) - _510))))) != int3(3))) + float4 _496 = View.View_ViewToClip * float4(0.0); + float4 _501 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[0u].WorldPosition[0].xyz, 1.0); + float3 _502 = _501.xyz; + float3 _503 = _496.xyz; + float _505 = _501.w; + float _506 = _496.w; + float4 _523 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[1u].WorldPosition[0].xyz, 1.0); + float3 _524 = _523.xyz; + float _526 = _523.w; + float4 _544 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[2u].WorldPosition[0].xyz, 1.0); + float3 _545 = _544.xyz; + float _547 = _544.w; + if (any((((int3((_502 - _503) < float3(_505 + _506)) + (int3(2) * int3((_502 + _503) > float3((-_505) - _506)))) | (int3((_524 - _503) < float3(_526 + _506)) + (int3(2) * int3((_524 + _503) > float3((-_526) - _506))))) | (int3((_545 - _503) < float3(_547 + _506)) + (int3(2) * int3((_545 + _503) > float3((-_547) - _506))))) != int3(3))) { - _600 = float4(0.0); + _596 = float4(0.0); break; } - float3 _569 = temp_var_hullMainRetVal[0u].WorldPosition[0].xyz - temp_var_hullMainRetVal[1u].WorldPosition[0].xyz; - float3 _570 = temp_var_hullMainRetVal[1u].WorldPosition[0].xyz - temp_var_hullMainRetVal[2u].WorldPosition[0].xyz; - float3 _571 = temp_var_hullMainRetVal[2u].WorldPosition[0].xyz - temp_var_hullMainRetVal[0u].WorldPosition[0].xyz; - float3 _574 = (float3(0.5) * (temp_var_hullMainRetVal[0u].WorldPosition[0].xyz + temp_var_hullMainRetVal[1u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); - float3 _577 = (float3(0.5) * (temp_var_hullMainRetVal[1u].WorldPosition[0].xyz + temp_var_hullMainRetVal[2u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); - float3 _580 = (float3(0.5) * (temp_var_hullMainRetVal[2u].WorldPosition[0].xyz + temp_var_hullMainRetVal[0u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); - float _584 = sqrt(dot(_570, _570) / dot(_577, _577)); - float _588 = sqrt(dot(_571, _571) / dot(_580, _580)); - float _592 = sqrt(dot(_569, _569) / dot(_574, _574)); - float4 _593 = float4(_584, _588, _592, 1.0); - _593.w = 0.333000004291534423828125 * ((_584 + _588) + _592); - _600 = float4(View.View_AdaptiveTessellationFactor) * _593; + float3 _565 = temp_var_hullMainRetVal[0u].WorldPosition[0].xyz - temp_var_hullMainRetVal[1u].WorldPosition[0].xyz; + float3 _566 = temp_var_hullMainRetVal[1u].WorldPosition[0].xyz - temp_var_hullMainRetVal[2u].WorldPosition[0].xyz; + float3 _567 = temp_var_hullMainRetVal[2u].WorldPosition[0].xyz - temp_var_hullMainRetVal[0u].WorldPosition[0].xyz; + float3 _570 = (float3(0.5) * (temp_var_hullMainRetVal[0u].WorldPosition[0].xyz + temp_var_hullMainRetVal[1u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float3 _573 = (float3(0.5) * (temp_var_hullMainRetVal[1u].WorldPosition[0].xyz + temp_var_hullMainRetVal[2u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float3 _576 = (float3(0.5) * (temp_var_hullMainRetVal[2u].WorldPosition[0].xyz + temp_var_hullMainRetVal[0u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float _580 = sqrt(dot(_566, _566) / dot(_573, _573)); + float _584 = sqrt(dot(_567, _567) / dot(_576, _576)); + float _588 = sqrt(dot(_565, _565) / dot(_570, _570)); + float4 _589 = float4(_580, _584, _588, 1.0); + _589.w = 0.333000004291534423828125 * ((_580 + _584) + _588); + _596 = float4(View.View_AdaptiveTessellationFactor) * _589; break; } - float4 _602 = fast::clamp(_474 * _600, float4(1.0), float4(15.0)); - spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[0u] = half(_602.x); - spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[1u] = half(_602.y); - spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[2u] = half(_602.z); - spvTessLevel[gl_PrimitiveID].insideTessellationFactor = half(_602.w); - patchOut.out_var_PN_POSITION9 = _461 + ((_461 - (((temp_var_hullMainRetVal[2u].WorldPosition[0] + temp_var_hullMainRetVal[1u].WorldPosition[0]) + temp_var_hullMainRetVal[0u].WorldPosition[0]) * float4(0.3333333432674407958984375))) * float4(0.5)); + float4 _598 = fast::clamp(_470 * _596, float4(1.0), float4(15.0)); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[0u] = half(_598.x); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[1u] = half(_598.y); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[2u] = half(_598.z); + spvTessLevel[gl_PrimitiveID].insideTessellationFactor = half(_598.w); + patchOut.out_var_PN_POSITION9 = _457 + ((_457 - (((temp_var_hullMainRetVal[2u].WorldPosition[0] + temp_var_hullMainRetVal[1u].WorldPosition[0]) + temp_var_hullMainRetVal[0u].WorldPosition[0]) * float4(0.3333333432674407958984375))) * float4(0.5)); } } diff --git a/reference/opt/shaders-ue4/asm/tesc/hs-texcoord-array.invalid.asm.tesc b/reference/opt/shaders-ue4/asm/tesc/hs-texcoord-array.invalid.asm.tesc index 23859bc5..a50dbb0d 100644 --- a/reference/opt/shaders-ue4/asm/tesc/hs-texcoord-array.invalid.asm.tesc +++ b/reference/opt/shaders-ue4/asm/tesc/hs-texcoord-array.invalid.asm.tesc @@ -286,7 +286,7 @@ struct type_Primitive float4 Primitive_CustomPrimitiveData[4]; }; -constant float4 _127 = {}; +constant float4 _123 = {}; struct main0_out { @@ -326,82 +326,82 @@ kernel void main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0) threadgroup_barrier(mem_flags::mem_threadgroup); if (gl_InvocationID >= 3) return; - spvUnsafeArray _129 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD10_centroid, gl_in[3].in_var_TEXCOORD10_centroid, gl_in[4].in_var_TEXCOORD10_centroid, gl_in[5].in_var_TEXCOORD10_centroid, gl_in[6].in_var_TEXCOORD10_centroid, gl_in[7].in_var_TEXCOORD10_centroid, gl_in[8].in_var_TEXCOORD10_centroid, gl_in[9].in_var_TEXCOORD10_centroid, gl_in[10].in_var_TEXCOORD10_centroid, gl_in[11].in_var_TEXCOORD10_centroid }); - spvUnsafeArray _130 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD11_centroid, gl_in[1].in_var_TEXCOORD11_centroid, gl_in[2].in_var_TEXCOORD11_centroid, gl_in[3].in_var_TEXCOORD11_centroid, gl_in[4].in_var_TEXCOORD11_centroid, gl_in[5].in_var_TEXCOORD11_centroid, gl_in[6].in_var_TEXCOORD11_centroid, gl_in[7].in_var_TEXCOORD11_centroid, gl_in[8].in_var_TEXCOORD11_centroid, gl_in[9].in_var_TEXCOORD11_centroid, gl_in[10].in_var_TEXCOORD11_centroid, gl_in[11].in_var_TEXCOORD11_centroid }); - spvUnsafeArray _131 = spvUnsafeArray({ gl_in[0].in_var_COLOR0, gl_in[1].in_var_COLOR0, gl_in[2].in_var_COLOR0, gl_in[3].in_var_COLOR0, gl_in[4].in_var_COLOR0, gl_in[5].in_var_COLOR0, gl_in[6].in_var_COLOR0, gl_in[7].in_var_COLOR0, gl_in[8].in_var_COLOR0, gl_in[9].in_var_COLOR0, gl_in[10].in_var_COLOR0, gl_in[11].in_var_COLOR0 }); - spvUnsafeArray, 12> _132 = spvUnsafeArray, 12>({ spvUnsafeArray({ gl_in[0].in_var_TEXCOORD0_0, gl_in[0].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[1].in_var_TEXCOORD0_0, gl_in[1].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[2].in_var_TEXCOORD0_0, gl_in[2].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[3].in_var_TEXCOORD0_0, gl_in[3].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[4].in_var_TEXCOORD0_0, gl_in[4].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[5].in_var_TEXCOORD0_0, gl_in[5].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[6].in_var_TEXCOORD0_0, gl_in[6].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[7].in_var_TEXCOORD0_0, gl_in[7].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[8].in_var_TEXCOORD0_0, gl_in[8].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[9].in_var_TEXCOORD0_0, gl_in[9].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[10].in_var_TEXCOORD0_0, gl_in[10].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[11].in_var_TEXCOORD0_0, gl_in[11].in_var_TEXCOORD0_1 }) }); - spvUnsafeArray _205 = spvUnsafeArray({ gl_in[0].in_var_VS_To_DS_Position, gl_in[1].in_var_VS_To_DS_Position, gl_in[2].in_var_VS_To_DS_Position, gl_in[3].in_var_VS_To_DS_Position, gl_in[4].in_var_VS_To_DS_Position, gl_in[5].in_var_VS_To_DS_Position, gl_in[6].in_var_VS_To_DS_Position, gl_in[7].in_var_VS_To_DS_Position, gl_in[8].in_var_VS_To_DS_Position, gl_in[9].in_var_VS_To_DS_Position, gl_in[10].in_var_VS_To_DS_Position, gl_in[11].in_var_VS_To_DS_Position }); - spvUnsafeArray _230 = spvUnsafeArray({ FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[0], _130[0], _131[0], _132[0] } }, _205[0] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[1], _130[1], _131[1], _132[1] } }, _205[1] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[2], _130[2], _131[2], _132[2] } }, _205[2] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[3], _130[3], _131[3], _132[3] } }, _205[3] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[4], _130[4], _131[4], _132[4] } }, _205[4] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[5], _130[5], _131[5], _132[5] } }, _205[5] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[6], _130[6], _131[6], _132[6] } }, _205[6] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[7], _130[7], _131[7], _132[7] } }, _205[7] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[8], _130[8], _131[8], _132[8] } }, _205[8] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[9], _130[9], _131[9], _132[9] } }, _205[9] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[10], _130[10], _131[10], _132[10] } }, _205[10] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[11], _130[11], _131[11], _132[11] } }, _205[11] } }); - spvUnsafeArray param_var_I = _230; - float4 _247 = float4(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); - float3 _251 = Primitive.Primitive_NonUniformScale.xyz * float3x3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz, cross(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz) * float3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.w), param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz); - uint _254 = (gl_InvocationID < 2u) ? (gl_InvocationID + 1u) : 0u; - uint _255 = 2u * gl_InvocationID; - uint _256 = 3u + _255; - uint _257 = _255 + 4u; - 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 _125 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD10_centroid, gl_in[3].in_var_TEXCOORD10_centroid, gl_in[4].in_var_TEXCOORD10_centroid, gl_in[5].in_var_TEXCOORD10_centroid, gl_in[6].in_var_TEXCOORD10_centroid, gl_in[7].in_var_TEXCOORD10_centroid, gl_in[8].in_var_TEXCOORD10_centroid, gl_in[9].in_var_TEXCOORD10_centroid, gl_in[10].in_var_TEXCOORD10_centroid, gl_in[11].in_var_TEXCOORD10_centroid }); + spvUnsafeArray _126 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD11_centroid, gl_in[1].in_var_TEXCOORD11_centroid, gl_in[2].in_var_TEXCOORD11_centroid, gl_in[3].in_var_TEXCOORD11_centroid, gl_in[4].in_var_TEXCOORD11_centroid, gl_in[5].in_var_TEXCOORD11_centroid, gl_in[6].in_var_TEXCOORD11_centroid, gl_in[7].in_var_TEXCOORD11_centroid, gl_in[8].in_var_TEXCOORD11_centroid, gl_in[9].in_var_TEXCOORD11_centroid, gl_in[10].in_var_TEXCOORD11_centroid, gl_in[11].in_var_TEXCOORD11_centroid }); + spvUnsafeArray _127 = spvUnsafeArray({ gl_in[0].in_var_COLOR0, gl_in[1].in_var_COLOR0, gl_in[2].in_var_COLOR0, gl_in[3].in_var_COLOR0, gl_in[4].in_var_COLOR0, gl_in[5].in_var_COLOR0, gl_in[6].in_var_COLOR0, gl_in[7].in_var_COLOR0, gl_in[8].in_var_COLOR0, gl_in[9].in_var_COLOR0, gl_in[10].in_var_COLOR0, gl_in[11].in_var_COLOR0 }); + spvUnsafeArray, 12> _128 = spvUnsafeArray, 12>({ spvUnsafeArray({ gl_in[0].in_var_TEXCOORD0_0, gl_in[0].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[1].in_var_TEXCOORD0_0, gl_in[1].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[2].in_var_TEXCOORD0_0, gl_in[2].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[3].in_var_TEXCOORD0_0, gl_in[3].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[4].in_var_TEXCOORD0_0, gl_in[4].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[5].in_var_TEXCOORD0_0, gl_in[5].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[6].in_var_TEXCOORD0_0, gl_in[6].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[7].in_var_TEXCOORD0_0, gl_in[7].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[8].in_var_TEXCOORD0_0, gl_in[8].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[9].in_var_TEXCOORD0_0, gl_in[9].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[10].in_var_TEXCOORD0_0, gl_in[10].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[11].in_var_TEXCOORD0_0, gl_in[11].in_var_TEXCOORD0_1 }) }); + spvUnsafeArray _201 = spvUnsafeArray({ gl_in[0].in_var_VS_To_DS_Position, gl_in[1].in_var_VS_To_DS_Position, gl_in[2].in_var_VS_To_DS_Position, gl_in[3].in_var_VS_To_DS_Position, gl_in[4].in_var_VS_To_DS_Position, gl_in[5].in_var_VS_To_DS_Position, gl_in[6].in_var_VS_To_DS_Position, gl_in[7].in_var_VS_To_DS_Position, gl_in[8].in_var_VS_To_DS_Position, gl_in[9].in_var_VS_To_DS_Position, gl_in[10].in_var_VS_To_DS_Position, gl_in[11].in_var_VS_To_DS_Position }); + spvUnsafeArray _226 = spvUnsafeArray({ FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[0], _126[0], _127[0], _128[0] } }, _201[0] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[1], _126[1], _127[1], _128[1] } }, _201[1] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[2], _126[2], _127[2], _128[2] } }, _201[2] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[3], _126[3], _127[3], _128[3] } }, _201[3] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[4], _126[4], _127[4], _128[4] } }, _201[4] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[5], _126[5], _127[5], _128[5] } }, _201[5] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[6], _126[6], _127[6], _128[6] } }, _201[6] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[7], _126[7], _127[7], _128[7] } }, _201[7] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[8], _126[8], _127[8], _128[8] } }, _201[8] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[9], _126[9], _127[9], _128[9] } }, _201[9] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[10], _126[10], _127[10], _128[10] } }, _201[10] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[11], _126[11], _127[11], _128[11] } }, _201[11] } }); + spvUnsafeArray param_var_I = _226; + float4 _243 = float4(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float3 _247 = Primitive.Primitive_NonUniformScale.xyz * float3x3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz, cross(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz) * float3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.w), param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz); + uint _250 = (gl_InvocationID < 2u) ? (gl_InvocationID + 1u) : 0u; + uint _251 = 2u * gl_InvocationID; + uint _252 = 3u + _251; + uint _253 = _251 + 4u; + float4 _265 = float4(param_var_I[_250].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float4 _273 = float4(param_var_I[_252].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float4 _281 = float4(param_var_I[_253].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + spvUnsafeArray _329 = spvUnsafeArray({ param_var_I[gl_InvocationID].Position, (((((float4(2.0) * param_var_I[gl_InvocationID].Position) + param_var_I[_250].Position) - (float4(dot(param_var_I[_250].Position - param_var_I[gl_InvocationID].Position, _243)) * _243)) * float4(0.3333333432674407958984375)) + ((((float4(2.0) * param_var_I[_252].Position) + param_var_I[_253].Position) - (float4(dot(param_var_I[_253].Position - param_var_I[_252].Position, _273)) * _273)) * float4(0.3333333432674407958984375))) * float4(0.5), (((((float4(2.0) * param_var_I[_250].Position) + param_var_I[gl_InvocationID].Position) - (float4(dot(param_var_I[gl_InvocationID].Position - param_var_I[_250].Position, _265)) * _265)) * float4(0.3333333432674407958984375)) + ((((float4(2.0) * param_var_I[_253].Position) + param_var_I[_252].Position) - (float4(dot(param_var_I[_252].Position - param_var_I[_253].Position, _281)) * _281)) * float4(0.3333333432674407958984375))) * float4(0.5) }); 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; gl_out[gl_InvocationID].out_var_TEXCOORD0 = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TexCoords; gl_out[gl_InvocationID].out_var_VS_To_DS_Position = param_var_I[gl_InvocationID].Position; - gl_out[gl_InvocationID].out_var_PN_POSITION = _333; - gl_out[gl_InvocationID].out_var_PN_DisplacementScales = _251; + gl_out[gl_InvocationID].out_var_PN_POSITION = _329; + gl_out[gl_InvocationID].out_var_PN_DisplacementScales = _247; gl_out[gl_InvocationID].out_var_PN_TessellationMultiplier = 1.0; gl_out[gl_InvocationID].out_var_PN_WorldDisplacementMultiplier = 1.0; - temp_var_hullMainRetVal[gl_InvocationID] = FPNTessellationHSToDS{ param_var_I[gl_InvocationID], _333, _251, 1.0, 1.0 }; + temp_var_hullMainRetVal[gl_InvocationID] = FPNTessellationHSToDS{ param_var_I[gl_InvocationID], _329, _247, 1.0, 1.0 }; threadgroup_barrier(mem_flags::mem_device | mem_flags::mem_threadgroup); 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; - _398.x = 0.5 * (temp_var_hullMainRetVal[1u].TessellationMultiplier + temp_var_hullMainRetVal[2u].TessellationMultiplier); - _398.y = 0.5 * (temp_var_hullMainRetVal[2u].TessellationMultiplier + temp_var_hullMainRetVal[0u].TessellationMultiplier); - _398.z = 0.5 * (temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier); - _398.w = 0.333000004291534423828125 * ((temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier) + temp_var_hullMainRetVal[2u].TessellationMultiplier); - float4 _524; + float4 _381 = (((((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 _394; + _394.x = 0.5 * (temp_var_hullMainRetVal[1u].TessellationMultiplier + temp_var_hullMainRetVal[2u].TessellationMultiplier); + _394.y = 0.5 * (temp_var_hullMainRetVal[2u].TessellationMultiplier + temp_var_hullMainRetVal[0u].TessellationMultiplier); + _394.z = 0.5 * (temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier); + _394.w = 0.333000004291534423828125 * ((temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier) + temp_var_hullMainRetVal[2u].TessellationMultiplier); + float4 _520; for (;;) { - float4 _424 = View.View_ViewToClip * float4(0.0); - float4 _429 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[0u].WorldPosition[0].xyz, 1.0); - float3 _430 = _429.xyz; - float3 _431 = _424.xyz; - float _433 = _429.w; - float _434 = _424.w; - float4 _451 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[1u].WorldPosition[0].xyz, 1.0); - float3 _452 = _451.xyz; - float _454 = _451.w; - float4 _472 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[2u].WorldPosition[0].xyz, 1.0); - float3 _473 = _472.xyz; - float _475 = _472.w; - if (any((((int3((_430 - _431) < float3(_433 + _434)) + (int3(2) * int3((_430 + _431) > float3((-_433) - _434)))) | (int3((_452 - _431) < float3(_454 + _434)) + (int3(2) * int3((_452 + _431) > float3((-_454) - _434))))) | (int3((_473 - _431) < float3(_475 + _434)) + (int3(2) * int3((_473 + _431) > float3((-_475) - _434))))) != int3(3))) + float4 _420 = View.View_ViewToClip * float4(0.0); + float4 _425 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[0u].WorldPosition[0].xyz, 1.0); + float3 _426 = _425.xyz; + float3 _427 = _420.xyz; + float _429 = _425.w; + float _430 = _420.w; + float4 _447 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[1u].WorldPosition[0].xyz, 1.0); + float3 _448 = _447.xyz; + float _450 = _447.w; + float4 _468 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[2u].WorldPosition[0].xyz, 1.0); + float3 _469 = _468.xyz; + float _471 = _468.w; + if (any((((int3((_426 - _427) < float3(_429 + _430)) + (int3(2) * int3((_426 + _427) > float3((-_429) - _430)))) | (int3((_448 - _427) < float3(_450 + _430)) + (int3(2) * int3((_448 + _427) > float3((-_450) - _430))))) | (int3((_469 - _427) < float3(_471 + _430)) + (int3(2) * int3((_469 + _427) > float3((-_471) - _430))))) != int3(3))) { - _524 = float4(0.0); + _520 = float4(0.0); break; } - float3 _493 = temp_var_hullMainRetVal[0u].WorldPosition[0].xyz - temp_var_hullMainRetVal[1u].WorldPosition[0].xyz; - float3 _494 = temp_var_hullMainRetVal[1u].WorldPosition[0].xyz - temp_var_hullMainRetVal[2u].WorldPosition[0].xyz; - float3 _495 = temp_var_hullMainRetVal[2u].WorldPosition[0].xyz - temp_var_hullMainRetVal[0u].WorldPosition[0].xyz; - float3 _498 = (float3(0.5) * (temp_var_hullMainRetVal[0u].WorldPosition[0].xyz + temp_var_hullMainRetVal[1u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); - float3 _501 = (float3(0.5) * (temp_var_hullMainRetVal[1u].WorldPosition[0].xyz + temp_var_hullMainRetVal[2u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); - float3 _504 = (float3(0.5) * (temp_var_hullMainRetVal[2u].WorldPosition[0].xyz + temp_var_hullMainRetVal[0u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); - float _508 = sqrt(dot(_494, _494) / dot(_501, _501)); - float _512 = sqrt(dot(_495, _495) / dot(_504, _504)); - float _516 = sqrt(dot(_493, _493) / dot(_498, _498)); - float4 _517 = float4(_508, _512, _516, 1.0); - _517.w = 0.333000004291534423828125 * ((_508 + _512) + _516); - _524 = float4(View.View_AdaptiveTessellationFactor) * _517; + float3 _489 = temp_var_hullMainRetVal[0u].WorldPosition[0].xyz - temp_var_hullMainRetVal[1u].WorldPosition[0].xyz; + float3 _490 = temp_var_hullMainRetVal[1u].WorldPosition[0].xyz - temp_var_hullMainRetVal[2u].WorldPosition[0].xyz; + float3 _491 = temp_var_hullMainRetVal[2u].WorldPosition[0].xyz - temp_var_hullMainRetVal[0u].WorldPosition[0].xyz; + float3 _494 = (float3(0.5) * (temp_var_hullMainRetVal[0u].WorldPosition[0].xyz + temp_var_hullMainRetVal[1u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float3 _497 = (float3(0.5) * (temp_var_hullMainRetVal[1u].WorldPosition[0].xyz + temp_var_hullMainRetVal[2u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float3 _500 = (float3(0.5) * (temp_var_hullMainRetVal[2u].WorldPosition[0].xyz + temp_var_hullMainRetVal[0u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float _504 = sqrt(dot(_490, _490) / dot(_497, _497)); + float _508 = sqrt(dot(_491, _491) / dot(_500, _500)); + float _512 = sqrt(dot(_489, _489) / dot(_494, _494)); + float4 _513 = float4(_504, _508, _512, 1.0); + _513.w = 0.333000004291534423828125 * ((_504 + _508) + _512); + _520 = float4(View.View_AdaptiveTessellationFactor) * _513; break; } - float4 _526 = fast::clamp(_398 * _524, float4(1.0), float4(15.0)); - spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[0u] = half(_526.x); - spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[1u] = half(_526.y); - spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[2u] = half(_526.z); - spvTessLevel[gl_PrimitiveID].insideTessellationFactor = half(_526.w); - patchOut.out_var_PN_POSITION9 = _385 + ((_385 - (((temp_var_hullMainRetVal[2u].WorldPosition[0] + temp_var_hullMainRetVal[1u].WorldPosition[0]) + temp_var_hullMainRetVal[0u].WorldPosition[0]) * float4(0.3333333432674407958984375))) * float4(0.5)); + float4 _522 = fast::clamp(_394 * _520, float4(1.0), float4(15.0)); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[0u] = half(_522.x); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[1u] = half(_522.y); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[2u] = half(_522.z); + spvTessLevel[gl_PrimitiveID].insideTessellationFactor = half(_522.w); + patchOut.out_var_PN_POSITION9 = _381 + ((_381 - (((temp_var_hullMainRetVal[2u].WorldPosition[0] + temp_var_hullMainRetVal[1u].WorldPosition[0]) + temp_var_hullMainRetVal[0u].WorldPosition[0]) * float4(0.3333333432674407958984375))) * float4(0.5)); } } diff --git a/reference/opt/shaders-ue4/asm/tesc/tess-factor-must-be-threadgroup.invalid.asm.tesc b/reference/opt/shaders-ue4/asm/tesc/tess-factor-must-be-threadgroup.invalid.asm.tesc index cab75e39..1945220f 100644 --- a/reference/opt/shaders-ue4/asm/tesc/tess-factor-must-be-threadgroup.invalid.asm.tesc +++ b/reference/opt/shaders-ue4/asm/tesc/tess-factor-must-be-threadgroup.invalid.asm.tesc @@ -115,7 +115,7 @@ struct type_Material float4 Material_ScalarExpressions[1]; }; -constant float4 _88 = {}; +constant float4 _85 = {}; struct main0_out { @@ -143,32 +143,32 @@ kernel void main0(main0_in in [[stage_in]], constant type_Primitive& Primitive [ threadgroup_barrier(mem_flags::mem_threadgroup); if (gl_InvocationID >= 3) return; - spvUnsafeArray _90 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD10_centroid }); - spvUnsafeArray _91 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD11_centroid, gl_in[1].in_var_TEXCOORD11_centroid, gl_in[2].in_var_TEXCOORD11_centroid }); - spvUnsafeArray _104 = spvUnsafeArray({ gl_in[0].in_var_VS_To_DS_Position, gl_in[1].in_var_VS_To_DS_Position, gl_in[2].in_var_VS_To_DS_Position }); - spvUnsafeArray _111 = spvUnsafeArray({ FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _90[0], _91[0] } }, FBasePassInterpolantsVSToDS{ { } }, _104[0] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _90[1], _91[1] } }, FBasePassInterpolantsVSToDS{ { } }, _104[1] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _90[2], _91[2] } }, FBasePassInterpolantsVSToDS{ { } }, _104[2] } }); - spvUnsafeArray param_var_I = _111; - float3 _128 = Primitive.Primitive_NonUniformScale.xyz * float3x3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz, cross(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz) * float3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.w), param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz); + spvUnsafeArray _87 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD10_centroid }); + spvUnsafeArray _88 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD11_centroid, gl_in[1].in_var_TEXCOORD11_centroid, gl_in[2].in_var_TEXCOORD11_centroid }); + spvUnsafeArray _101 = spvUnsafeArray({ gl_in[0].in_var_VS_To_DS_Position, gl_in[1].in_var_VS_To_DS_Position, gl_in[2].in_var_VS_To_DS_Position }); + spvUnsafeArray _108 = spvUnsafeArray({ FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _87[0], _88[0] } }, FBasePassInterpolantsVSToDS{ { } }, _101[0] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _87[1], _88[1] } }, FBasePassInterpolantsVSToDS{ { } }, _101[1] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _87[2], _88[2] } }, FBasePassInterpolantsVSToDS{ { } }, _101[2] } }); + spvUnsafeArray param_var_I = _108; + float3 _125 = Primitive.Primitive_NonUniformScale.xyz * float3x3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz, cross(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz) * float3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.w), param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz); 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; - gl_out[gl_InvocationID].out_var_Flat_DisplacementScales = _128; + gl_out[gl_InvocationID].out_var_Flat_DisplacementScales = _125; gl_out[gl_InvocationID].out_var_Flat_TessellationMultiplier = Material.Material_ScalarExpressions[0].x; gl_out[gl_InvocationID].out_var_Flat_WorldDisplacementMultiplier = 1.0; - temp_var_hullMainRetVal[gl_InvocationID] = FFlatTessellationHSToDS{ param_var_I[gl_InvocationID], _128, Material.Material_ScalarExpressions[0].x, 1.0 }; + temp_var_hullMainRetVal[gl_InvocationID] = FFlatTessellationHSToDS{ param_var_I[gl_InvocationID], _125, Material.Material_ScalarExpressions[0].x, 1.0 }; threadgroup_barrier(mem_flags::mem_device | mem_flags::mem_threadgroup); if (gl_InvocationID == 0u) { - float4 _154; - _154.x = 0.5 * (temp_var_hullMainRetVal[1u].TessellationMultiplier + temp_var_hullMainRetVal[2u].TessellationMultiplier); - _154.y = 0.5 * (temp_var_hullMainRetVal[2u].TessellationMultiplier + temp_var_hullMainRetVal[0u].TessellationMultiplier); - _154.z = 0.5 * (temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier); - _154.w = 0.333000004291534423828125 * ((temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier) + temp_var_hullMainRetVal[2u].TessellationMultiplier); - float4 _173 = fast::clamp(_154, float4(1.0), float4(15.0)); - spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[0u] = half(_173.x); - spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[1u] = half(_173.y); - spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[2u] = half(_173.z); - spvTessLevel[gl_PrimitiveID].insideTessellationFactor = half(_173.w); + float4 _151; + _151.x = 0.5 * (temp_var_hullMainRetVal[1u].TessellationMultiplier + temp_var_hullMainRetVal[2u].TessellationMultiplier); + _151.y = 0.5 * (temp_var_hullMainRetVal[2u].TessellationMultiplier + temp_var_hullMainRetVal[0u].TessellationMultiplier); + _151.z = 0.5 * (temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier); + _151.w = 0.333000004291534423828125 * ((temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier) + temp_var_hullMainRetVal[2u].TessellationMultiplier); + float4 _170 = fast::clamp(_151, float4(1.0), float4(15.0)); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[0u] = half(_170.x); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[1u] = half(_170.y); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[2u] = half(_170.z); + spvTessLevel[gl_PrimitiveID].insideTessellationFactor = half(_170.w); } } diff --git a/reference/opt/shaders/asm/comp/atomic-decrement.asm.comp b/reference/opt/shaders/asm/comp/atomic-decrement.asm.comp index 673ca715..87035744 100644 --- a/reference/opt/shaders/asm/comp/atomic-decrement.asm.comp +++ b/reference/opt/shaders/asm/comp/atomic-decrement.asm.comp @@ -10,7 +10,7 @@ layout(binding = 0, r32ui) uniform writeonly uimageBuffer u0; void main() { - uint _29 = atomicAdd(u0_counter.c, uint(-1)); - imageStore(u0, floatBitsToInt(uintBitsToFloat(_29)), uvec4(uint(int(gl_GlobalInvocationID.x)))); + uint _24 = atomicAdd(u0_counter.c, uint(-1)); + imageStore(u0, floatBitsToInt(uintBitsToFloat(_24)), uvec4(uint(int(gl_GlobalInvocationID.x)))); } diff --git a/reference/opt/shaders/asm/comp/atomic-increment.asm.comp b/reference/opt/shaders/asm/comp/atomic-increment.asm.comp index e45ae592..ded7dcd7 100644 --- a/reference/opt/shaders/asm/comp/atomic-increment.asm.comp +++ b/reference/opt/shaders/asm/comp/atomic-increment.asm.comp @@ -10,7 +10,7 @@ layout(binding = 0, r32ui) uniform writeonly uimageBuffer u0; void main() { - uint _29 = atomicAdd(u0_counter.c, 1u); - imageStore(u0, floatBitsToInt(uintBitsToFloat(_29)), uvec4(uint(int(gl_GlobalInvocationID.x)))); + uint _24 = atomicAdd(u0_counter.c, 1u); + imageStore(u0, floatBitsToInt(uintBitsToFloat(_24)), uvec4(uint(int(gl_GlobalInvocationID.x)))); } diff --git a/reference/opt/shaders/asm/comp/builtin-compute-bitcast.asm.comp b/reference/opt/shaders/asm/comp/builtin-compute-bitcast.asm.comp index abb8a797..0b89fa5c 100644 --- a/reference/opt/shaders/asm/comp/builtin-compute-bitcast.asm.comp +++ b/reference/opt/shaders/asm/comp/builtin-compute-bitcast.asm.comp @@ -4,10 +4,10 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; layout(binding = 0, std430) buffer BUF { int values[]; -} _6; +} _8; void main() { - _6.values[int(gl_WorkGroupID.y)] = int(gl_GlobalInvocationID.z); + _8.values[int(gl_WorkGroupID.y)] = int(gl_GlobalInvocationID.z); } diff --git a/reference/opt/shaders/asm/comp/quantize.asm.comp b/reference/opt/shaders/asm/comp/quantize.asm.comp index c0892138..6930e5f4 100644 --- a/reference/opt/shaders/asm/comp/quantize.asm.comp +++ b/reference/opt/shaders/asm/comp/quantize.asm.comp @@ -7,13 +7,13 @@ layout(binding = 0, std430) buffer SSBO0 vec2 vec2_val; vec3 vec3_val; vec4 vec4_val; -} _4; +} _12; void main() { - _4.scalar = unpackHalf2x16(packHalf2x16(vec2(_4.scalar))).x; - _4.vec2_val = unpackHalf2x16(packHalf2x16(_4.vec2_val)); - _4.vec3_val = vec3(unpackHalf2x16(packHalf2x16(_4.vec3_val.xy)), unpackHalf2x16(packHalf2x16(_4.vec3_val.zz)).x); - _4.vec4_val = vec4(unpackHalf2x16(packHalf2x16(_4.vec4_val.xy)), unpackHalf2x16(packHalf2x16(_4.vec4_val.zw))); + _12.scalar = unpackHalf2x16(packHalf2x16(vec2(_12.scalar))).x; + _12.vec2_val = unpackHalf2x16(packHalf2x16(_12.vec2_val)); + _12.vec3_val = vec3(unpackHalf2x16(packHalf2x16(_12.vec3_val.xy)), unpackHalf2x16(packHalf2x16(_12.vec3_val.zz)).x); + _12.vec4_val = vec4(unpackHalf2x16(packHalf2x16(_12.vec4_val.xy)), unpackHalf2x16(packHalf2x16(_12.vec4_val.zw))); } diff --git a/reference/opt/shaders/asm/comp/specialization-constant-workgroup.asm.comp b/reference/opt/shaders/asm/comp/specialization-constant-workgroup.asm.comp index 8016ebaf..e16bd191 100644 --- a/reference/opt/shaders/asm/comp/specialization-constant-workgroup.asm.comp +++ b/reference/opt/shaders/asm/comp/specialization-constant-workgroup.asm.comp @@ -12,10 +12,10 @@ layout(local_size_x = SPIRV_CROSS_CONSTANT_ID_10, local_size_y = 20, local_size_ layout(binding = 0, std430) buffer SSBO { float a; -} _4; +} _6; void main() { - _4.a += 1.0; + _6.a += 1.0; } diff --git a/reference/opt/shaders/asm/comp/switch-break-ladder.asm.invalid.comp b/reference/opt/shaders/asm/comp/switch-break-ladder.asm.invalid.comp index f326869c..a22f3c43 100644 --- a/reference/opt/shaders/asm/comp/switch-break-ladder.asm.invalid.comp +++ b/reference/opt/shaders/asm/comp/switch-break-ladder.asm.invalid.comp @@ -14,21 +14,21 @@ void main() int a; for (;;) { - bool _22_ladder_break = false; + bool _17_ladder_break = false; switch (c) { case 5: { for (;;) { - bool _30_ladder_break = false; + bool _25_ladder_break = false; switch (o.d) { case 10: case 20: { c += c; - _30_ladder_break = true; + _25_ladder_break = true; break; } default: @@ -36,7 +36,7 @@ void main() continue; } } - if (_30_ladder_break) + if (_25_ladder_break) { break; } @@ -48,11 +48,11 @@ void main() case 3: { a = c; - _22_ladder_break = true; + _17_ladder_break = true; break; } } - if (_22_ladder_break) + if (_17_ladder_break) { break; } 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 d68f84b4..507e1787 100644 --- a/reference/opt/shaders/asm/frag/complex-name-workarounds.asm.frag +++ b/reference/opt/shaders/asm/frag/complex-name-workarounds.asm.frag @@ -6,10 +6,10 @@ layout(location = 0) out vec4 b; void main() { - vec4 _28 = (_ + a) + _; - b = _28; + vec4 _32 = (_ + a) + _; + b = _32; b = _; - b = _28; + b = _32; b = _; } diff --git a/reference/opt/shaders/asm/frag/for-loop-phi-only-continue.asm.frag b/reference/opt/shaders/asm/frag/for-loop-phi-only-continue.asm.frag index 7a78d00b..3d6484d4 100644 --- a/reference/opt/shaders/asm/frag/for-loop-phi-only-continue.asm.frag +++ b/reference/opt/shaders/asm/frag/for-loop-phi-only-continue.asm.frag @@ -4,14 +4,14 @@ layout(location = 0) out vec4 FragColor; void main() { - float _19; - _19 = 0.0; - for (int _22 = 0; _22 < 16; ) + float _50; + _50 = 0.0; + for (int _47 = 0; _47 < 16; ) { - _19 += 1.0; - _22++; + _50 += 1.0; + _47++; continue; } - FragColor = vec4(_19); + FragColor = vec4(_50); } diff --git a/reference/opt/shaders/asm/frag/image-fetch-no-sampler.asm.vk.frag b/reference/opt/shaders/asm/frag/image-fetch-no-sampler.asm.vk.frag index 350142d4..fe3bedec 100644 --- a/reference/opt/shaders/asm/frag/image-fetch-no-sampler.asm.vk.frag +++ b/reference/opt/shaders/asm/frag/image-fetch-no-sampler.asm.vk.frag @@ -7,7 +7,7 @@ layout(location = 0) out vec4 _entryPointOutput; void main() { - ivec2 _154 = ivec3(int(gl_FragCoord.x * 1280.0), int(gl_FragCoord.y * 720.0), 0).xy; - _entryPointOutput = ((texelFetch(SPIRV_Cross_CombinedSampledImageSPIRV_Cross_DummySampler, _154, 0) + texelFetch(SPIRV_Cross_CombinedSampledImageSPIRV_Cross_DummySampler, _154, 0)) + texture(SPIRV_Cross_CombinedSampledImageSampler, gl_FragCoord.xy)) + texture(SPIRV_Cross_CombinedSampledImageSampler, gl_FragCoord.xy); + ivec2 _160 = ivec3(int(gl_FragCoord.x * 1280.0), int(gl_FragCoord.y * 720.0), 0).xy; + _entryPointOutput = ((texelFetch(SPIRV_Cross_CombinedSampledImageSPIRV_Cross_DummySampler, _160, 0) + texelFetch(SPIRV_Cross_CombinedSampledImageSPIRV_Cross_DummySampler, _160, 0)) + texture(SPIRV_Cross_CombinedSampledImageSampler, gl_FragCoord.xy)) + texture(SPIRV_Cross_CombinedSampledImageSampler, gl_FragCoord.xy); } diff --git a/reference/opt/shaders/asm/frag/image-fetch-no-sampler.asm.vk.frag.vk b/reference/opt/shaders/asm/frag/image-fetch-no-sampler.asm.vk.frag.vk index b898b01b..87328809 100644 --- a/reference/opt/shaders/asm/frag/image-fetch-no-sampler.asm.vk.frag.vk +++ b/reference/opt/shaders/asm/frag/image-fetch-no-sampler.asm.vk.frag.vk @@ -8,7 +8,7 @@ layout(location = 0) out vec4 _entryPointOutput; void main() { - ivec2 _154 = ivec3(int(gl_FragCoord.x * 1280.0), int(gl_FragCoord.y * 720.0), 0).xy; - _entryPointOutput = ((texelFetch(SampledImage, _154, 0) + texelFetch(SampledImage, _154, 0)) + texture(sampler2D(SampledImage, Sampler), gl_FragCoord.xy)) + texture(sampler2D(SampledImage, Sampler), gl_FragCoord.xy); + ivec2 _160 = ivec3(int(gl_FragCoord.x * 1280.0), int(gl_FragCoord.y * 720.0), 0).xy; + _entryPointOutput = ((texelFetch(SampledImage, _160, 0) + texelFetch(SampledImage, _160, 0)) + texture(sampler2D(SampledImage, Sampler), gl_FragCoord.xy)) + texture(sampler2D(SampledImage, Sampler), gl_FragCoord.xy); } diff --git a/reference/opt/shaders/asm/frag/image-fetch-no-sampler.no-samplerless.asm.vk.frag b/reference/opt/shaders/asm/frag/image-fetch-no-sampler.no-samplerless.asm.vk.frag index 350142d4..fe3bedec 100644 --- a/reference/opt/shaders/asm/frag/image-fetch-no-sampler.no-samplerless.asm.vk.frag +++ b/reference/opt/shaders/asm/frag/image-fetch-no-sampler.no-samplerless.asm.vk.frag @@ -7,7 +7,7 @@ layout(location = 0) out vec4 _entryPointOutput; void main() { - ivec2 _154 = ivec3(int(gl_FragCoord.x * 1280.0), int(gl_FragCoord.y * 720.0), 0).xy; - _entryPointOutput = ((texelFetch(SPIRV_Cross_CombinedSampledImageSPIRV_Cross_DummySampler, _154, 0) + texelFetch(SPIRV_Cross_CombinedSampledImageSPIRV_Cross_DummySampler, _154, 0)) + texture(SPIRV_Cross_CombinedSampledImageSampler, gl_FragCoord.xy)) + texture(SPIRV_Cross_CombinedSampledImageSampler, gl_FragCoord.xy); + ivec2 _160 = ivec3(int(gl_FragCoord.x * 1280.0), int(gl_FragCoord.y * 720.0), 0).xy; + _entryPointOutput = ((texelFetch(SPIRV_Cross_CombinedSampledImageSPIRV_Cross_DummySampler, _160, 0) + texelFetch(SPIRV_Cross_CombinedSampledImageSPIRV_Cross_DummySampler, _160, 0)) + texture(SPIRV_Cross_CombinedSampledImageSampler, gl_FragCoord.xy)) + texture(SPIRV_Cross_CombinedSampledImageSampler, gl_FragCoord.xy); } diff --git a/reference/opt/shaders/asm/frag/image-fetch-no-sampler.no-samplerless.asm.vk.frag.vk b/reference/opt/shaders/asm/frag/image-fetch-no-sampler.no-samplerless.asm.vk.frag.vk index 21797b4c..020988f1 100644 --- a/reference/opt/shaders/asm/frag/image-fetch-no-sampler.no-samplerless.asm.vk.frag.vk +++ b/reference/opt/shaders/asm/frag/image-fetch-no-sampler.no-samplerless.asm.vk.frag.vk @@ -8,7 +8,7 @@ layout(location = 0) out vec4 _entryPointOutput; void main() { - ivec2 _154 = ivec3(int(gl_FragCoord.x * 1280.0), int(gl_FragCoord.y * 720.0), 0).xy; - _entryPointOutput = ((texelFetch(sampler2D(SampledImage, SPIRV_Cross_DummySampler), _154, 0) + texelFetch(sampler2D(SampledImage, SPIRV_Cross_DummySampler), _154, 0)) + texture(sampler2D(SampledImage, Sampler), gl_FragCoord.xy)) + texture(sampler2D(SampledImage, Sampler), gl_FragCoord.xy); + ivec2 _160 = ivec3(int(gl_FragCoord.x * 1280.0), int(gl_FragCoord.y * 720.0), 0).xy; + _entryPointOutput = ((texelFetch(sampler2D(SampledImage, SPIRV_Cross_DummySampler), _160, 0) + texelFetch(sampler2D(SampledImage, SPIRV_Cross_DummySampler), _160, 0)) + texture(sampler2D(SampledImage, Sampler), gl_FragCoord.xy)) + texture(sampler2D(SampledImage, Sampler), gl_FragCoord.xy); } diff --git a/reference/opt/shaders/asm/frag/implicit-read-dep-phi.asm.frag b/reference/opt/shaders/asm/frag/implicit-read-dep-phi.asm.frag index 8a7f64d7..e2bac3f9 100644 --- a/reference/opt/shaders/asm/frag/implicit-read-dep-phi.asm.frag +++ b/reference/opt/shaders/asm/frag/implicit-read-dep-phi.asm.frag @@ -8,22 +8,22 @@ layout(location = 0) out vec4 FragColor; void main() { float phi; - vec4 _36; - int _51; - _51 = 0; + vec4 _45; + int _57; + _57 = 0; phi = 1.0; - _36 = vec4(1.0, 2.0, 1.0, 2.0); + _45 = vec4(1.0, 2.0, 1.0, 2.0); for (;;) { - FragColor = _36; - if (_51 < 4) + FragColor = _45; + if (_57 < 4) { - if (v0[_51] > 0.0) + if (v0[_57] > 0.0) { - vec2 _48 = vec2(phi); - _51++; + vec2 _43 = vec2(phi); + _57++; phi += 2.0; - _36 = textureLod(uImage, _48, 0.0); + _45 = textureLod(uImage, _43, 0.0); continue; } else diff --git a/reference/opt/shaders/asm/frag/line-directive.line.asm.frag b/reference/opt/shaders/asm/frag/line-directive.line.asm.frag index 4682d79e..f3ee0d6a 100644 --- a/reference/opt/shaders/asm/frag/line-directive.line.asm.frag +++ b/reference/opt/shaders/asm/frag/line-directive.line.asm.frag @@ -23,14 +23,14 @@ void main() FragColor = 4.0; } #line 19 "test.frag" - for (int _127 = 0; float(_127) < (40.0 + vColor); ) + for (int _131 = 0; float(_131) < (40.0 + vColor); ) { #line 21 "test.frag" FragColor += 0.20000000298023223876953125; #line 22 "test.frag" FragColor += 0.300000011920928955078125; #line 19 "test.frag" - _127 += (int(vColor) + 5); + _131 += (int(vColor) + 5); continue; } #line 25 "test.frag" diff --git a/reference/opt/shaders/asm/frag/locations-components.asm.frag b/reference/opt/shaders/asm/frag/locations-components.asm.frag index b1e37843..ed8112d9 100644 --- a/reference/opt/shaders/asm/frag/locations-components.asm.frag +++ b/reference/opt/shaders/asm/frag/locations-components.asm.frag @@ -1,21 +1,21 @@ #version 450 -layout(location = 1) in vec2 _2; -layout(location = 1, component = 2) in float _3; -layout(location = 2) flat in float _4; -layout(location = 2, component = 1) flat in uint _5; -layout(location = 2, component = 2) flat in uint _6; +layout(location = 1) in vec2 _8; +layout(location = 1, component = 2) in float _16; +layout(location = 2) flat in float _22; +layout(location = 2, component = 1) flat in uint _28; +layout(location = 2, component = 2) flat in uint _33; layout(location = 0) out vec4 o0; vec4 v1; vec4 v2; void main() { - v1 = vec4(_2.x, _2.y, v1.z, v1.w); - v1.z = _3; - v2.x = _4; - v2.y = uintBitsToFloat(_5); - v2.z = uintBitsToFloat(_6); + v1 = vec4(_8.x, _8.y, v1.z, v1.w); + v1.z = _16; + v2.x = _22; + v2.y = uintBitsToFloat(_28); + v2.z = uintBitsToFloat(_33); o0.y = float(floatBitsToUint(intBitsToFloat(floatBitsToInt(v2.y) + floatBitsToInt(v2.z)))); o0.x = v1.y + v2.x; o0 = vec4(o0.x, o0.y, v1.z, v1.x); diff --git a/reference/opt/shaders/asm/frag/loop-body-dominator-continue-access.asm.frag b/reference/opt/shaders/asm/frag/loop-body-dominator-continue-access.asm.frag index eb16828e..7cad91c7 100644 --- a/reference/opt/shaders/asm/frag/loop-body-dominator-continue-access.asm.frag +++ b/reference/opt/shaders/asm/frag/loop-body-dominator-continue-access.asm.frag @@ -12,14 +12,14 @@ #define SPIRV_CROSS_LOOP #endif -int _231; +int _239; layout(binding = 0, std140) uniform Foo { layout(row_major) mat4 lightVP[64]; uint shadowCascadesNum; int test; -} _11; +} _16; layout(location = 0) in vec3 fragWorld; layout(location = 0) out int _entryPointOutput; @@ -28,56 +28,56 @@ mat4 spvWorkaroundRowMajor(mat4 wrap) { return wrap; } void main() { - int _228; + int _236; do { - bool _225; - int _229; - uint _222 = 0u; + bool _233; + int _237; + uint _230 = 0u; SPIRV_CROSS_UNROLL for (;;) { - if (_222 < _11.shadowCascadesNum) + if (_230 < _16.shadowCascadesNum) { - mat4 _223; + mat4 _231; do { - if (_11.test == 0) + if (_16.test == 0) { - _223 = 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)); + _231 = 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)); break; } - _223 = 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)); + _231 = 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)); break; } while(false); - vec4 _170 = (_223 * spvWorkaroundRowMajor(_11.lightVP[_222])) * vec4(fragWorld, 1.0); - float _172 = _170.z; - float _179 = _170.x; - float _181 = _170.y; - if ((((_172 >= 0.0) && (_172 <= 1.0)) && (max(_179, _181) <= 1.0)) && (min(_179, _181) >= 0.0)) + vec4 _178 = (_231 * spvWorkaroundRowMajor(_16.lightVP[_230])) * vec4(fragWorld, 1.0); + float _180 = _178.z; + float _187 = _178.x; + float _189 = _178.y; + if ((((_180 >= 0.0) && (_180 <= 1.0)) && (max(_187, _189) <= 1.0)) && (min(_187, _189) >= 0.0)) { - _229 = int(_222); - _225 = true; + _237 = int(_230); + _233 = true; break; } - _222++; + _230++; continue; } else { - _229 = _231; - _225 = false; + _237 = _239; + _233 = false; break; } } - if (_225) + if (_233) { - _228 = _229; + _236 = _237; break; } - _228 = -1; + _236 = -1; break; } while(false); - _entryPointOutput = _228; + _entryPointOutput = _236; } diff --git a/reference/opt/shaders/asm/frag/loop-header-to-continue.asm.frag b/reference/opt/shaders/asm/frag/loop-header-to-continue.asm.frag index 97d3b74f..55e226d0 100644 --- a/reference/opt/shaders/asm/frag/loop-header-to-continue.asm.frag +++ b/reference/opt/shaders/asm/frag/loop-header-to-continue.asm.frag @@ -13,7 +13,7 @@ struct Params layout(binding = 1, std140) uniform CB1 { Params CB1; -} _8; +} _12; uniform sampler2D SPIRV_Cross_CombinedmapTexturemapSampler; @@ -22,25 +22,25 @@ layout(location = 0) out vec4 _entryPointOutput; void main() { - vec2 _45 = vec2(0.0, _8.CB1.TextureSize.w); - vec4 _49 = texture(SPIRV_Cross_CombinedmapTexturemapSampler, IN_uv); - float _50 = _49.y; - float _53 = clamp(_50 * 0.06399999558925628662109375, 7.999999797903001308441162109375e-05, 0.008000000379979610443115234375); - float _55; - float _58; - _55 = 0.0; - _58 = 0.0; - for (int _60 = -3; _60 <= 3; ) + vec2 _180 = vec2(0.0, _12.CB1.TextureSize.w); + vec4 _206 = texture(SPIRV_Cross_CombinedmapTexturemapSampler, IN_uv); + float _207 = _206.y; + float _211 = clamp(_207 * 0.06399999558925628662109375, 7.999999797903001308441162109375e-05, 0.008000000379979610443115234375); + float _276; + float _277; + _276 = 0.0; + _277 = 0.0; + for (int _278 = -3; _278 <= 3; ) { - float _64 = float(_60); - float _68 = exp(((-_64) * _64) * 0.2222220003604888916015625); - vec4 _72 = texture(SPIRV_Cross_CombinedmapTexturemapSampler, IN_uv + (_45 * _64)); - float _77 = float(abs(_72.y - _50) < _53); - _55 = fma(_72.x, _68 * _77, _55); - _58 = fma(_68, _77, _58); - _60++; + float _220 = float(_278); + float _227 = exp(((-_220) * _220) * 0.2222220003604888916015625); + vec4 _236 = texture(SPIRV_Cross_CombinedmapTexturemapSampler, IN_uv + (_180 * _220)); + float _245 = float(abs(_236.y - _207) < _211); + _276 = fma(_236.x, _227 * _245, _276); + _277 = fma(_227, _245, _277); + _278++; continue; } - _entryPointOutput = vec4(_55 / _58, _50, 0.0, 1.0); + _entryPointOutput = vec4(_276 / _277, _207, 0.0, 1.0); } diff --git a/reference/opt/shaders/asm/frag/lut-promotion-initializer.asm.frag b/reference/opt/shaders/asm/frag/lut-promotion-initializer.asm.frag index d88c0e36..e52b4575 100644 --- a/reference/opt/shaders/asm/frag/lut-promotion-initializer.asm.frag +++ b/reference/opt/shaders/asm/frag/lut-promotion-initializer.asm.frag @@ -2,41 +2,41 @@ precision mediump float; precision highp int; -const float _46[16] = float[](1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0); -const vec4 _76[4] = vec4[](vec4(0.0), vec4(1.0), vec4(8.0), vec4(5.0)); +const float _16[16] = float[](1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0); +const vec4 _60[4] = vec4[](vec4(0.0), vec4(1.0), vec4(8.0), vec4(5.0)); layout(location = 0) out float FragColor; layout(location = 0) flat in mediump int index; void main() { - vec4 foobar[4] = _76; - vec4 baz[4] = _76; - FragColor = _46[index]; + vec4 foobar[4] = _60; + vec4 baz[4] = _60; + FragColor = _16[index]; if (index < 10) { - FragColor += _46[index ^ 1]; + FragColor += _16[index ^ 1]; } else { - FragColor += _46[index & 1]; + FragColor += _16[index & 1]; } - bool _99 = index > 30; - if (_99) + bool _63 = index > 30; + if (_63) { - FragColor += _76[index & 3].y; + FragColor += _60[index & 3].y; } else { - FragColor += _76[index & 1].x; + FragColor += _60[index & 1].x; } - if (_99) + if (_63) { foobar[1].z = 20.0; } - mediump int _37 = index & 3; - FragColor += foobar[_37].z; + mediump int _91 = index & 3; + FragColor += foobar[_91].z; baz = vec4[](vec4(20.0), vec4(30.0), vec4(50.0), vec4(60.0)); - FragColor += baz[_37].z; + FragColor += baz[_91].z; } diff --git a/reference/opt/shaders/asm/frag/op-phi-swap-continue-block.asm.frag b/reference/opt/shaders/asm/frag/op-phi-swap-continue-block.asm.frag index ee45619a..4de1702f 100644 --- a/reference/opt/shaders/asm/frag/op-phi-swap-continue-block.asm.frag +++ b/reference/opt/shaders/asm/frag/op-phi-swap-continue-block.asm.frag @@ -5,25 +5,25 @@ layout(binding = 0, std140) uniform UBO int uCount; int uJ; int uK; -} _5; +} _7; layout(location = 0) out float FragColor; void main() { - int _23; - int _23_copy; - int _24; - _23 = _5.uK; - _24 = _5.uJ; - for (int _26 = 0; _26 < _5.uCount; ) + int _53; + int _54; + int _54_copy; + _54 = _7.uK; + _53 = _7.uJ; + for (int _52 = 0; _52 < _7.uCount; ) { - _23_copy = _23; - _23 = _24; - _24 = _23_copy; - _26++; + _54_copy = _54; + _54 = _53; + _53 = _54_copy; + _52++; continue; } - FragColor = float(_24 - _23) * float(_5.uJ * _5.uK); + FragColor = float(_53 - _54) * float(_7.uJ * _7.uK); } diff --git a/reference/opt/shaders/asm/frag/storage-class-output-initializer.asm.frag b/reference/opt/shaders/asm/frag/storage-class-output-initializer.asm.frag index a5faaefb..b839921a 100644 --- a/reference/opt/shaders/asm/frag/storage-class-output-initializer.asm.frag +++ b/reference/opt/shaders/asm/frag/storage-class-output-initializer.asm.frag @@ -2,12 +2,12 @@ layout(location = 0) out vec4 FragColors[2]; layout(location = 2) out vec4 FragColor; -const vec4 _3_init[2] = vec4[](vec4(1.0, 2.0, 3.0, 4.0), vec4(10.0)); -const vec4 _4_init = vec4(5.0); +const vec4 _4_init[2] = vec4[](vec4(1.0, 2.0, 3.0, 4.0), vec4(10.0)); +const vec4 _6_init = vec4(5.0); void main() { - FragColors = _3_init; - FragColor = _4_init; + FragColors = _4_init; + FragColor = _6_init; } diff --git a/reference/opt/shaders/asm/frag/struct-composite-extract-swizzle.asm.frag b/reference/opt/shaders/asm/frag/struct-composite-extract-swizzle.asm.frag index 7930ca3b..396b9813 100644 --- a/reference/opt/shaders/asm/frag/struct-composite-extract-swizzle.asm.frag +++ b/reference/opt/shaders/asm/frag/struct-composite-extract-swizzle.asm.frag @@ -8,7 +8,7 @@ struct Foo float var2; }; -Foo _22; +Foo _33; layout(binding = 0) uniform mediump sampler2D uSampler; @@ -16,6 +16,6 @@ layout(location = 0) out vec4 FragColor; void main() { - FragColor = texture(uSampler, vec2(_22.var1, _22.var2)); + FragColor = texture(uSampler, vec2(_33.var1, _33.var2)); } diff --git a/reference/opt/shaders/asm/frag/switch-label-shared-block.asm.frag b/reference/opt/shaders/asm/frag/switch-label-shared-block.asm.frag index 748f96c8..61b45c6d 100644 --- a/reference/opt/shaders/asm/frag/switch-label-shared-block.asm.frag +++ b/reference/opt/shaders/asm/frag/switch-label-shared-block.asm.frag @@ -7,26 +7,26 @@ layout(location = 0) out float FragColor; void main() { - highp float _19; + highp float _27; switch (vIndex) { case 0: case 2: { - _19 = 1.0; + _27 = 1.0; break; } default: { - _19 = 3.0; + _27 = 3.0; break; } case 8: { - _19 = 8.0; + _27 = 8.0; break; } } - FragColor = _19; + FragColor = _27; } diff --git a/reference/opt/shaders/asm/frag/temporary-phi-hoisting.asm.frag b/reference/opt/shaders/asm/frag/temporary-phi-hoisting.asm.frag index ade51d4a..01fd2157 100644 --- a/reference/opt/shaders/asm/frag/temporary-phi-hoisting.asm.frag +++ b/reference/opt/shaders/asm/frag/temporary-phi-hoisting.asm.frag @@ -8,20 +8,20 @@ struct MyStruct layout(binding = 0, std140) uniform MyStruct_CB { MyStruct g_MyStruct[4]; -} _6; +} _8; layout(location = 0) out vec4 _entryPointOutput; void main() { - vec3 _28; - _28 = vec3(0.0); - for (int _31 = 0; _31 < 4; ) + vec3 _85; + _85 = vec3(0.0); + for (int _86 = 0; _86 < 4; ) { - _28 += _6.g_MyStruct[_31].color.xyz; - _31++; + _85 += _8.g_MyStruct[_86].color.xyz; + _86++; continue; } - _entryPointOutput = vec4(_28, 1.0); + _entryPointOutput = vec4(_85, 1.0); } diff --git a/reference/opt/shaders/asm/frag/unreachable.asm.frag b/reference/opt/shaders/asm/frag/unreachable.asm.frag index c8986c12..2459d648 100644 --- a/reference/opt/shaders/asm/frag/unreachable.asm.frag +++ b/reference/opt/shaders/asm/frag/unreachable.asm.frag @@ -5,20 +5,20 @@ layout(location = 0) out vec4 FragColor; void main() { - vec4 _33; + vec4 _46; for (;;) { if (counter == 10) { - _33 = vec4(10.0); + _46 = vec4(10.0); break; } else { - _33 = vec4(30.0); + _46 = vec4(30.0); break; } } - FragColor = _33; + FragColor = _46; } diff --git a/reference/opt/shaders/asm/frag/vector-shuffle-oom.asm.frag b/reference/opt/shaders/asm/frag/vector-shuffle-oom.asm.frag index fcad3fbf..5224748f 100644 --- a/reference/opt/shaders/asm/frag/vector-shuffle-oom.asm.frag +++ b/reference/opt/shaders/asm/frag/vector-shuffle-oom.asm.frag @@ -12,19 +12,19 @@ #define SPIRV_CROSS_LOOP #endif -struct _28 +struct _15 { vec4 _m0; }; -layout(binding = 0, std140) uniform _6_7 +layout(binding = 0, std140) uniform _3_22044 { vec4 _m0; float _m1; vec4 _m2; -} _7; +} _22044; -layout(binding = 2, std140) uniform _10_11 +layout(binding = 2, std140) uniform _4_12348 { vec3 _m0; vec3 _m1; @@ -51,9 +51,9 @@ layout(binding = 2, std140) uniform _10_11 vec4 _m22; layout(row_major) mat4 _m23; vec4 _m24; -} _11; +} _12348; -layout(binding = 1, std140) uniform _18_19 +layout(binding = 1, std140) uniform _7_15259 { layout(row_major) mat4 _m0; layout(row_major) mat4 _m1; @@ -94,204 +94,204 @@ layout(binding = 1, std140) uniform _18_19 vec3 _m36; layout(row_major) mat4 _m37[2]; vec4 _m38[2]; -} _19; +} _15259; uniform sampler2D SPIRV_Cross_Combined; uniform sampler2D SPIRV_Cross_Combined_1; uniform sampler2D SPIRV_Cross_Combined_2; -layout(location = 0) out vec4 _5; +layout(location = 0) out vec4 _4317; void main() { - vec4 _88 = _7._m2 * _7._m0.xyxy; - vec2 _95 = _88.xy; - vec2 _96 = _88.zw; - vec2 _97 = clamp(fma(gl_FragCoord.xy, _19._m23.xy, vec2(0.0, -2.0) * _7._m0.xy), _95, _96); - vec3 _109 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _97, 0.0).w * _7._m1, 0.0, 1.0); - vec4 _113 = textureLod(SPIRV_Cross_Combined_1, _97, 0.0); - float _114 = _113.y; - vec3 _129; + vec4 _17581 = _22044._m2 * _22044._m0.xyxy; + vec2 _7011 = _17581.xy; + vec2 _21058 = _17581.zw; + vec2 _13149 = clamp(fma(gl_FragCoord.xy, _15259._m23.xy, vec2(0.0, -2.0) * _22044._m0.xy), _7011, _21058); + vec3 _12103 = _12348._m5 * clamp(textureLod(SPIRV_Cross_Combined, _13149, 0.0).w * _22044._m1, 0.0, 1.0); + vec4 _17670 = textureLod(SPIRV_Cross_Combined_1, _13149, 0.0); + float _16938 = _17670.y; + vec3 _7719; SPIRV_CROSS_BRANCH - if (_114 > 0.0) + if (_16938 > 0.0) { - _129 = _109 + (textureLod(SPIRV_Cross_Combined_2, _97, 0.0).xyz * clamp(_114 * _113.z, 0.0, 1.0)); + _7719 = _12103 + (textureLod(SPIRV_Cross_Combined_2, _13149, 0.0).xyz * clamp(_16938 * _17670.z, 0.0, 1.0)); } else { - _129 = _109; + _7719 = _12103; } - vec2 _144 = clamp(fma(gl_FragCoord.xy, _19._m23.xy, vec2(-1.0) * _7._m0.xy), _95, _96); - vec3 _156 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _144, 0.0).w * _7._m1, 0.0, 1.0); - vec4 _160 = textureLod(SPIRV_Cross_Combined_1, _144, 0.0); - float _161 = _160.y; - vec3 _176; + vec2 _13150 = clamp(fma(gl_FragCoord.xy, _15259._m23.xy, vec2(-1.0) * _22044._m0.xy), _7011, _21058); + vec3 _12104 = _12348._m5 * clamp(textureLod(SPIRV_Cross_Combined, _13150, 0.0).w * _22044._m1, 0.0, 1.0); + vec4 _17671 = textureLod(SPIRV_Cross_Combined_1, _13150, 0.0); + float _16939 = _17671.y; + vec3 _7720; SPIRV_CROSS_BRANCH - if (_161 > 0.0) + if (_16939 > 0.0) { - _176 = _156 + (textureLod(SPIRV_Cross_Combined_2, _144, 0.0).xyz * clamp(_161 * _160.z, 0.0, 1.0)); + _7720 = _12104 + (textureLod(SPIRV_Cross_Combined_2, _13150, 0.0).xyz * clamp(_16939 * _17671.z, 0.0, 1.0)); } else { - _176 = _156; + _7720 = _12104; } - vec2 _191 = clamp(fma(gl_FragCoord.xy, _19._m23.xy, vec2(0.0, -1.0) * _7._m0.xy), _95, _96); - vec3 _203 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _191, 0.0).w * _7._m1, 0.0, 1.0); - vec4 _207 = textureLod(SPIRV_Cross_Combined_1, _191, 0.0); - float _208 = _207.y; - vec3 _223; + vec2 _13151 = clamp(fma(gl_FragCoord.xy, _15259._m23.xy, vec2(0.0, -1.0) * _22044._m0.xy), _7011, _21058); + vec3 _12105 = _12348._m5 * clamp(textureLod(SPIRV_Cross_Combined, _13151, 0.0).w * _22044._m1, 0.0, 1.0); + vec4 _17672 = textureLod(SPIRV_Cross_Combined_1, _13151, 0.0); + float _16940 = _17672.y; + vec3 _7721; SPIRV_CROSS_BRANCH - if (_208 > 0.0) + if (_16940 > 0.0) { - _223 = _203 + (textureLod(SPIRV_Cross_Combined_2, _191, 0.0).xyz * clamp(_208 * _207.z, 0.0, 1.0)); + _7721 = _12105 + (textureLod(SPIRV_Cross_Combined_2, _13151, 0.0).xyz * clamp(_16940 * _17672.z, 0.0, 1.0)); } else { - _223 = _203; + _7721 = _12105; } - vec2 _238 = clamp(fma(gl_FragCoord.xy, _19._m23.xy, vec2(1.0, -1.0) * _7._m0.xy), _95, _96); - vec3 _250 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _238, 0.0).w * _7._m1, 0.0, 1.0); - vec4 _254 = textureLod(SPIRV_Cross_Combined_1, _238, 0.0); - float _255 = _254.y; - vec3 _270; + vec2 _13152 = clamp(fma(gl_FragCoord.xy, _15259._m23.xy, vec2(1.0, -1.0) * _22044._m0.xy), _7011, _21058); + vec3 _12106 = _12348._m5 * clamp(textureLod(SPIRV_Cross_Combined, _13152, 0.0).w * _22044._m1, 0.0, 1.0); + vec4 _17673 = textureLod(SPIRV_Cross_Combined_1, _13152, 0.0); + float _16941 = _17673.y; + vec3 _7722; SPIRV_CROSS_BRANCH - if (_255 > 0.0) + if (_16941 > 0.0) { - _270 = _250 + (textureLod(SPIRV_Cross_Combined_2, _238, 0.0).xyz * clamp(_255 * _254.z, 0.0, 1.0)); + _7722 = _12106 + (textureLod(SPIRV_Cross_Combined_2, _13152, 0.0).xyz * clamp(_16941 * _17673.z, 0.0, 1.0)); } else { - _270 = _250; + _7722 = _12106; } - vec2 _285 = clamp(fma(gl_FragCoord.xy, _19._m23.xy, vec2(-2.0, 0.0) * _7._m0.xy), _95, _96); - vec3 _297 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _285, 0.0).w * _7._m1, 0.0, 1.0); - vec4 _301 = textureLod(SPIRV_Cross_Combined_1, _285, 0.0); - float _302 = _301.y; - vec3 _317; + vec2 _13153 = clamp(fma(gl_FragCoord.xy, _15259._m23.xy, vec2(-2.0, 0.0) * _22044._m0.xy), _7011, _21058); + vec3 _12107 = _12348._m5 * clamp(textureLod(SPIRV_Cross_Combined, _13153, 0.0).w * _22044._m1, 0.0, 1.0); + vec4 _17674 = textureLod(SPIRV_Cross_Combined_1, _13153, 0.0); + float _16942 = _17674.y; + vec3 _7723; SPIRV_CROSS_BRANCH - if (_302 > 0.0) + if (_16942 > 0.0) { - _317 = _297 + (textureLod(SPIRV_Cross_Combined_2, _285, 0.0).xyz * clamp(_302 * _301.z, 0.0, 1.0)); + _7723 = _12107 + (textureLod(SPIRV_Cross_Combined_2, _13153, 0.0).xyz * clamp(_16942 * _17674.z, 0.0, 1.0)); } else { - _317 = _297; + _7723 = _12107; } - vec2 _332 = clamp(fma(gl_FragCoord.xy, _19._m23.xy, vec2(-1.0, 0.0) * _7._m0.xy), _95, _96); - vec3 _344 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _332, 0.0).w * _7._m1, 0.0, 1.0); - vec4 _348 = textureLod(SPIRV_Cross_Combined_1, _332, 0.0); - float _349 = _348.y; - vec3 _364; + vec2 _13154 = clamp(fma(gl_FragCoord.xy, _15259._m23.xy, vec2(-1.0, 0.0) * _22044._m0.xy), _7011, _21058); + vec3 _12108 = _12348._m5 * clamp(textureLod(SPIRV_Cross_Combined, _13154, 0.0).w * _22044._m1, 0.0, 1.0); + vec4 _17675 = textureLod(SPIRV_Cross_Combined_1, _13154, 0.0); + float _16943 = _17675.y; + vec3 _7724; SPIRV_CROSS_BRANCH - if (_349 > 0.0) + if (_16943 > 0.0) { - _364 = _344 + (textureLod(SPIRV_Cross_Combined_2, _332, 0.0).xyz * clamp(_349 * _348.z, 0.0, 1.0)); + _7724 = _12108 + (textureLod(SPIRV_Cross_Combined_2, _13154, 0.0).xyz * clamp(_16943 * _17675.z, 0.0, 1.0)); } else { - _364 = _344; + _7724 = _12108; } - vec2 _379 = clamp(gl_FragCoord.xy * _19._m23.xy, _95, _96); - vec3 _391 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _379, 0.0).w * _7._m1, 0.0, 1.0); - vec4 _395 = textureLod(SPIRV_Cross_Combined_1, _379, 0.0); - float _396 = _395.y; - vec3 _411; + vec2 _13155 = clamp(gl_FragCoord.xy * _15259._m23.xy, _7011, _21058); + vec3 _12109 = _12348._m5 * clamp(textureLod(SPIRV_Cross_Combined, _13155, 0.0).w * _22044._m1, 0.0, 1.0); + vec4 _17676 = textureLod(SPIRV_Cross_Combined_1, _13155, 0.0); + float _16944 = _17676.y; + vec3 _7725; SPIRV_CROSS_BRANCH - if (_396 > 0.0) + if (_16944 > 0.0) { - _411 = _391 + (textureLod(SPIRV_Cross_Combined_2, _379, 0.0).xyz * clamp(_396 * _395.z, 0.0, 1.0)); + _7725 = _12109 + (textureLod(SPIRV_Cross_Combined_2, _13155, 0.0).xyz * clamp(_16944 * _17676.z, 0.0, 1.0)); } else { - _411 = _391; + _7725 = _12109; } - vec2 _426 = clamp(fma(gl_FragCoord.xy, _19._m23.xy, vec2(1.0, 0.0) * _7._m0.xy), _95, _96); - vec3 _438 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _426, 0.0).w * _7._m1, 0.0, 1.0); - vec4 _442 = textureLod(SPIRV_Cross_Combined_1, _426, 0.0); - float _443 = _442.y; - vec3 _458; + vec2 _13156 = clamp(fma(gl_FragCoord.xy, _15259._m23.xy, vec2(1.0, 0.0) * _22044._m0.xy), _7011, _21058); + vec3 _12110 = _12348._m5 * clamp(textureLod(SPIRV_Cross_Combined, _13156, 0.0).w * _22044._m1, 0.0, 1.0); + vec4 _17677 = textureLod(SPIRV_Cross_Combined_1, _13156, 0.0); + float _16945 = _17677.y; + vec3 _7726; SPIRV_CROSS_BRANCH - if (_443 > 0.0) + if (_16945 > 0.0) { - _458 = _438 + (textureLod(SPIRV_Cross_Combined_2, _426, 0.0).xyz * clamp(_443 * _442.z, 0.0, 1.0)); + _7726 = _12110 + (textureLod(SPIRV_Cross_Combined_2, _13156, 0.0).xyz * clamp(_16945 * _17677.z, 0.0, 1.0)); } else { - _458 = _438; + _7726 = _12110; } - vec2 _473 = clamp(fma(gl_FragCoord.xy, _19._m23.xy, vec2(2.0, 0.0) * _7._m0.xy), _95, _96); - vec3 _485 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _473, 0.0).w * _7._m1, 0.0, 1.0); - vec4 _489 = textureLod(SPIRV_Cross_Combined_1, _473, 0.0); - float _490 = _489.y; - vec3 _505; + vec2 _13157 = clamp(fma(gl_FragCoord.xy, _15259._m23.xy, vec2(2.0, 0.0) * _22044._m0.xy), _7011, _21058); + vec3 _12111 = _12348._m5 * clamp(textureLod(SPIRV_Cross_Combined, _13157, 0.0).w * _22044._m1, 0.0, 1.0); + vec4 _17678 = textureLod(SPIRV_Cross_Combined_1, _13157, 0.0); + float _16946 = _17678.y; + vec3 _7727; SPIRV_CROSS_BRANCH - if (_490 > 0.0) + if (_16946 > 0.0) { - _505 = _485 + (textureLod(SPIRV_Cross_Combined_2, _473, 0.0).xyz * clamp(_490 * _489.z, 0.0, 1.0)); + _7727 = _12111 + (textureLod(SPIRV_Cross_Combined_2, _13157, 0.0).xyz * clamp(_16946 * _17678.z, 0.0, 1.0)); } else { - _505 = _485; + _7727 = _12111; } - vec2 _520 = clamp(fma(gl_FragCoord.xy, _19._m23.xy, vec2(-1.0, 1.0) * _7._m0.xy), _95, _96); - vec3 _532 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _520, 0.0).w * _7._m1, 0.0, 1.0); - vec4 _536 = textureLod(SPIRV_Cross_Combined_1, _520, 0.0); - float _537 = _536.y; - vec3 _552; + vec2 _13158 = clamp(fma(gl_FragCoord.xy, _15259._m23.xy, vec2(-1.0, 1.0) * _22044._m0.xy), _7011, _21058); + vec3 _12112 = _12348._m5 * clamp(textureLod(SPIRV_Cross_Combined, _13158, 0.0).w * _22044._m1, 0.0, 1.0); + vec4 _17679 = textureLod(SPIRV_Cross_Combined_1, _13158, 0.0); + float _16947 = _17679.y; + vec3 _7728; SPIRV_CROSS_BRANCH - if (_537 > 0.0) + if (_16947 > 0.0) { - _552 = _532 + (textureLod(SPIRV_Cross_Combined_2, _520, 0.0).xyz * clamp(_537 * _536.z, 0.0, 1.0)); + _7728 = _12112 + (textureLod(SPIRV_Cross_Combined_2, _13158, 0.0).xyz * clamp(_16947 * _17679.z, 0.0, 1.0)); } else { - _552 = _532; + _7728 = _12112; } - vec2 _567 = clamp(fma(gl_FragCoord.xy, _19._m23.xy, vec2(0.0, 1.0) * _7._m0.xy), _95, _96); - vec3 _579 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _567, 0.0).w * _7._m1, 0.0, 1.0); - vec4 _583 = textureLod(SPIRV_Cross_Combined_1, _567, 0.0); - float _584 = _583.y; - vec3 _599; + vec2 _13159 = clamp(fma(gl_FragCoord.xy, _15259._m23.xy, vec2(0.0, 1.0) * _22044._m0.xy), _7011, _21058); + vec3 _12113 = _12348._m5 * clamp(textureLod(SPIRV_Cross_Combined, _13159, 0.0).w * _22044._m1, 0.0, 1.0); + vec4 _17680 = textureLod(SPIRV_Cross_Combined_1, _13159, 0.0); + float _16948 = _17680.y; + vec3 _7729; SPIRV_CROSS_BRANCH - if (_584 > 0.0) + if (_16948 > 0.0) { - _599 = _579 + (textureLod(SPIRV_Cross_Combined_2, _567, 0.0).xyz * clamp(_584 * _583.z, 0.0, 1.0)); + _7729 = _12113 + (textureLod(SPIRV_Cross_Combined_2, _13159, 0.0).xyz * clamp(_16948 * _17680.z, 0.0, 1.0)); } else { - _599 = _579; + _7729 = _12113; } - vec2 _614 = clamp(fma(gl_FragCoord.xy, _19._m23.xy, _7._m0.xy), _95, _96); - vec3 _626 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _614, 0.0).w * _7._m1, 0.0, 1.0); - vec4 _630 = textureLod(SPIRV_Cross_Combined_1, _614, 0.0); - float _631 = _630.y; - vec3 _646; + vec2 _13160 = clamp(fma(gl_FragCoord.xy, _15259._m23.xy, _22044._m0.xy), _7011, _21058); + vec3 _12114 = _12348._m5 * clamp(textureLod(SPIRV_Cross_Combined, _13160, 0.0).w * _22044._m1, 0.0, 1.0); + vec4 _17681 = textureLod(SPIRV_Cross_Combined_1, _13160, 0.0); + float _16949 = _17681.y; + vec3 _7730; SPIRV_CROSS_BRANCH - if (_631 > 0.0) + if (_16949 > 0.0) { - _646 = _626 + (textureLod(SPIRV_Cross_Combined_2, _614, 0.0).xyz * clamp(_631 * _630.z, 0.0, 1.0)); + _7730 = _12114 + (textureLod(SPIRV_Cross_Combined_2, _13160, 0.0).xyz * clamp(_16949 * _17681.z, 0.0, 1.0)); } else { - _646 = _626; + _7730 = _12114; } - vec2 _661 = clamp(fma(gl_FragCoord.xy, _19._m23.xy, vec2(0.0, 2.0) * _7._m0.xy), _95, _96); - vec3 _673 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _661, 0.0).w * _7._m1, 0.0, 1.0); - vec4 _677 = textureLod(SPIRV_Cross_Combined_1, _661, 0.0); - float _678 = _677.y; - vec3 _693; + vec2 _13161 = clamp(fma(gl_FragCoord.xy, _15259._m23.xy, vec2(0.0, 2.0) * _22044._m0.xy), _7011, _21058); + vec3 _12115 = _12348._m5 * clamp(textureLod(SPIRV_Cross_Combined, _13161, 0.0).w * _22044._m1, 0.0, 1.0); + vec4 _17682 = textureLod(SPIRV_Cross_Combined_1, _13161, 0.0); + float _16950 = _17682.y; + vec3 _7731; SPIRV_CROSS_BRANCH - if (_678 > 0.0) + if (_16950 > 0.0) { - _693 = _673 + (textureLod(SPIRV_Cross_Combined_2, _661, 0.0).xyz * clamp(_678 * _677.z, 0.0, 1.0)); + _7731 = _12115 + (textureLod(SPIRV_Cross_Combined_2, _13161, 0.0).xyz * clamp(_16950 * _17682.z, 0.0, 1.0)); } else { - _693 = _673; + _7731 = _12115; } - vec3 _702 = (((((((((((((_129 * 0.5).xyz + (_176 * 0.5)).xyz + (_223 * 0.75)).xyz + (_270 * 0.5)).xyz + (_317 * 0.5)).xyz + (_364 * 0.75)).xyz + (_411 * 1.0)).xyz + (_458 * 0.75)).xyz + (_505 * 0.5)).xyz + (_552 * 0.5)).xyz + (_599 * 0.75)).xyz + (_646 * 0.5)).xyz + (_693 * 0.5)).xyz * vec3(0.125); - _28 _750 = _28(vec4(_702.x, _702.y, _702.z, vec4(0.0).w)); - _750._m0.w = 1.0; - _5 = _750._m0; + vec3 _13750 = (((((((((((((_7719 * 0.5).xyz + (_7720 * 0.5)).xyz + (_7721 * 0.75)).xyz + (_7722 * 0.5)).xyz + (_7723 * 0.5)).xyz + (_7724 * 0.75)).xyz + (_7725 * 1.0)).xyz + (_7726 * 0.75)).xyz + (_7727 * 0.5)).xyz + (_7728 * 0.5)).xyz + (_7729 * 0.75)).xyz + (_7730 * 0.5)).xyz + (_7731 * 0.5)).xyz * vec3(0.125); + _15 _25050 = _15(vec4(_13750.x, _13750.y, _13750.z, vec4(0.0).w)); + _25050._m0.w = 1.0; + _4317 = _25050._m0; } diff --git a/reference/opt/shaders/asm/vert/spec-constant-op-composite.asm.vk.vert b/reference/opt/shaders/asm/vert/spec-constant-op-composite.asm.vk.vert index 3d9ad3b4..00ef42d8 100644 --- a/reference/opt/shaders/asm/vert/spec-constant-op-composite.asm.vk.vert +++ b/reference/opt/shaders/asm/vert/spec-constant-op-composite.asm.vk.vert @@ -3,28 +3,28 @@ #ifndef SPIRV_CROSS_CONSTANT_ID_201 #define SPIRV_CROSS_CONSTANT_ID_201 -10 #endif -const int _7 = SPIRV_CROSS_CONSTANT_ID_201; -const int _20 = (_7 + 2); +const int _13 = SPIRV_CROSS_CONSTANT_ID_201; +const int _15 = (_13 + 2); #ifndef SPIRV_CROSS_CONSTANT_ID_202 #define SPIRV_CROSS_CONSTANT_ID_202 100u #endif -const uint _8 = SPIRV_CROSS_CONSTANT_ID_202; -const uint _25 = (_8 % 5u); -const int _30 = _7 - (-3) * (_7 / (-3)); -const ivec4 _32 = ivec4(20, 30, _20, _30); -const ivec2 _34 = ivec2(_32.y, _32.x); -const int _35 = _32.y; +const uint _24 = SPIRV_CROSS_CONSTANT_ID_202; +const uint _26 = (_24 % 5u); +const int _61 = _13 - (-3) * (_13 / (-3)); +const ivec4 _36 = ivec4(20, 30, _15, _61); +const ivec2 _41 = ivec2(_36.y, _36.x); +const int _62 = _36.y; -layout(location = 0) flat out int _4; +layout(location = 0) flat out int _58; void main() { vec4 _65 = vec4(0.0); - _65.y = float(_20); - _65.z = float(_25); - vec4 _54 = _65 + vec4(_32); - vec2 _58 = _54.xy + vec2(_34); - gl_Position = vec4(_58.x, _58.y, _54.z, _54.w); - _4 = _35; + _65.y = float(_15); + _65.z = float(_26); + vec4 _39 = _65 + vec4(_36); + vec2 _46 = _39.xy + vec2(_41); + gl_Position = vec4(_46.x, _46.y, _39.z, _39.w); + _58 = _62; } diff --git a/reference/opt/shaders/asm/vert/spec-constant-op-composite.asm.vk.vert.vk b/reference/opt/shaders/asm/vert/spec-constant-op-composite.asm.vk.vert.vk index ed9d98e9..3c38b68e 100644 --- a/reference/opt/shaders/asm/vert/spec-constant-op-composite.asm.vk.vert.vk +++ b/reference/opt/shaders/asm/vert/spec-constant-op-composite.asm.vk.vert.vk @@ -1,28 +1,28 @@ #version 450 -layout(constant_id = 201) const int _7 = -10; -const int _20 = (_7 + 2); -layout(constant_id = 202) const uint _8 = 100u; -const uint _25 = (_8 % 5u); -const int _30 = _7 - (-3) * (_7 / (-3)); -const ivec4 _32 = ivec4(20, 30, _20, _30); -const ivec2 _34 = ivec2(_32.y, _32.x); -const int _35 = _32.y; +layout(constant_id = 201) const int _13 = -10; +const int _15 = (_13 + 2); +layout(constant_id = 202) const uint _24 = 100u; +const uint _26 = (_24 % 5u); +const int _61 = _13 - (-3) * (_13 / (-3)); +const ivec4 _36 = ivec4(20, 30, _15, _61); +const ivec2 _41 = ivec2(_36.y, _36.x); +const int _62 = _36.y; -layout(location = 0) flat out int _4; +layout(location = 0) flat out int _58; void main() { - float _42 = float(_20); + float _16 = float(_15); vec4 _65 = vec4(0.0); - _65.y = _42; - float _47 = float(_25); - _65.z = _47; - vec4 _52 = vec4(_32); - vec4 _54 = _65 + _52; - vec2 _55 = vec2(_34); - vec2 _58 = _54.xy + _55; - gl_Position = vec4(_58.x, _58.y, _54.z, _54.w); - _4 = _35; + _65.y = _16; + float _27 = float(_26); + _65.z = _27; + vec4 _37 = vec4(_36); + vec4 _39 = _65 + _37; + vec2 _43 = vec2(_41); + vec2 _46 = _39.xy + _43; + gl_Position = vec4(_46.x, _46.y, _39.z, _39.w); + _58 = _62; } diff --git a/reference/opt/shaders/vulkan/frag/demote-to-helper-forwarding.asm.vk.nocompat.frag.vk b/reference/opt/shaders/vulkan/frag/demote-to-helper-forwarding.asm.vk.nocompat.frag.vk index 15316492..92209f2a 100644 --- a/reference/opt/shaders/vulkan/frag/demote-to-helper-forwarding.asm.vk.nocompat.frag.vk +++ b/reference/opt/shaders/vulkan/frag/demote-to-helper-forwarding.asm.vk.nocompat.frag.vk @@ -5,9 +5,9 @@ layout(location = 0) out vec4 FragColor; void main() { - bool _15 = helperInvocationEXT(); + bool _9 = helperInvocationEXT(); demote; - if (!_15) + if (!_9) { FragColor = vec4(1.0, 0.0, 0.0, 1.0); } diff --git a/reference/shaders-hlsl-no-opt/asm/comp/access-chain-load-store-composite.asm.comp b/reference/shaders-hlsl-no-opt/asm/comp/access-chain-load-store-composite.asm.comp index 986cc628..08ff71dc 100644 --- a/reference/shaders-hlsl-no-opt/asm/comp/access-chain-load-store-composite.asm.comp +++ b/reference/shaders-hlsl-no-opt/asm/comp/access-chain-load-store-composite.asm.comp @@ -18,13 +18,13 @@ struct Foo static const uint3 gl_WorkGroupSize = uint3(1u, 1u, 1u); -RWByteAddressBuffer _10 : register(u0); +RWByteAddressBuffer _12 : register(u0); void comp_main() { Foo _64; - _64.a = asfloat(uint2x2(_10.Load(0), _10.Load(8), _10.Load(4), _10.Load(12))); - _64.b = asfloat(_10.Load2(16)); + _64.a = asfloat(uint2x2(_12.Load(0), _12.Load(8), _12.Load(4), _12.Load(12))); + _64.b = asfloat(_12.Load2(16)); [unroll] for (int _0ident = 0; _0ident < 5; _0ident++) { @@ -34,20 +34,20 @@ void comp_main() [unroll] for (int _2ident = 0; _2ident < 4; _2ident++) { - _64.c[_0ident].d[_1ident][_2ident] = asfloat(_10.Load(_2ident * 4 + _1ident * 16 + _0ident * 40 + 24)); + _64.c[_0ident].d[_1ident][_2ident] = asfloat(_12.Load(_2ident * 4 + _1ident * 16 + _0ident * 40 + 24)); } } [unroll] for (int _3ident = 0; _3ident < 2; _3ident++) { - _64.c[_0ident].baz[_3ident].c = asfloat(_10.Load(_3ident * 4 + _0ident * 40 + 56)); + _64.c[_0ident].baz[_3ident].c = asfloat(_12.Load(_3ident * 4 + _0ident * 40 + 56)); } } - _10.Store(224, asuint(_64.a[0].x)); - _10.Store(228, asuint(_64.a[1].x)); - _10.Store(232, asuint(_64.a[0].y)); - _10.Store(236, asuint(_64.a[1].y)); - _10.Store2(240, asuint(_64.b)); + _12.Store(224, asuint(_64.a[0].x)); + _12.Store(228, asuint(_64.a[1].x)); + _12.Store(232, asuint(_64.a[0].y)); + _12.Store(236, asuint(_64.a[1].y)); + _12.Store2(240, asuint(_64.b)); [unroll] for (int _4ident = 0; _4ident < 5; _4ident++) { @@ -57,13 +57,13 @@ void comp_main() [unroll] for (int _6ident = 0; _6ident < 4; _6ident++) { - _10.Store(_6ident * 4 + _5ident * 16 + _4ident * 40 + 248, asuint(_64.c[_4ident].d[_5ident][_6ident])); + _12.Store(_6ident * 4 + _5ident * 16 + _4ident * 40 + 248, asuint(_64.c[_4ident].d[_5ident][_6ident])); } } [unroll] for (int _7ident = 0; _7ident < 2; _7ident++) { - _10.Store(_7ident * 4 + _4ident * 40 + 280, asuint(_64.c[_4ident].baz[_7ident].c)); + _12.Store(_7ident * 4 + _4ident * 40 + 280, asuint(_64.c[_4ident].baz[_7ident].c)); } } } diff --git a/reference/shaders-hlsl-no-opt/asm/comp/aliased-struct-divergent-member-name.asm.comp b/reference/shaders-hlsl-no-opt/asm/comp/aliased-struct-divergent-member-name.asm.comp index b7515716..74f3e723 100644 --- a/reference/shaders-hlsl-no-opt/asm/comp/aliased-struct-divergent-member-name.asm.comp +++ b/reference/shaders-hlsl-no-opt/asm/comp/aliased-struct-divergent-member-name.asm.comp @@ -3,16 +3,16 @@ struct T float c; }; -static const T _18 = { 40.0f }; +static const T _11 = { 40.0f }; -RWByteAddressBuffer _7 : register(u0); -RWByteAddressBuffer _10 : register(u1); +RWByteAddressBuffer _9 : register(u0); +RWByteAddressBuffer _13 : register(u1); void comp_main() { - T v = _18; - _7.Store(40, asuint(v.c)); - _10.Store(480, asuint(v.c)); + T v = _11; + _9.Store(40, asuint(v.c)); + _13.Store(480, asuint(v.c)); } [numthreads(1, 1, 1)] diff --git a/reference/shaders-hlsl-no-opt/asm/comp/atomic-load-store.asm.comp b/reference/shaders-hlsl-no-opt/asm/comp/atomic-load-store.asm.comp index 4f6a3e34..9bbfb07f 100644 --- a/reference/shaders-hlsl-no-opt/asm/comp/atomic-load-store.asm.comp +++ b/reference/shaders-hlsl-no-opt/asm/comp/atomic-load-store.asm.comp @@ -1,14 +1,14 @@ static const uint3 gl_WorkGroupSize = uint3(1u, 1u, 1u); -RWByteAddressBuffer _5 : register(u0); +RWByteAddressBuffer _7 : register(u0); void comp_main() { - uint _20; - _5.InterlockedAdd(4, 0, _20); - uint c = _20; + uint _16; + _7.InterlockedAdd(4, 0, _16); + uint c = _16; uint _23; - _5.InterlockedExchange(0, c, _23); + _7.InterlockedExchange(0, c, _23); } [numthreads(1, 1, 1)] diff --git a/reference/shaders-hlsl-no-opt/asm/comp/atomic-result-temporary.asm.comp b/reference/shaders-hlsl-no-opt/asm/comp/atomic-result-temporary.asm.comp index 3a03fafe..bad006c5 100644 --- a/reference/shaders-hlsl-no-opt/asm/comp/atomic-result-temporary.asm.comp +++ b/reference/shaders-hlsl-no-opt/asm/comp/atomic-result-temporary.asm.comp @@ -1,4 +1,4 @@ -RWByteAddressBuffer _5 : register(u0); +RWByteAddressBuffer _7 : register(u0); static uint3 gl_GlobalInvocationID; struct SPIRV_Cross_Input @@ -8,11 +8,11 @@ struct SPIRV_Cross_Input void comp_main() { - uint _24; - _5.InterlockedAdd(0, 1u, _24); - if (_24 < 1024u) + uint _19; + _7.InterlockedAdd(0, 1u, _19); + if (_19 < 1024u) { - _5.Store(_24 * 4 + 4, gl_GlobalInvocationID.x); + _7.Store(_19 * 4 + 4, gl_GlobalInvocationID.x); } } diff --git a/reference/shaders-hlsl-no-opt/asm/comp/bitfield-signed-operations.asm.comp b/reference/shaders-hlsl-no-opt/asm/comp/bitfield-signed-operations.asm.comp index ebc431b3..24bdea17 100644 --- a/reference/shaders-hlsl-no-opt/asm/comp/bitfield-signed-operations.asm.comp +++ b/reference/shaders-hlsl-no-opt/asm/comp/bitfield-signed-operations.asm.comp @@ -1,4 +1,4 @@ -RWByteAddressBuffer _3 : register(u0); +RWByteAddressBuffer _4 : register(u0); uint spvBitfieldInsert(uint Base, uint Insert, uint Offset, uint Count) { @@ -82,20 +82,20 @@ int4 spvBitfieldSExtract(int4 Base, int Offset, int Count) void comp_main() { - int4 _19 = int4(_3.Load4(0)); - uint4 _20 = _3.Load4(16); - _3.Store4(0, uint4(countbits(_19))); - _3.Store4(16, uint4(countbits(_19))); - _3.Store4(0, uint4(int4(countbits(_20)))); - _3.Store4(16, countbits(_20)); - _3.Store4(0, uint4(reversebits(_19))); - _3.Store4(16, reversebits(_20)); - _3.Store4(0, uint4(spvBitfieldSExtract(_19, 1, 11u))); - _3.Store4(16, spvBitfieldSExtract(_20, 11u, 1)); - _3.Store4(0, uint4(spvBitfieldUExtract(_19, 1, 11u))); - _3.Store4(16, spvBitfieldUExtract(_20, 11u, 1)); - _3.Store4(0, uint4(int4(spvBitfieldInsert(_19, _19.wzyx, 1, 11u)))); - _3.Store4(16, spvBitfieldInsert(_20, _20.wzyx, 11u, 1)); + int4 _19 = int4(_4.Load4(0)); + uint4 _20 = _4.Load4(16); + _4.Store4(0, uint4(countbits(_19))); + _4.Store4(16, uint4(countbits(_19))); + _4.Store4(0, uint4(int4(countbits(_20)))); + _4.Store4(16, countbits(_20)); + _4.Store4(0, uint4(reversebits(_19))); + _4.Store4(16, reversebits(_20)); + _4.Store4(0, uint4(spvBitfieldSExtract(_19, 1, 11u))); + _4.Store4(16, spvBitfieldSExtract(_20, 11u, 1)); + _4.Store4(0, uint4(spvBitfieldUExtract(_19, 1, 11u))); + _4.Store4(16, spvBitfieldUExtract(_20, 11u, 1)); + _4.Store4(0, uint4(int4(spvBitfieldInsert(_19, _19.wzyx, 1, 11u)))); + _4.Store4(16, spvBitfieldInsert(_20, _20.wzyx, 11u, 1)); } [numthreads(1, 1, 1)] diff --git a/reference/shaders-hlsl-no-opt/asm/comp/bitscan.asm.comp b/reference/shaders-hlsl-no-opt/asm/comp/bitscan.asm.comp index f8a5fb6f..8ef4eab8 100644 --- a/reference/shaders-hlsl-no-opt/asm/comp/bitscan.asm.comp +++ b/reference/shaders-hlsl-no-opt/asm/comp/bitscan.asm.comp @@ -1,21 +1,21 @@ -RWByteAddressBuffer _4 : register(u0); +RWByteAddressBuffer _6 : register(u0); void comp_main() { - uint4 _19 = _4.Load4(0); - int4 _20 = int4(_4.Load4(16)); - _4.Store4(0, firstbitlow(_19)); - _4.Store4(16, uint4(int4(firstbitlow(_19)))); - _4.Store4(0, uint4(firstbitlow(_20))); - _4.Store4(16, uint4(firstbitlow(_20))); - _4.Store4(0, firstbithigh(_19)); - _4.Store4(16, uint4(int4(firstbithigh(_19)))); - _4.Store4(0, firstbithigh(uint4(_20))); - _4.Store4(16, uint4(int4(firstbithigh(uint4(_20))))); - _4.Store4(0, uint4(firstbithigh(int4(_19)))); - _4.Store4(16, uint4(firstbithigh(int4(_19)))); - _4.Store4(0, uint4(firstbithigh(_20))); - _4.Store4(16, uint4(firstbithigh(_20))); + uint4 _19 = _6.Load4(0); + int4 _20 = int4(_6.Load4(16)); + _6.Store4(0, firstbitlow(_19)); + _6.Store4(16, uint4(int4(firstbitlow(_19)))); + _6.Store4(0, uint4(firstbitlow(_20))); + _6.Store4(16, uint4(firstbitlow(_20))); + _6.Store4(0, firstbithigh(_19)); + _6.Store4(16, uint4(int4(firstbithigh(_19)))); + _6.Store4(0, firstbithigh(uint4(_20))); + _6.Store4(16, uint4(int4(firstbithigh(uint4(_20))))); + _6.Store4(0, uint4(firstbithigh(int4(_19)))); + _6.Store4(16, uint4(firstbithigh(int4(_19)))); + _6.Store4(0, uint4(firstbithigh(_20))); + _6.Store4(16, uint4(firstbithigh(_20))); } [numthreads(1, 1, 1)] diff --git a/reference/shaders-hlsl-no-opt/asm/comp/buffer-atomic-nonuniform.asm.sm51.nonuniformresource.comp b/reference/shaders-hlsl-no-opt/asm/comp/buffer-atomic-nonuniform.asm.sm51.nonuniformresource.comp index 0b6d93e4..1891581a 100644 --- a/reference/shaders-hlsl-no-opt/asm/comp/buffer-atomic-nonuniform.asm.sm51.nonuniformresource.comp +++ b/reference/shaders-hlsl-no-opt/asm/comp/buffer-atomic-nonuniform.asm.sm51.nonuniformresource.comp @@ -8,9 +8,9 @@ struct SPIRV_Cross_Input void comp_main() { - uint _24 = gl_GlobalInvocationID.z; + uint _18 = gl_GlobalInvocationID.z; uint _25; - ssbos[NonUniformResourceIndex(_24)].InterlockedAdd(0, 1u, _25); + ssbos[NonUniformResourceIndex(_18)].InterlockedAdd(0, 1u, _25); } [numthreads(1, 1, 1)] diff --git a/reference/shaders-hlsl-no-opt/asm/comp/constant-lut-name-aliasing.asm.comp b/reference/shaders-hlsl-no-opt/asm/comp/constant-lut-name-aliasing.asm.comp index d3dc5337..be2e503b 100644 --- a/reference/shaders-hlsl-no-opt/asm/comp/constant-lut-name-aliasing.asm.comp +++ b/reference/shaders-hlsl-no-opt/asm/comp/constant-lut-name-aliasing.asm.comp @@ -3,7 +3,7 @@ static const uint3 gl_WorkGroupSize = uint3(4u, 4u, 1u); static const int indexable[4] = { 0, 1, 2, 3 }; static const int indexable_1[4] = { 4, 5, 6, 7 }; -RWByteAddressBuffer _6 : register(u0); +RWByteAddressBuffer _8 : register(u0); static uint3 gl_LocalInvocationID; static uint3 gl_GlobalInvocationID; @@ -15,7 +15,7 @@ struct SPIRV_Cross_Input void comp_main() { - _6.Store(gl_GlobalInvocationID.x * 4 + 0, uint(indexable[gl_LocalInvocationID.x] + indexable_1[gl_LocalInvocationID.y])); + _8.Store(gl_GlobalInvocationID.x * 4 + 0, uint(indexable[gl_LocalInvocationID.x] + indexable_1[gl_LocalInvocationID.y])); } [numthreads(4, 4, 1)] diff --git a/reference/shaders-hlsl-no-opt/asm/comp/glsl-signed-operations.asm.comp b/reference/shaders-hlsl-no-opt/asm/comp/glsl-signed-operations.asm.comp index db16cf60..43fb1ed2 100644 --- a/reference/shaders-hlsl-no-opt/asm/comp/glsl-signed-operations.asm.comp +++ b/reference/shaders-hlsl-no-opt/asm/comp/glsl-signed-operations.asm.comp @@ -1,41 +1,41 @@ -RWByteAddressBuffer _4 : register(u0); +RWByteAddressBuffer _6 : register(u0); void comp_main() { - int4 _19 = int4(_4.Load4(0)); - uint4 _20 = _4.Load4(16); - _4.Store4(0, uint4(abs(_19))); - _4.Store4(16, uint4(abs(_19))); - _4.Store4(0, uint4(abs(int4(_20)))); - _4.Store4(16, uint4(abs(int4(_20)))); - _4.Store4(0, uint4(sign(_19))); - _4.Store4(16, uint4(sign(_19))); - _4.Store4(0, uint4(sign(int4(_20)))); - _4.Store4(16, uint4(sign(int4(_20)))); - _4.Store4(0, uint4(firstbithigh(int4(_20)))); - _4.Store4(16, uint4(firstbithigh(int4(_20)))); - _4.Store4(0, uint4(int4(firstbithigh(uint4(_19))))); - _4.Store4(16, firstbithigh(uint4(_19))); - _4.Store4(0, uint4(min(_19, _19))); - _4.Store4(16, uint4(min(_19, int4(_20)))); - _4.Store4(0, uint4(min(int4(_20), int4(_20)))); - _4.Store4(16, uint4(min(int4(_20), _19))); - _4.Store4(0, uint4(int4(min(uint4(_19), _20)))); - _4.Store4(16, min(uint4(_19), _20)); - _4.Store4(0, uint4(int4(min(_20, uint4(_19))))); - _4.Store4(16, min(_20, uint4(_19))); - _4.Store4(0, uint4(max(_19, _19))); - _4.Store4(16, uint4(max(_19, _19))); - _4.Store4(0, uint4(max(int4(_20), _19))); - _4.Store4(16, uint4(max(int4(_20), _19))); - _4.Store4(0, uint4(int4(max(uint4(_19), _20)))); - _4.Store4(16, max(uint4(_19), uint4(_19))); - _4.Store4(0, uint4(int4(max(_20, uint4(_19))))); - _4.Store4(16, max(_20, uint4(_19))); - _4.Store4(0, uint4(clamp(int4(_20), int4(_20), int4(_20)))); - _4.Store4(16, uint4(clamp(int4(_20), int4(_20), int4(_20)))); - _4.Store4(0, uint4(int4(clamp(uint4(_19), uint4(_19), uint4(_19))))); - _4.Store4(16, clamp(uint4(_19), uint4(_19), uint4(_19))); + int4 _19 = int4(_6.Load4(0)); + uint4 _20 = _6.Load4(16); + _6.Store4(0, uint4(abs(_19))); + _6.Store4(16, uint4(abs(_19))); + _6.Store4(0, uint4(abs(int4(_20)))); + _6.Store4(16, uint4(abs(int4(_20)))); + _6.Store4(0, uint4(sign(_19))); + _6.Store4(16, uint4(sign(_19))); + _6.Store4(0, uint4(sign(int4(_20)))); + _6.Store4(16, uint4(sign(int4(_20)))); + _6.Store4(0, uint4(firstbithigh(int4(_20)))); + _6.Store4(16, uint4(firstbithigh(int4(_20)))); + _6.Store4(0, uint4(int4(firstbithigh(uint4(_19))))); + _6.Store4(16, firstbithigh(uint4(_19))); + _6.Store4(0, uint4(min(_19, _19))); + _6.Store4(16, uint4(min(_19, int4(_20)))); + _6.Store4(0, uint4(min(int4(_20), int4(_20)))); + _6.Store4(16, uint4(min(int4(_20), _19))); + _6.Store4(0, uint4(int4(min(uint4(_19), _20)))); + _6.Store4(16, min(uint4(_19), _20)); + _6.Store4(0, uint4(int4(min(_20, uint4(_19))))); + _6.Store4(16, min(_20, uint4(_19))); + _6.Store4(0, uint4(max(_19, _19))); + _6.Store4(16, uint4(max(_19, _19))); + _6.Store4(0, uint4(max(int4(_20), _19))); + _6.Store4(16, uint4(max(int4(_20), _19))); + _6.Store4(0, uint4(int4(max(uint4(_19), _20)))); + _6.Store4(16, max(uint4(_19), uint4(_19))); + _6.Store4(0, uint4(int4(max(_20, uint4(_19))))); + _6.Store4(16, max(_20, uint4(_19))); + _6.Store4(0, uint4(clamp(int4(_20), int4(_20), int4(_20)))); + _6.Store4(16, uint4(clamp(int4(_20), int4(_20), int4(_20)))); + _6.Store4(0, uint4(int4(clamp(uint4(_19), uint4(_19), uint4(_19))))); + _6.Store4(16, clamp(uint4(_19), uint4(_19), uint4(_19))); } [numthreads(1, 1, 1)] diff --git a/reference/shaders-hlsl-no-opt/asm/comp/glsl.std450.frexp-modf-struct.fxconly.asm.comp b/reference/shaders-hlsl-no-opt/asm/comp/glsl.std450.frexp-modf-struct.fxconly.asm.comp index b1232635..14c0a611 100644 --- a/reference/shaders-hlsl-no-opt/asm/comp/glsl.std450.frexp-modf-struct.fxconly.asm.comp +++ b/reference/shaders-hlsl-no-opt/asm/comp/glsl.std450.frexp-modf-struct.fxconly.asm.comp @@ -1,27 +1,27 @@ -struct _8 +struct _9 { float _m0; float _m1; }; -struct _15 +struct _16 { float _m0; int _m1; }; -RWByteAddressBuffer _4 : register(u0); +RWByteAddressBuffer _6 : register(u0); void comp_main() { - _8 _23; + _9 _23; _23._m0 = modf(20.0f, _23._m1); - _15 _24; + _16 _24; _24._m0 = frexp(40.0f, _24._m1); - _4.Store(0, asuint(_23._m0)); - _4.Store(0, asuint(_23._m1)); - _4.Store(0, asuint(_24._m0)); - _4.Store(4, uint(_24._m1)); + _6.Store(0, asuint(_23._m0)); + _6.Store(0, asuint(_23._m1)); + _6.Store(0, asuint(_24._m0)); + _6.Store(4, uint(_24._m1)); } [numthreads(1, 1, 1)] diff --git a/reference/shaders-hlsl-no-opt/asm/comp/image-atomic-nonuniform.asm.sm51.nonuniformresource.comp b/reference/shaders-hlsl-no-opt/asm/comp/image-atomic-nonuniform.asm.sm51.nonuniformresource.comp index 07f87ca9..9209e41f 100644 --- a/reference/shaders-hlsl-no-opt/asm/comp/image-atomic-nonuniform.asm.sm51.nonuniformresource.comp +++ b/reference/shaders-hlsl-no-opt/asm/comp/image-atomic-nonuniform.asm.sm51.nonuniformresource.comp @@ -8,9 +8,9 @@ struct SPIRV_Cross_Input void comp_main() { - uint _26 = gl_GlobalInvocationID.z; + uint _18 = gl_GlobalInvocationID.z; uint _31; - InterlockedAdd(uImage[NonUniformResourceIndex(_26)][int2(gl_GlobalInvocationID.xy)], 1u, _31); + InterlockedAdd(uImage[NonUniformResourceIndex(_18)][int2(gl_GlobalInvocationID.xy)], 1u, _31); } [numthreads(1, 1, 1)] diff --git a/reference/shaders-hlsl-no-opt/asm/comp/local-size-id-override.asm.comp b/reference/shaders-hlsl-no-opt/asm/comp/local-size-id-override.asm.comp index dbc881f9..71431dd2 100644 --- a/reference/shaders-hlsl-no-opt/asm/comp/local-size-id-override.asm.comp +++ b/reference/shaders-hlsl-no-opt/asm/comp/local-size-id-override.asm.comp @@ -1,22 +1,22 @@ #ifndef SPIRV_CROSS_CONSTANT_ID_1 #define SPIRV_CROSS_CONSTANT_ID_1 11u #endif -static const uint _10 = SPIRV_CROSS_CONSTANT_ID_1; +static const uint _12 = SPIRV_CROSS_CONSTANT_ID_1; #ifndef SPIRV_CROSS_CONSTANT_ID_2 #define SPIRV_CROSS_CONSTANT_ID_2 12u #endif -static const uint _11 = SPIRV_CROSS_CONSTANT_ID_2; +static const uint _13 = SPIRV_CROSS_CONSTANT_ID_2; #ifndef SPIRV_CROSS_CONSTANT_ID_3 #define SPIRV_CROSS_CONSTANT_ID_3 13u #endif -static const uint _4 = SPIRV_CROSS_CONSTANT_ID_3; +static const uint _6 = SPIRV_CROSS_CONSTANT_ID_3; #ifndef SPIRV_CROSS_CONSTANT_ID_4 #define SPIRV_CROSS_CONSTANT_ID_4 14u #endif -static const uint _5 = SPIRV_CROSS_CONSTANT_ID_4; -static const uint3 gl_WorkGroupSize = uint3(3u, _10, _11); +static const uint _7 = SPIRV_CROSS_CONSTANT_ID_4; +static const uint3 gl_WorkGroupSize = uint3(3u, _12, _13); -RWByteAddressBuffer _8 : register(u0); +RWByteAddressBuffer _10 : register(u0); static uint3 gl_GlobalInvocationID; struct SPIRV_Cross_Input @@ -26,7 +26,7 @@ struct SPIRV_Cross_Input void comp_main() { - _8.Store4(gl_GlobalInvocationID.x * 16 + 0, asuint(asfloat(_8.Load4(gl_GlobalInvocationID.x * 16 + 0)) + 2.0f.xxxx)); + _10.Store4(gl_GlobalInvocationID.x * 16 + 0, asuint(asfloat(_10.Load4(gl_GlobalInvocationID.x * 16 + 0)) + 2.0f.xxxx)); } [numthreads(3, SPIRV_CROSS_CONSTANT_ID_1, SPIRV_CROSS_CONSTANT_ID_2)] diff --git a/reference/shaders-hlsl-no-opt/asm/comp/local-size-id.asm.comp b/reference/shaders-hlsl-no-opt/asm/comp/local-size-id.asm.comp index 157f9e99..84d7a595 100644 --- a/reference/shaders-hlsl-no-opt/asm/comp/local-size-id.asm.comp +++ b/reference/shaders-hlsl-no-opt/asm/comp/local-size-id.asm.comp @@ -1,23 +1,23 @@ #ifndef SPIRV_CROSS_CONSTANT_ID_1 #define SPIRV_CROSS_CONSTANT_ID_1 11 #endif -static const int _10 = SPIRV_CROSS_CONSTANT_ID_1; +static const int _12 = SPIRV_CROSS_CONSTANT_ID_1; #ifndef SPIRV_CROSS_CONSTANT_ID_2 #define SPIRV_CROSS_CONSTANT_ID_2 12 #endif -static const int _11 = SPIRV_CROSS_CONSTANT_ID_2; +static const int _13 = SPIRV_CROSS_CONSTANT_ID_2; #ifndef SPIRV_CROSS_CONSTANT_ID_3 #define SPIRV_CROSS_CONSTANT_ID_3 13 #endif -static const int _4 = SPIRV_CROSS_CONSTANT_ID_3; +static const int _6 = SPIRV_CROSS_CONSTANT_ID_3; #ifndef SPIRV_CROSS_CONSTANT_ID_4 #define SPIRV_CROSS_CONSTANT_ID_4 14 #endif -static const int _5 = SPIRV_CROSS_CONSTANT_ID_4; -static const uint _29 = (uint(_4) + 3u); -static const uint3 _30 = uint3(_29, _5, 2u); +static const int _7 = SPIRV_CROSS_CONSTANT_ID_4; +static const uint _37 = (uint(_6) + 3u); +static const uint3 _38 = uint3(_37, _7, 2u); -RWByteAddressBuffer _8 : register(u0); +RWByteAddressBuffer _10 : register(u0); static uint3 gl_GlobalInvocationID; struct SPIRV_Cross_Input @@ -27,7 +27,7 @@ struct SPIRV_Cross_Input void comp_main() { - _8.Store4(gl_GlobalInvocationID.x * 16 + 0, asuint(((((asfloat(_8.Load4(gl_GlobalInvocationID.x * 16 + 0)) + 2.0f.xxxx) + float3(_30).xyzz) * float(_4)) * float(_5)) * float(int(2u)))); + _10.Store4(gl_GlobalInvocationID.x * 16 + 0, asuint(((((asfloat(_10.Load4(gl_GlobalInvocationID.x * 16 + 0)) + 2.0f.xxxx) + float3(_38).xyzz) * float(_6)) * float(_7)) * float(int(2u)))); } [numthreads(SPIRV_CROSS_CONSTANT_ID_3, SPIRV_CROSS_CONSTANT_ID_4, 2)] diff --git a/reference/shaders-hlsl-no-opt/asm/comp/num-workgroups.spv14.asm.comp b/reference/shaders-hlsl-no-opt/asm/comp/num-workgroups.spv14.asm.comp index e771d77b..1bb3b0df 100644 --- a/reference/shaders-hlsl-no-opt/asm/comp/num-workgroups.spv14.asm.comp +++ b/reference/shaders-hlsl-no-opt/asm/comp/num-workgroups.spv14.asm.comp @@ -1,9 +1,9 @@ static const uint3 gl_WorkGroupSize = uint3(1u, 1u, 1u); -RWByteAddressBuffer _3 : register(u1); +RWByteAddressBuffer _4 : register(u1); cbuffer UBO : register(b0) { - uint3 _5_w : packoffset(c0); + uint3 _7_w : packoffset(c0); }; cbuffer SPIRV_Cross_NumWorkgroups @@ -14,7 +14,7 @@ cbuffer SPIRV_Cross_NumWorkgroups void comp_main() { - _3.Store3(0, SPIRV_Cross_NumWorkgroups_1_count + _5_w); + _4.Store3(0, SPIRV_Cross_NumWorkgroups_1_count + _7_w); } [numthreads(1, 1, 1)] diff --git a/reference/shaders-hlsl-no-opt/asm/comp/spec-constant-name-aliasing.asm.comp b/reference/shaders-hlsl-no-opt/asm/comp/spec-constant-name-aliasing.asm.comp index 423beee6..983a4932 100644 --- a/reference/shaders-hlsl-no-opt/asm/comp/spec-constant-name-aliasing.asm.comp +++ b/reference/shaders-hlsl-no-opt/asm/comp/spec-constant-name-aliasing.asm.comp @@ -30,7 +30,7 @@ static const int A_10 = (A_9 - A_5); static const int A_11 = (A_10 + A_5); static const uint3 gl_WorkGroupSize = uint3(1u, 1u, 1u); -RWByteAddressBuffer _5 : register(u0); +RWByteAddressBuffer _7 : register(u0); static uint3 gl_GlobalInvocationID; struct SPIRV_Cross_Input @@ -40,7 +40,7 @@ struct SPIRV_Cross_Input void comp_main() { - _5.Store(gl_GlobalInvocationID.x * 4 + 0, uint(A_11)); + _7.Store(gl_GlobalInvocationID.x * 4 + 0, uint(A_11)); } [numthreads(1, 1, 1)] diff --git a/reference/shaders-hlsl-no-opt/asm/comp/specialization-constant-workgroup.nofxc.asm.comp b/reference/shaders-hlsl-no-opt/asm/comp/specialization-constant-workgroup.nofxc.asm.comp index 8c239b31..bdb8692d 100644 --- a/reference/shaders-hlsl-no-opt/asm/comp/specialization-constant-workgroup.nofxc.asm.comp +++ b/reference/shaders-hlsl-no-opt/asm/comp/specialization-constant-workgroup.nofxc.asm.comp @@ -1,18 +1,18 @@ #ifndef SPIRV_CROSS_CONSTANT_ID_10 #define SPIRV_CROSS_CONSTANT_ID_10 9u #endif -static const uint _5 = SPIRV_CROSS_CONSTANT_ID_10; +static const uint _19 = SPIRV_CROSS_CONSTANT_ID_10; #ifndef SPIRV_CROSS_CONSTANT_ID_12 #define SPIRV_CROSS_CONSTANT_ID_12 4u #endif -static const uint _6 = SPIRV_CROSS_CONSTANT_ID_12; -static const uint3 gl_WorkGroupSize = uint3(_5, 20u, _6); +static const uint _21 = SPIRV_CROSS_CONSTANT_ID_12; +static const uint3 gl_WorkGroupSize = uint3(_19, 20u, _21); -RWByteAddressBuffer _4 : register(u0); +RWByteAddressBuffer _6 : register(u0); void comp_main() { - _4.Store(0, asuint(asfloat(_4.Load(0)) + 1.0f)); + _6.Store(0, asuint(asfloat(_6.Load(0)) + 1.0f)); } [numthreads(SPIRV_CROSS_CONSTANT_ID_10, 20, SPIRV_CROSS_CONSTANT_ID_12)] diff --git a/reference/shaders-hlsl-no-opt/asm/comp/storage-buffer-basic.nofxc.asm.comp b/reference/shaders-hlsl-no-opt/asm/comp/storage-buffer-basic.nofxc.asm.comp index c567fbaf..5e569dd0 100644 --- a/reference/shaders-hlsl-no-opt/asm/comp/storage-buffer-basic.nofxc.asm.comp +++ b/reference/shaders-hlsl-no-opt/asm/comp/storage-buffer-basic.nofxc.asm.comp @@ -1,15 +1,15 @@ #ifndef SPIRV_CROSS_CONSTANT_ID_0 #define SPIRV_CROSS_CONSTANT_ID_0 1u #endif -static const uint _3 = SPIRV_CROSS_CONSTANT_ID_0; +static const uint _15 = SPIRV_CROSS_CONSTANT_ID_0; #ifndef SPIRV_CROSS_CONSTANT_ID_2 #define SPIRV_CROSS_CONSTANT_ID_2 3u #endif -static const uint _4 = SPIRV_CROSS_CONSTANT_ID_2; -static const uint3 gl_WorkGroupSize = uint3(_3, 2u, _4); +static const uint _17 = SPIRV_CROSS_CONSTANT_ID_2; +static const uint3 gl_WorkGroupSize = uint3(_15, 2u, _17); -RWByteAddressBuffer _8 : register(u0); -RWByteAddressBuffer _9 : register(u1); +RWByteAddressBuffer _20 : register(u0); +RWByteAddressBuffer _21 : register(u1); static uint3 gl_WorkGroupID; struct SPIRV_Cross_Input @@ -17,11 +17,11 @@ struct SPIRV_Cross_Input uint3 gl_WorkGroupID : SV_GroupID; }; -static uint3 _22 = gl_WorkGroupSize; +static uint3 _19 = gl_WorkGroupSize; void comp_main() { - _8.Store(gl_WorkGroupID.x * 4 + 0, asuint(asfloat(_9.Load(gl_WorkGroupID.x * 4 + 0)) + asfloat(_8.Load(gl_WorkGroupID.x * 4 + 0)))); + _20.Store(gl_WorkGroupID.x * 4 + 0, asuint(asfloat(_21.Load(gl_WorkGroupID.x * 4 + 0)) + asfloat(_20.Load(gl_WorkGroupID.x * 4 + 0)))); } [numthreads(SPIRV_CROSS_CONSTANT_ID_0, 2, SPIRV_CROSS_CONSTANT_ID_2)] diff --git a/reference/shaders-hlsl-no-opt/asm/frag/anonymous-inner-struct-names.asm.frag b/reference/shaders-hlsl-no-opt/asm/frag/anonymous-inner-struct-names.asm.frag index 128a8c52..0a2038db 100644 --- a/reference/shaders-hlsl-no-opt/asm/frag/anonymous-inner-struct-names.asm.frag +++ b/reference/shaders-hlsl-no-opt/asm/frag/anonymous-inner-struct-names.asm.frag @@ -63,13 +63,13 @@ struct anon_e cbuffer UBO : register(b0) { - anon_c _16_c : packoffset(c0); - anon_d _16_d : packoffset(c1); + anon_c _18_c : packoffset(c0); + anon_d _18_d : packoffset(c1); }; -RWByteAddressBuffer _19 : register(u1); +RWByteAddressBuffer _21 : register(u1); -static VertexData _3; +static VertexData _4; struct SPIRV_Cross_Input { @@ -83,7 +83,7 @@ void frag_main() void main(SPIRV_Cross_Input stage_input) { - _3._a = stage_input.VertexData__a; - _3.b = stage_input.VertexData_b; + _4._a = stage_input.VertexData__a; + _4.b = stage_input.VertexData_b; frag_main(); } diff --git a/reference/shaders-hlsl-no-opt/asm/frag/composite-insert-inheritance.asm.frag b/reference/shaders-hlsl-no-opt/asm/frag/composite-insert-inheritance.asm.frag index 8c61e61b..aa504a99 100644 --- a/reference/shaders-hlsl-no-opt/asm/frag/composite-insert-inheritance.asm.frag +++ b/reference/shaders-hlsl-no-opt/asm/frag/composite-insert-inheritance.asm.frag @@ -1,6 +1,6 @@ -static float4 _32; +static float4 _33; -static const float4 _34[2] = { 0.0f.xxxx, 0.0f.xxxx }; +static const float4 _35[2] = { 0.0f.xxxx, 0.0f.xxxx }; static float4 vInput; static float4 FragColor; @@ -24,12 +24,12 @@ void frag_main() _38.z = 3.0f; _38.w = 4.0f; FragColor = _38; - float4 _6 = _37; - _6.x = 1.0f; - _6.y = 2.0f; - _6.z = 3.0f; - _6.w = 4.0f; - FragColor = _6; + float4 _8 = _37; + _8.x = 1.0f; + _8.y = 2.0f; + _8.z = 3.0f; + _8.w = 4.0f; + FragColor = _8; float4 _42 = _37; _42.x = 1.0f; _42.y = 2.0f; @@ -55,7 +55,7 @@ void frag_main() float4 _53 = 0.0f.xxxx; _53.x = 1.0f; FragColor = _53; - float4 _54[2] = _34; + float4 _54[2] = _35; _54[1].z = 1.0f; _54[0].w = 2.0f; FragColor = _54[0]; diff --git a/reference/shaders-hlsl-no-opt/asm/frag/empty-struct-in-struct.asm.frag b/reference/shaders-hlsl-no-opt/asm/frag/empty-struct-in-struct.asm.frag index e7ffd8d6..66009036 100644 --- a/reference/shaders-hlsl-no-opt/asm/frag/empty-struct-in-struct.asm.frag +++ b/reference/shaders-hlsl-no-opt/asm/frag/empty-struct-in-struct.asm.frag @@ -8,8 +8,8 @@ struct EmptyStruct2Test EmptyStructTest _m0; }; -static const EmptyStructTest _30 = { 0 }; -static const EmptyStruct2Test _20 = { { 0 } }; +static const EmptyStructTest _38 = { 0 }; +static const EmptyStruct2Test _26 = { { 0 } }; float GetValue(EmptyStruct2Test self) { @@ -23,12 +23,12 @@ float GetValue_1(EmptyStruct2Test self) void frag_main() { - EmptyStructTest _25 = { 0 }; - EmptyStruct2Test _26 = { _25 }; + EmptyStructTest _27 = { 0 }; + EmptyStruct2Test _28 = { _27 }; EmptyStruct2Test emptyStruct; float value = GetValue(emptyStruct); + value = GetValue_1(_28); value = GetValue_1(_26); - value = GetValue_1(_20); } void main() diff --git a/reference/shaders-hlsl-no-opt/asm/frag/nonuniform-bracket-handling-2.nonuniformresource.sm51.asm.frag b/reference/shaders-hlsl-no-opt/asm/frag/nonuniform-bracket-handling-2.nonuniformresource.sm51.asm.frag index fd758b17..70567a71 100644 --- a/reference/shaders-hlsl-no-opt/asm/frag/nonuniform-bracket-handling-2.nonuniformresource.sm51.asm.frag +++ b/reference/shaders-hlsl-no-opt/asm/frag/nonuniform-bracket-handling-2.nonuniformresource.sm51.asm.frag @@ -1,4 +1,4 @@ -ByteAddressBuffer _8 : register(t0, space2); +ByteAddressBuffer _12 : register(t0, space2); Texture2D uSamplers[] : register(t0, space0); SamplerState _uSamplers_sampler[] : register(s0, space0); Texture2D uSampler : register(t1, space1); @@ -21,8 +21,8 @@ struct SPIRV_Cross_Output void frag_main() { - FragColor = uSamplers[NonUniformResourceIndex(_8.Load(40))].SampleLevel(_uSamplers_sampler[NonUniformResourceIndex(_8.Load(40))], vUV, 0.0f); - FragColor += uSampler.SampleLevel(_uSampler_sampler, vUV, float(_8.Load(int(gl_FragCoord.y) * 4 + 0))); + FragColor = uSamplers[NonUniformResourceIndex(_12.Load(40))].SampleLevel(_uSamplers_sampler[NonUniformResourceIndex(_12.Load(40))], vUV, 0.0f); + FragColor += uSampler.SampleLevel(_uSampler_sampler, vUV, float(_12.Load(int(gl_FragCoord.y) * 4 + 0))); } SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input) diff --git a/reference/shaders-hlsl-no-opt/asm/frag/nonuniform-qualifier-propagation.nonuniformresource.sm51.asm.frag b/reference/shaders-hlsl-no-opt/asm/frag/nonuniform-qualifier-propagation.nonuniformresource.sm51.asm.frag index 0356cf58..40635032 100644 --- a/reference/shaders-hlsl-no-opt/asm/frag/nonuniform-qualifier-propagation.nonuniformresource.sm51.asm.frag +++ b/reference/shaders-hlsl-no-opt/asm/frag/nonuniform-qualifier-propagation.nonuniformresource.sm51.asm.frag @@ -28,17 +28,17 @@ struct SPIRV_Cross_Output void frag_main() { int i = vIndex; - int _59 = i + 10; - int _64 = i + 40; - FragColor = uSamplers[NonUniformResourceIndex(_59)].Sample(uSamps[NonUniformResourceIndex(_64)], vUV); - int _71 = i + 10; - FragColor = uCombinedSamplers[NonUniformResourceIndex(_71)].Sample(_uCombinedSamplers_sampler[NonUniformResourceIndex(_71)], vUV); - int _77 = i + 20; - int _80 = i + 40; - FragColor += ubos[NonUniformResourceIndex(_77)].v[_80]; - int _87 = i + 50; - int _90 = i + 60; - FragColor += asfloat(ssbos[NonUniformResourceIndex(_87)].Load4(_90 * 16 + 0)); + int _23 = i + 10; + int _34 = i + 40; + FragColor = uSamplers[NonUniformResourceIndex(_23)].Sample(uSamps[NonUniformResourceIndex(_34)], vUV); + int _50 = i + 10; + FragColor = uCombinedSamplers[NonUniformResourceIndex(_50)].Sample(_uCombinedSamplers_sampler[NonUniformResourceIndex(_50)], vUV); + int _66 = i + 20; + int _70 = i + 40; + FragColor += ubos[NonUniformResourceIndex(_66)].v[_70]; + int _84 = i + 50; + int _88 = i + 60; + FragColor += asfloat(ssbos[NonUniformResourceIndex(_84)].Load4(_88 * 16 + 0)); } SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input) diff --git a/reference/shaders-hlsl-no-opt/asm/frag/nonuniform-ssbo.sm51.nonuniformresource.asm.frag b/reference/shaders-hlsl-no-opt/asm/frag/nonuniform-ssbo.sm51.nonuniformresource.asm.frag index a692cdcf..4c69c490 100644 --- a/reference/shaders-hlsl-no-opt/asm/frag/nonuniform-ssbo.sm51.nonuniformresource.asm.frag +++ b/reference/shaders-hlsl-no-opt/asm/frag/nonuniform-ssbo.sm51.nonuniformresource.asm.frag @@ -16,17 +16,17 @@ struct SPIRV_Cross_Output void frag_main() { int i = vIndex; - int _42 = i + 60; - int _45 = i + 70; - ssbos[NonUniformResourceIndex(_42)].Store4(_45 * 16 + 16, asuint(20.0f.xxxx)); - int _48 = i + 100; - uint _49; - ssbos[NonUniformResourceIndex(_48)].InterlockedAdd(0, 100u, _49); - int _51 = i; - uint _52; - ssbos[NonUniformResourceIndex(_51)].GetDimensions(_52); - _52 = (_52 - 16) / 16; - FragColor.z += float(int(_52)); + int _23 = i + 60; + int _28 = i + 70; + ssbos[NonUniformResourceIndex(_23)].Store4(_28 * 16 + 16, asuint(20.0f.xxxx)); + int _36 = i + 100; + uint _43; + ssbos[NonUniformResourceIndex(_36)].InterlockedAdd(0, 100u, _43); + int _47 = i; + uint _50; + ssbos[NonUniformResourceIndex(_47)].GetDimensions(_50); + _50 = (_50 - 16) / 16; + FragColor.z += float(int(_50)); } SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input) diff --git a/reference/shaders-hlsl-no-opt/asm/frag/phi.zero-initialize.asm.frag b/reference/shaders-hlsl-no-opt/asm/frag/phi.zero-initialize.asm.frag index 2ce5fd41..bd25fdd9 100644 --- a/reference/shaders-hlsl-no-opt/asm/frag/phi.zero-initialize.asm.frag +++ b/reference/shaders-hlsl-no-opt/asm/frag/phi.zero-initialize.asm.frag @@ -24,14 +24,14 @@ struct SPIRV_Cross_Output void frag_main() { - int _39 = 0; + int _27 = 0; if (vColor.x > 10.0f) { - _39 = 10; + _27 = 10; } else { - _39 = 20; + _27 = 20; } FragColor = vColor; } diff --git a/reference/shaders-hlsl-no-opt/asm/frag/pixel-interlock-callstack.sm51.fxconly.asm.frag b/reference/shaders-hlsl-no-opt/asm/frag/pixel-interlock-callstack.sm51.fxconly.asm.frag index 8a47b91b..d2d01619 100644 --- a/reference/shaders-hlsl-no-opt/asm/frag/pixel-interlock-callstack.sm51.fxconly.asm.frag +++ b/reference/shaders-hlsl-no-opt/asm/frag/pixel-interlock-callstack.sm51.fxconly.asm.frag @@ -1,5 +1,5 @@ -RasterizerOrderedByteAddressBuffer _7 : register(u1, space0); -RWByteAddressBuffer _9 : register(u0, space0); +RasterizerOrderedByteAddressBuffer _11 : register(u1, space0); +RWByteAddressBuffer _13 : register(u0, space0); static float4 gl_FragCoord; struct SPIRV_Cross_Input @@ -9,14 +9,14 @@ struct SPIRV_Cross_Input void callee2() { - int _31 = int(gl_FragCoord.x); - _7.Store(_31 * 4 + 0, _7.Load(_31 * 4 + 0) + 1u); + int _25 = int(gl_FragCoord.x); + _11.Store(_25 * 4 + 0, _11.Load(_25 * 4 + 0) + 1u); } void callee() { - int _39 = int(gl_FragCoord.x); - _9.Store(_39 * 4 + 0, _9.Load(_39 * 4 + 0) + 1u); + int _38 = int(gl_FragCoord.x); + _13.Store(_38 * 4 + 0, _13.Load(_38 * 4 + 0) + 1u); callee2(); } diff --git a/reference/shaders-hlsl-no-opt/asm/frag/pixel-interlock-control-flow.sm51.fxconly.asm.frag b/reference/shaders-hlsl-no-opt/asm/frag/pixel-interlock-control-flow.sm51.fxconly.asm.frag index 01bbe7dd..2c0a2cdd 100644 --- a/reference/shaders-hlsl-no-opt/asm/frag/pixel-interlock-control-flow.sm51.fxconly.asm.frag +++ b/reference/shaders-hlsl-no-opt/asm/frag/pixel-interlock-control-flow.sm51.fxconly.asm.frag @@ -1,6 +1,6 @@ -RasterizerOrderedByteAddressBuffer _7 : register(u1, space0); -RWByteAddressBuffer _13 : register(u2, space0); -RasterizerOrderedByteAddressBuffer _9 : register(u0, space0); +RasterizerOrderedByteAddressBuffer _11 : register(u1, space0); +RWByteAddressBuffer _17 : register(u2, space0); +RasterizerOrderedByteAddressBuffer _13 : register(u0, space0); static float4 gl_FragCoord; struct SPIRV_Cross_Input @@ -10,29 +10,29 @@ struct SPIRV_Cross_Input void callee2() { - int _44 = int(gl_FragCoord.x); - _7.Store(_44 * 4 + 0, _7.Load(_44 * 4 + 0) + 1u); + int _25 = int(gl_FragCoord.x); + _11.Store(_25 * 4 + 0, _11.Load(_25 * 4 + 0) + 1u); } void callee() { - int _52 = int(gl_FragCoord.x); - _9.Store(_52 * 4 + 0, _9.Load(_52 * 4 + 0) + 1u); + int _38 = int(gl_FragCoord.x); + _13.Store(_38 * 4 + 0, _13.Load(_38 * 4 + 0) + 1u); callee2(); if (true) { } } -void _35() +void _52() { - _13.Store(int(gl_FragCoord.x) * 4 + 0, 4u); + _17.Store(int(gl_FragCoord.x) * 4 + 0, 4u); } void frag_main() { callee(); - _35(); + _52(); } void main(SPIRV_Cross_Input stage_input) diff --git a/reference/shaders-hlsl-no-opt/asm/frag/pixel-interlock-split-functions.sm51.fxconly.asm.frag b/reference/shaders-hlsl-no-opt/asm/frag/pixel-interlock-split-functions.sm51.fxconly.asm.frag index c1fb6ebb..dc6f33db 100644 --- a/reference/shaders-hlsl-no-opt/asm/frag/pixel-interlock-split-functions.sm51.fxconly.asm.frag +++ b/reference/shaders-hlsl-no-opt/asm/frag/pixel-interlock-split-functions.sm51.fxconly.asm.frag @@ -1,5 +1,5 @@ -RasterizerOrderedByteAddressBuffer _7 : register(u1, space0); -RasterizerOrderedByteAddressBuffer _9 : register(u0, space0); +RasterizerOrderedByteAddressBuffer _11 : register(u1, space0); +RasterizerOrderedByteAddressBuffer _13 : register(u0, space0); static float4 gl_FragCoord; struct SPIRV_Cross_Input @@ -9,30 +9,30 @@ struct SPIRV_Cross_Input void callee2() { - int _37 = int(gl_FragCoord.x); - _7.Store(_37 * 4 + 0, _7.Load(_37 * 4 + 0) + 1u); + int _25 = int(gl_FragCoord.x); + _11.Store(_25 * 4 + 0, _11.Load(_25 * 4 + 0) + 1u); } void callee() { - int _45 = int(gl_FragCoord.x); - _9.Store(_45 * 4 + 0, _9.Load(_45 * 4 + 0) + 1u); + int _38 = int(gl_FragCoord.x); + _13.Store(_38 * 4 + 0, _13.Load(_38 * 4 + 0) + 1u); callee2(); } -void _29() +void _46() { } -void _31() +void _48() { } void frag_main() { callee(); - _29(); - _31(); + _46(); + _48(); } void main(SPIRV_Cross_Input stage_input) diff --git a/reference/shaders-hlsl-no-opt/asm/frag/scalar-select.spv14.asm.frag b/reference/shaders-hlsl-no-opt/asm/frag/scalar-select.spv14.asm.frag index b6d1a902..d0e43211 100644 --- a/reference/shaders-hlsl-no-opt/asm/frag/scalar-select.spv14.asm.frag +++ b/reference/shaders-hlsl-no-opt/asm/frag/scalar-select.spv14.asm.frag @@ -1,12 +1,12 @@ -struct _15 +struct _16 { float _m0; }; -static const _15 _25 = { 0.0f }; -static const _15 _26 = { 1.0f }; -static const float _29[2] = { 0.0f, 1.0f }; -static const float _30[2] = { 1.0f, 0.0f }; +static const _16 _30 = { 0.0f }; +static const _16 _31 = { 1.0f }; +static const float _34[2] = { 0.0f, 1.0f }; +static const float _35[2] = { 1.0f, 0.0f }; static float4 FragColor; @@ -15,7 +15,7 @@ struct SPIRV_Cross_Output float4 FragColor : SV_Target0; }; -void spvSelectComposite(out _15 out_value, bool cond, _15 true_val, _15 false_val) +void spvSelectComposite(out _16 out_value, bool cond, _16 true_val, _16 false_val) { if (cond) { @@ -45,12 +45,12 @@ void frag_main() FragColor = false ? 1.0f.xxxx : 0.0f.xxxx; FragColor = float4(bool4(false, true, false, true).x ? float4(1.0f, 1.0f, 0.0f, 1.0f).x : float4(0.0f, 0.0f, 0.0f, 1.0f).x, bool4(false, true, false, true).y ? float4(1.0f, 1.0f, 0.0f, 1.0f).y : float4(0.0f, 0.0f, 0.0f, 1.0f).y, bool4(false, true, false, true).z ? float4(1.0f, 1.0f, 0.0f, 1.0f).z : float4(0.0f, 0.0f, 0.0f, 1.0f).z, bool4(false, true, false, true).w ? float4(1.0f, 1.0f, 0.0f, 1.0f).w : float4(0.0f, 0.0f, 0.0f, 1.0f).w); FragColor = float4(bool4(false, true, false, true)); - _15 _38; - spvSelectComposite(_38, false, _25, _26); - _15 _32 = _38; + _16 _38; + spvSelectComposite(_38, false, _30, _31); + _16 _36 = _38; float _39[2]; - spvSelectComposite(_39, true, _29, _30); - float _33[2] = _39; + spvSelectComposite(_39, true, _34, _35); + float _37[2] = _39; } SPIRV_Cross_Output main() diff --git a/reference/shaders-hlsl-no-opt/asm/frag/struct-packing-last-element-array-matrix-rule.invalid.asm.frag b/reference/shaders-hlsl-no-opt/asm/frag/struct-packing-last-element-array-matrix-rule.invalid.asm.frag index b88ac0dd..7372d753 100644 --- a/reference/shaders-hlsl-no-opt/asm/frag/struct-packing-last-element-array-matrix-rule.invalid.asm.frag +++ b/reference/shaders-hlsl-no-opt/asm/frag/struct-packing-last-element-array-matrix-rule.invalid.asm.frag @@ -12,12 +12,12 @@ struct Bar cbuffer FooUBO : register(b0) { - Foo _6_foo : packoffset(c0); + Foo _8_foo : packoffset(c0); }; cbuffer BarUBO : register(b1) { - Bar _9_bar : packoffset(c0); + Bar _11_bar : packoffset(c0); }; @@ -30,7 +30,7 @@ struct SPIRV_Cross_Output void frag_main() { - FragColor = (_6_foo.v + _9_bar.v).xxxx; + FragColor = (_8_foo.v + _11_bar.v).xxxx; } SPIRV_Cross_Output main() diff --git a/reference/shaders-hlsl-no-opt/asm/frag/switch-block-case-fallthrough.asm.invalid.frag b/reference/shaders-hlsl-no-opt/asm/frag/switch-block-case-fallthrough.asm.invalid.frag index 19af59d3..5ac03c23 100644 --- a/reference/shaders-hlsl-no-opt/asm/frag/switch-block-case-fallthrough.asm.invalid.frag +++ b/reference/shaders-hlsl-no-opt/asm/frag/switch-block-case-fallthrough.asm.invalid.frag @@ -15,31 +15,31 @@ void frag_main() { int i = 0; int j; - int _30; - int _31; + int _33; + int _34; switch (vIndex) { case 0: { - _30 = 3; - j = _30; - _31 = 0; - j = _31; + _33 = 3; + j = _33; + _34 = 0; + j = _34; break; } default: { - _30 = 2; - j = _30; - _31 = 0; - j = _31; + _33 = 2; + j = _33; + _34 = 0; + j = _34; break; } case 1: case 11: { - _31 = 1; - j = _31; + _34 = 1; + j = _34; break; } case 2: diff --git a/reference/shaders-hlsl-no-opt/asm/mesh/mesh-shader-plain-builtin-outputs.spv14.asm.vk.nocompat.mesh b/reference/shaders-hlsl-no-opt/asm/mesh/mesh-shader-plain-builtin-outputs.spv14.asm.vk.nocompat.mesh index 8fbd2915..ec882be5 100644 --- a/reference/shaders-hlsl-no-opt/asm/mesh/mesh-shader-plain-builtin-outputs.spv14.asm.vk.nocompat.mesh +++ b/reference/shaders-hlsl-no-opt/asm/mesh/mesh-shader-plain-builtin-outputs.spv14.asm.vk.nocompat.mesh @@ -23,41 +23,41 @@ struct gl_MeshPerPrimitiveEXT bool gl_CullPrimitiveEXT : SV_CullPrimitive; }; -groupshared float _9[64]; +groupshared float _32[64]; -void mesh_main(inout gl_MeshPerVertexEXT gl_MeshVerticesEXT[24], _12 _11, inout uint3 gl_PrimitiveTriangleIndicesEXT[8], inout gl_MeshPerPrimitiveEXT gl_MeshPrimitivesEXT[8]) +void mesh_main(inout gl_MeshPerVertexEXT gl_MeshVerticesEXT[24], _12 _38, inout uint3 gl_PrimitiveTriangleIndicesEXT[8], inout gl_MeshPerPrimitiveEXT gl_MeshPrimitivesEXT[8]) { - _9[gl_LocalInvocationIndex] = float(gl_LocalInvocationIndex); + _32[gl_LocalInvocationIndex] = float(gl_LocalInvocationIndex); GroupMemoryBarrierWithGroupSync(); SetMeshOutputCounts(24u, 8u); - gl_MeshVerticesEXT[gl_LocalInvocationIndex].gl_Position.x = _9[gl_LocalInvocationIndex]; - gl_MeshVerticesEXT[gl_LocalInvocationIndex].gl_Position.y = _9[gl_LocalInvocationIndex]; - gl_MeshVerticesEXT[gl_LocalInvocationIndex].gl_Position.z = _9[gl_LocalInvocationIndex]; - gl_MeshVerticesEXT[gl_LocalInvocationIndex].gl_Position.w = _9[gl_LocalInvocationIndex]; - float _63 = _11._m0 + _9[gl_LocalInvocationIndex ^ 1u]; - gl_MeshVerticesEXT[gl_LocalInvocationIndex].B.x = _63; - gl_MeshVerticesEXT[gl_LocalInvocationIndex].B.y = _63; - gl_MeshVerticesEXT[gl_LocalInvocationIndex].B.z = _63; - gl_MeshVerticesEXT[gl_LocalInvocationIndex].B.w = _63; + gl_MeshVerticesEXT[gl_LocalInvocationIndex].gl_Position.x = _32[gl_LocalInvocationIndex]; + gl_MeshVerticesEXT[gl_LocalInvocationIndex].gl_Position.y = _32[gl_LocalInvocationIndex]; + gl_MeshVerticesEXT[gl_LocalInvocationIndex].gl_Position.z = _32[gl_LocalInvocationIndex]; + gl_MeshVerticesEXT[gl_LocalInvocationIndex].gl_Position.w = _32[gl_LocalInvocationIndex]; + float _59 = _38._m0 + _32[gl_LocalInvocationIndex ^ 1u]; + gl_MeshVerticesEXT[gl_LocalInvocationIndex].B.x = _59; + gl_MeshVerticesEXT[gl_LocalInvocationIndex].B.y = _59; + gl_MeshVerticesEXT[gl_LocalInvocationIndex].B.z = _59; + gl_MeshVerticesEXT[gl_LocalInvocationIndex].B.w = _59; if (gl_LocalInvocationIndex < 8u) { - uint _71 = gl_LocalInvocationIndex * 3u; - gl_PrimitiveTriangleIndicesEXT[gl_LocalInvocationIndex] = uint3(_71, _71 + 1u, _71 + 2u); + uint _65 = gl_LocalInvocationIndex * 3u; + gl_PrimitiveTriangleIndicesEXT[gl_LocalInvocationIndex] = uint3(_65, _65 + 1u, _65 + 2u); gl_MeshPrimitivesEXT[gl_LocalInvocationIndex].gl_CullPrimitiveEXT = (gl_LocalInvocationIndex & 1u) != 0u; gl_MeshPrimitivesEXT[gl_LocalInvocationIndex].gl_PrimitiveID = int(gl_LocalInvocationIndex); gl_MeshPrimitivesEXT[gl_LocalInvocationIndex].gl_Layer = int(gl_LocalInvocationIndex); - uint _81 = gl_LocalInvocationIndex ^ 2u; - gl_MeshPrimitivesEXT[gl_LocalInvocationIndex].C.x = _9[_81]; - gl_MeshPrimitivesEXT[gl_LocalInvocationIndex].C.y = _9[_81]; - gl_MeshPrimitivesEXT[gl_LocalInvocationIndex].C.z = _9[_81]; - gl_MeshPrimitivesEXT[gl_LocalInvocationIndex].C.w = _9[_81]; + uint _78 = gl_LocalInvocationIndex ^ 2u; + gl_MeshPrimitivesEXT[gl_LocalInvocationIndex].C.x = _32[_78]; + gl_MeshPrimitivesEXT[gl_LocalInvocationIndex].C.y = _32[_78]; + gl_MeshPrimitivesEXT[gl_LocalInvocationIndex].C.z = _32[_78]; + gl_MeshPrimitivesEXT[gl_LocalInvocationIndex].C.w = _32[_78]; } } [outputtopology("triangle")] [numthreads(2, 3, 4)] -void main(SPIRV_Cross_Input stage_input, out vertices gl_MeshPerVertexEXT gl_MeshVerticesEXT[24], in payload _12 _11, out indices uint3 gl_PrimitiveTriangleIndicesEXT[8], out primitives gl_MeshPerPrimitiveEXT gl_MeshPrimitivesEXT[8]) +void main(SPIRV_Cross_Input stage_input, out vertices gl_MeshPerVertexEXT gl_MeshVerticesEXT[24], in payload _12 _38, out indices uint3 gl_PrimitiveTriangleIndicesEXT[8], out primitives gl_MeshPerPrimitiveEXT gl_MeshPrimitivesEXT[8]) { gl_LocalInvocationIndex = stage_input.gl_LocalInvocationIndex; - mesh_main(gl_MeshVerticesEXT, _11, gl_PrimitiveTriangleIndicesEXT, gl_MeshPrimitivesEXT); + mesh_main(gl_MeshVerticesEXT, _38, gl_PrimitiveTriangleIndicesEXT, gl_MeshPrimitivesEXT); } diff --git a/reference/shaders-hlsl-no-opt/asm/temporary.zero-initialize.asm.frag b/reference/shaders-hlsl-no-opt/asm/temporary.zero-initialize.asm.frag index dbdd7845..040cae6d 100644 --- a/reference/shaders-hlsl-no-opt/asm/temporary.zero-initialize.asm.frag +++ b/reference/shaders-hlsl-no-opt/asm/temporary.zero-initialize.asm.frag @@ -16,19 +16,19 @@ struct SPIRV_Cross_Output void frag_main() { FragColor = 0.0f.xxxx; - int _10 = 0; - int _15 = 0; - for (int _16 = 0, _17 = 0; _16 < vA; _17 = _15, _16 += _10) + int _49 = 0; + int _58 = 0; + for (int _57 = 0, _60 = 0; _57 < vA; _60 = _58, _57 += _49) { - if ((vA + _16) == 20) + if ((vA + _57) == 20) { - _15 = 50; + _58 = 50; } else { - _15 = ((vB + _16) == 40) ? 60 : _17; + _58 = ((vB + _57) == 40) ? 60 : _60; } - _10 = _15 + 10; + _49 = _58 + 10; FragColor += 1.0f.xxxx; } } diff --git a/reference/shaders-hlsl-no-opt/asm/vert/block-struct-initializer.asm.vert b/reference/shaders-hlsl-no-opt/asm/vert/block-struct-initializer.asm.vert index 72a86d2d..990b2506 100644 --- a/reference/shaders-hlsl-no-opt/asm/vert/block-struct-initializer.asm.vert +++ b/reference/shaders-hlsl-no-opt/asm/vert/block-struct-initializer.asm.vert @@ -10,11 +10,11 @@ struct Foo float d; }; -static const Vert _11 = { 0.0f, 0.0f }; -static const Foo _13 = { 0.0f, 0.0f }; +static const Vert _12 = { 0.0f, 0.0f }; +static const Foo _14 = { 0.0f, 0.0f }; -static Vert _3 = { 0.0f, 0.0f }; -static Foo foo = _13; +static Vert _4 = { 0.0f, 0.0f }; +static Foo foo = _14; struct SPIRV_Cross_Output { @@ -31,8 +31,8 @@ SPIRV_Cross_Output main() { vert_main(); SPIRV_Cross_Output stage_output; - stage_output.Vert_a = _3.a; - stage_output.Vert_b = _3.b; + stage_output.Vert_a = _4.a; + stage_output.Vert_b = _4.b; stage_output.foo = foo; return stage_output; } diff --git a/reference/shaders-hlsl-no-opt/asm/vert/empty-struct-composite.asm.vert b/reference/shaders-hlsl-no-opt/asm/vert/empty-struct-composite.asm.vert index ba1f5767..8574005f 100644 --- a/reference/shaders-hlsl-no-opt/asm/vert/empty-struct-composite.asm.vert +++ b/reference/shaders-hlsl-no-opt/asm/vert/empty-struct-composite.asm.vert @@ -5,8 +5,8 @@ struct Test void vert_main() { - Test _14 = { 0 }; - Test t = _14; + Test _13 = { 0 }; + Test t = _13; } void main() diff --git a/reference/shaders-hlsl-no-opt/comp/illegal-struct-name.asm.comp b/reference/shaders-hlsl-no-opt/comp/illegal-struct-name.asm.comp index dc972bdd..15b8a00e 100644 --- a/reference/shaders-hlsl-no-opt/comp/illegal-struct-name.asm.comp +++ b/reference/shaders-hlsl-no-opt/comp/illegal-struct-name.asm.comp @@ -3,16 +3,16 @@ struct Foo float _abs; }; -RWByteAddressBuffer _7 : register(u0); +RWByteAddressBuffer _9 : register(u0); void comp_main() { - Foo _24; - _24._abs = asfloat(_7.Load(0)); + Foo _18; + _18._abs = asfloat(_9.Load(0)); Foo f; - f._abs = _24._abs; + f._abs = _18._abs; int _abs = 10; - _7.Store(4, asuint(f._abs)); + _9.Store(4, asuint(f._abs)); } [numthreads(1, 1, 1)] diff --git a/reference/shaders-hlsl/asm/comp/access-chain-invalidate.asm.comp b/reference/shaders-hlsl/asm/comp/access-chain-invalidate.asm.comp index b8265fc9..9e3b90fa 100644 --- a/reference/shaders-hlsl/asm/comp/access-chain-invalidate.asm.comp +++ b/reference/shaders-hlsl/asm/comp/access-chain-invalidate.asm.comp @@ -1,15 +1,15 @@ -RWByteAddressBuffer _4 : register(u0); +RWByteAddressBuffer _6 : register(u0); void comp_main() { - uint _21 = _4.Load(_4.Load(0) * 4 + 4); - for (uint _23 = 0u; _23 < 64u; ) + uint _21 = _6.Load(_6.Load(0) * 4 + 4); + for (uint _40 = 0u; _40 < 64u; ) { - _4.Store(_23 * 4 + 4, 0u); - _23++; + _6.Store(_40 * 4 + 4, 0u); + _40++; continue; } - _4.Store(_4.Load(0) * 4 + 4, _21); + _6.Store(_6.Load(0) * 4 + 4, _21); } [numthreads(1, 1, 1)] diff --git a/reference/shaders-hlsl/asm/comp/atomic-decrement.asm.comp b/reference/shaders-hlsl/asm/comp/atomic-decrement.asm.comp index 919fe9ba..97af5ba0 100644 --- a/reference/shaders-hlsl/asm/comp/atomic-decrement.asm.comp +++ b/reference/shaders-hlsl/asm/comp/atomic-decrement.asm.comp @@ -9,10 +9,10 @@ struct SPIRV_Cross_Input void comp_main() { - uint _29; - u0_counter.InterlockedAdd(0, -1, _29); + uint _24; + u0_counter.InterlockedAdd(0, -1, _24); float4 r0; - r0.x = asfloat(_29); + r0.x = asfloat(_24); u0[(uint(asint(r0.x)) * 1u) + (uint(0) >> 2u)] = uint(int(gl_GlobalInvocationID.x)).x; } diff --git a/reference/shaders-hlsl/asm/comp/atomic-increment.asm.comp b/reference/shaders-hlsl/asm/comp/atomic-increment.asm.comp index 35960b0a..6b9646ed 100644 --- a/reference/shaders-hlsl/asm/comp/atomic-increment.asm.comp +++ b/reference/shaders-hlsl/asm/comp/atomic-increment.asm.comp @@ -9,10 +9,10 @@ struct SPIRV_Cross_Input void comp_main() { - uint _29; - u0_counter.InterlockedAdd(0, 1, _29); + uint _24; + u0_counter.InterlockedAdd(0, 1, _24); float4 r0; - r0.x = asfloat(_29); + r0.x = asfloat(_24); u0[(uint(asint(r0.x)) * 1u) + (uint(0) >> 2u)] = uint(int(gl_GlobalInvocationID.x)).x; } diff --git a/reference/shaders-hlsl/asm/frag/cbuffer-stripped.asm.frag b/reference/shaders-hlsl/asm/frag/cbuffer-stripped.asm.frag index 3d5d6288..dad44369 100644 --- a/reference/shaders-hlsl/asm/frag/cbuffer-stripped.asm.frag +++ b/reference/shaders-hlsl/asm/frag/cbuffer-stripped.asm.frag @@ -1,32 +1,32 @@ -cbuffer _4_5 : register(b0) +cbuffer _6_7 : register(b0) { - column_major float2x4 _5_m0 : packoffset(c0); - float4 _5_m1 : packoffset(c4); + column_major float2x4 _7_m0 : packoffset(c0); + float4 _7_m1 : packoffset(c4); }; -static float2 _3; +static float2 _4; struct SPIRV_Cross_Output { - float2 _3 : SV_Target0; + float2 _4 : SV_Target0; }; -float2 _23() +float2 _29() { - float2 _25 = mul(_5_m0, _5_m1); - return _25; + float2 _30 = mul(_7_m0, _7_m1); + return _30; } void frag_main() { - _3 = _23(); + _4 = _29(); } SPIRV_Cross_Output main() { frag_main(); SPIRV_Cross_Output stage_output; - stage_output._3 = _3; + stage_output._4 = _4; return stage_output; } diff --git a/reference/shaders-hlsl/asm/frag/empty-struct.asm.frag b/reference/shaders-hlsl/asm/frag/empty-struct.asm.frag index 38d12cd6..92b823c1 100644 --- a/reference/shaders-hlsl/asm/frag/empty-struct.asm.frag +++ b/reference/shaders-hlsl/asm/frag/empty-struct.asm.frag @@ -15,10 +15,10 @@ float GetValue_1(EmptyStructTest self) void frag_main() { - EmptyStructTest _23 = { 0 }; + EmptyStructTest _24 = { 0 }; EmptyStructTest emptyStruct; float value = GetValue(emptyStruct); - value = GetValue_1(_23); + value = GetValue_1(_24); } void main() diff --git a/reference/shaders-hlsl/asm/frag/image-extract-reuse.asm.frag b/reference/shaders-hlsl/asm/frag/image-extract-reuse.asm.frag index 2527d10f..0f858d21 100644 --- a/reference/shaders-hlsl/asm/frag/image-extract-reuse.asm.frag +++ b/reference/shaders-hlsl/asm/frag/image-extract-reuse.asm.frag @@ -17,9 +17,9 @@ uint2 spvTextureSize(Texture2D Tex, uint Level, out uint Param) void frag_main() { + uint _18_dummy_parameter; uint _19_dummy_parameter; - uint _20_dummy_parameter; - Size = int2(spvTextureSize(uTexture, uint(0), _19_dummy_parameter)) + int2(spvTextureSize(uTexture, uint(1), _20_dummy_parameter)); + Size = int2(spvTextureSize(uTexture, uint(0), _18_dummy_parameter)) + int2(spvTextureSize(uTexture, uint(1), _19_dummy_parameter)); } SPIRV_Cross_Output main() diff --git a/reference/shaders-hlsl/asm/frag/implicit-read-dep-phi.asm.frag b/reference/shaders-hlsl/asm/frag/implicit-read-dep-phi.asm.frag index f668d634..3e87d254 100644 --- a/reference/shaders-hlsl/asm/frag/implicit-read-dep-phi.asm.frag +++ b/reference/shaders-hlsl/asm/frag/implicit-read-dep-phi.asm.frag @@ -18,20 +18,20 @@ void frag_main() { int i = 0; float phi; - float4 _36; + float4 _45; phi = 1.0f; - _36 = float4(1.0f, 2.0f, 1.0f, 2.0f); + _45 = float4(1.0f, 2.0f, 1.0f, 2.0f); for (;;) { - FragColor = _36; + FragColor = _45; if (i < 4) { if (v0[i] > 0.0f) { - float2 _48 = phi.xx; + float2 _43 = phi.xx; i++; phi += 2.0f; - _36 = uImage.SampleLevel(_uImage_sampler, _48, 0.0f); + _45 = uImage.SampleLevel(_uImage_sampler, _43, 0.0f); continue; } else diff --git a/reference/shaders-hlsl/asm/frag/lut-promotion-initializer.asm.frag b/reference/shaders-hlsl/asm/frag/lut-promotion-initializer.asm.frag index a7aec01b..ee01ba28 100644 --- a/reference/shaders-hlsl/asm/frag/lut-promotion-initializer.asm.frag +++ b/reference/shaders-hlsl/asm/frag/lut-promotion-initializer.asm.frag @@ -1,6 +1,6 @@ -static const float _46[16] = { 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f }; -static const float4 _76[4] = { 0.0f.xxxx, 1.0f.xxxx, 8.0f.xxxx, 5.0f.xxxx }; -static const float4 _90[4] = { 20.0f.xxxx, 30.0f.xxxx, 50.0f.xxxx, 60.0f.xxxx }; +static const float _16[16] = { 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f }; +static const float4 _60[4] = { 0.0f.xxxx, 1.0f.xxxx, 8.0f.xxxx, 5.0f.xxxx }; +static const float4 _104[4] = { 20.0f.xxxx, 30.0f.xxxx, 50.0f.xxxx, 60.0f.xxxx }; static float FragColor; static int index; @@ -17,31 +17,31 @@ struct SPIRV_Cross_Output void frag_main() { - float4 foobar[4] = _76; - float4 baz[4] = _76; - FragColor = _46[index]; + float4 foobar[4] = _60; + float4 baz[4] = _60; + FragColor = _16[index]; if (index < 10) { - FragColor += _46[index ^ 1]; + FragColor += _16[index ^ 1]; } else { - FragColor += _46[index & 1]; + FragColor += _16[index & 1]; } if (index > 30) { - FragColor += _76[index & 3].y; + FragColor += _60[index & 3].y; } else { - FragColor += _76[index & 1].x; + FragColor += _60[index & 1].x; } if (index > 30) { foobar[1].z = 20.0f; } FragColor += foobar[index & 3].z; - baz = _90; + baz = _104; FragColor += baz[index & 3].z; } diff --git a/reference/shaders-hlsl/asm/frag/unreachable.asm.frag b/reference/shaders-hlsl/asm/frag/unreachable.asm.frag index 5eb70adf..2070215d 100644 --- a/reference/shaders-hlsl/asm/frag/unreachable.asm.frag +++ b/reference/shaders-hlsl/asm/frag/unreachable.asm.frag @@ -1,4 +1,4 @@ -static float4 _21; +static float4 _44; static int counter; static float4 FragColor; @@ -15,23 +15,23 @@ struct SPIRV_Cross_Output void frag_main() { - float4 _24; - _24 = _21; - float4 _33; + float4 _45; + _45 = _44; + float4 _46; for (;;) { if (counter == 10) { - _33 = 10.0f.xxxx; + _46 = 10.0f.xxxx; break; } else { - _33 = 30.0f.xxxx; + _46 = 30.0f.xxxx; break; } } - FragColor = _33; + FragColor = _46; } SPIRV_Cross_Output main(SPIRV_Cross_Input stage_input) diff --git a/reference/shaders-hlsl/asm/vert/spec-constant-op-composite.asm.vert b/reference/shaders-hlsl/asm/vert/spec-constant-op-composite.asm.vert index 2a332551..10fae807 100644 --- a/reference/shaders-hlsl/asm/vert/spec-constant-op-composite.asm.vert +++ b/reference/shaders-hlsl/asm/vert/spec-constant-op-composite.asm.vert @@ -1,40 +1,40 @@ #ifndef SPIRV_CROSS_CONSTANT_ID_201 #define SPIRV_CROSS_CONSTANT_ID_201 -10 #endif -static const int _7 = SPIRV_CROSS_CONSTANT_ID_201; -static const int _20 = (_7 + 2); +static const int _13 = SPIRV_CROSS_CONSTANT_ID_201; +static const int _15 = (_13 + 2); #ifndef SPIRV_CROSS_CONSTANT_ID_202 #define SPIRV_CROSS_CONSTANT_ID_202 100u #endif -static const uint _8 = SPIRV_CROSS_CONSTANT_ID_202; -static const uint _25 = (_8 % 5u); -static const int4 _30 = int4(20, 30, _20, _20); -static const int2 _32 = int2(_30.y, _30.x); -static const int _33 = _30.y; +static const uint _24 = SPIRV_CROSS_CONSTANT_ID_202; +static const uint _26 = (_24 % 5u); +static const int4 _36 = int4(20, 30, _15, _15); +static const int2 _41 = int2(_36.y, _36.x); +static const int _60 = _36.y; #ifndef SPIRV_CROSS_CONSTANT_ID_200 #define SPIRV_CROSS_CONSTANT_ID_200 3.141590118408203125f #endif -static const float _9 = SPIRV_CROSS_CONSTANT_ID_200; +static const float _57 = SPIRV_CROSS_CONSTANT_ID_200; static float4 gl_Position; -static int _4; +static int _58; struct SPIRV_Cross_Output { - nointerpolation int _4 : TEXCOORD0; + nointerpolation int _58 : TEXCOORD0; float4 gl_Position : SV_Position; }; void vert_main() { float4 pos = 0.0f.xxxx; - pos.y += float(_20); - pos.z += float(_25); - pos += float4(_30); - float2 _56 = pos.xy + float2(_32); - pos = float4(_56.x, _56.y, pos.z, pos.w); + pos.y += float(_15); + pos.z += float(_26); + pos += float4(_36); + float2 _46 = pos.xy + float2(_41); + pos = float4(_46.x, _46.y, pos.z, pos.w); gl_Position = pos; - _4 = _33; + _58 = _60; } SPIRV_Cross_Output main() @@ -42,6 +42,6 @@ SPIRV_Cross_Output main() vert_main(); SPIRV_Cross_Output stage_output; stage_output.gl_Position = gl_Position; - stage_output._4 = _4; + stage_output._58 = _58; return stage_output; } diff --git a/reference/shaders-msl-no-opt/asm/comp/aliased-struct-divergent-member-name.asm.comp b/reference/shaders-msl-no-opt/asm/comp/aliased-struct-divergent-member-name.asm.comp index d24b9666..4151832e 100644 --- a/reference/shaders-msl-no-opt/asm/comp/aliased-struct-divergent-member-name.asm.comp +++ b/reference/shaders-msl-no-opt/asm/comp/aliased-struct-divergent-member-name.asm.comp @@ -29,10 +29,10 @@ struct SSBO2 T_2 bar[1]; }; -kernel void main0(device SSBO1& _7 [[buffer(0)]], device SSBO2& _10 [[buffer(1)]]) +kernel void main0(device SSBO1& _9 [[buffer(0)]], device SSBO2& _13 [[buffer(1)]]) { T v = T{ 40.0 }; - _7.foo[10].b = v.a; - _10.bar[30].c = v.a; + _9.foo[10].b = v.a; + _13.bar[30].c = v.a; } diff --git a/reference/shaders-msl-no-opt/asm/comp/arithmetic-conversion-signs.asm.comp b/reference/shaders-msl-no-opt/asm/comp/arithmetic-conversion-signs.asm.comp index c3f9f5e1..c4c9b8bb 100644 --- a/reference/shaders-msl-no-opt/asm/comp/arithmetic-conversion-signs.asm.comp +++ b/reference/shaders-msl-no-opt/asm/comp/arithmetic-conversion-signs.asm.comp @@ -12,31 +12,31 @@ struct SSBO float f32; }; -kernel void main0(device SSBO& _4 [[buffer(0)]]) +kernel void main0(device SSBO& _6 [[buffer(0)]]) { - int _29 = _4.s32; - uint _30 = _4.u32; - short _31 = _4.s16; - ushort _32 = _4.u16; - float _33 = _4.f32; - _4.s32 = int(_31); - _4.u32 = uint(_31); - _4.s32 = int(short(_32)); - _4.u32 = uint(short(_32)); - _4.u32 = uint(ushort(_31)); - _4.u32 = uint(_32); - _4.s16 = short(_29); - _4.u16 = ushort(_29); - _4.s16 = short(_30); - _4.u16 = ushort(_30); - _4.u16 = ushort(_29); - _4.u16 = ushort(_30); - _4.f32 = float(_31); - _4.f32 = float(short(_32)); - _4.f32 = float(ushort(_31)); - _4.f32 = float(_32); - _4.s16 = short(_33); - _4.u16 = ushort(short(_33)); - _4.u16 = ushort(_33); + int _29 = _6.s32; + uint _30 = _6.u32; + short _31 = _6.s16; + ushort _32 = _6.u16; + float _33 = _6.f32; + _6.s32 = int(_31); + _6.u32 = uint(_31); + _6.s32 = int(short(_32)); + _6.u32 = uint(short(_32)); + _6.u32 = uint(ushort(_31)); + _6.u32 = uint(_32); + _6.s16 = short(_29); + _6.u16 = ushort(_29); + _6.s16 = short(_30); + _6.u16 = ushort(_30); + _6.u16 = ushort(_29); + _6.u16 = ushort(_30); + _6.f32 = float(_31); + _6.f32 = float(short(_32)); + _6.f32 = float(ushort(_31)); + _6.f32 = float(_32); + _6.s16 = short(_33); + _6.u16 = ushort(short(_33)); + _6.u16 = ushort(_33); } diff --git a/reference/shaders-msl-no-opt/asm/comp/atomic-load-store.asm.comp b/reference/shaders-msl-no-opt/asm/comp/atomic-load-store.asm.comp index 1015d2a5..51aefcc8 100644 --- a/reference/shaders-msl-no-opt/asm/comp/atomic-load-store.asm.comp +++ b/reference/shaders-msl-no-opt/asm/comp/atomic-load-store.asm.comp @@ -14,10 +14,10 @@ struct SSBO constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -kernel void main0(device SSBO& _5 [[buffer(0)]]) +kernel void main0(device SSBO& _7 [[buffer(0)]]) { - uint _20 = atomic_load_explicit((device atomic_uint*)&_5.b, memory_order_relaxed); - uint c = _20; - atomic_store_explicit((device atomic_uint*)&_5.a, c, memory_order_relaxed); + uint _16 = atomic_load_explicit((device atomic_uint*)&_7.b, memory_order_relaxed); + uint c = _16; + atomic_store_explicit((device atomic_uint*)&_7.a, c, memory_order_relaxed); } diff --git a/reference/shaders-msl-no-opt/asm/comp/atomic-min-max-sign.asm.comp b/reference/shaders-msl-no-opt/asm/comp/atomic-min-max-sign.asm.comp index 3fdf46bb..e1ce0b86 100644 --- a/reference/shaders-msl-no-opt/asm/comp/atomic-min-max-sign.asm.comp +++ b/reference/shaders-msl-no-opt/asm/comp/atomic-min-max-sign.asm.comp @@ -14,15 +14,15 @@ struct SSBO constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -kernel void main0(device SSBO& _4 [[buffer(0)]]) +kernel void main0(device SSBO& _6 [[buffer(0)]]) { - uint _26 = atomic_fetch_max_explicit((device atomic_uint*)&_4.a, 1u, memory_order_relaxed); - uint _27 = uint(atomic_fetch_min_explicit((device atomic_int*)&_4.a, int(1u), memory_order_relaxed)); - uint _28 = atomic_fetch_min_explicit((device atomic_uint*)&_4.a, 4294967295u, memory_order_relaxed); - uint _29 = uint(atomic_fetch_max_explicit((device atomic_int*)&_4.a, int(4294967295u), memory_order_relaxed)); - int _30 = atomic_fetch_max_explicit((device atomic_int*)&_4.b, -3, memory_order_relaxed); - int _31 = int(atomic_fetch_min_explicit((device atomic_uint*)&_4.b, uint(-3), memory_order_relaxed)); - int _32 = atomic_fetch_min_explicit((device atomic_int*)&_4.b, 4, memory_order_relaxed); - int _33 = int(atomic_fetch_max_explicit((device atomic_uint*)&_4.b, uint(4), memory_order_relaxed)); + uint _30 = atomic_fetch_max_explicit((device atomic_uint*)&_6.a, 1u, memory_order_relaxed); + uint _31 = uint(atomic_fetch_min_explicit((device atomic_int*)&_6.a, int(1u), memory_order_relaxed)); + uint _32 = atomic_fetch_min_explicit((device atomic_uint*)&_6.a, 4294967295u, memory_order_relaxed); + uint _33 = uint(atomic_fetch_max_explicit((device atomic_int*)&_6.a, int(4294967295u), memory_order_relaxed)); + int _34 = atomic_fetch_max_explicit((device atomic_int*)&_6.b, -3, memory_order_relaxed); + int _35 = int(atomic_fetch_min_explicit((device atomic_uint*)&_6.b, uint(-3), memory_order_relaxed)); + int _36 = atomic_fetch_min_explicit((device atomic_int*)&_6.b, 4, memory_order_relaxed); + int _37 = int(atomic_fetch_max_explicit((device atomic_uint*)&_6.b, uint(4), memory_order_relaxed)); } diff --git a/reference/shaders-msl-no-opt/asm/comp/atomic-result-temporary.asm.comp b/reference/shaders-msl-no-opt/asm/comp/atomic-result-temporary.asm.comp index 4624ef0b..2ac0626e 100644 --- a/reference/shaders-msl-no-opt/asm/comp/atomic-result-temporary.asm.comp +++ b/reference/shaders-msl-no-opt/asm/comp/atomic-result-temporary.asm.comp @@ -12,12 +12,12 @@ struct SSBO uint data[1]; }; -kernel void main0(device SSBO& _5 [[buffer(0)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]]) +kernel void main0(device SSBO& _7 [[buffer(0)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]]) { - uint _24 = atomic_fetch_add_explicit((device atomic_uint*)&_5.count, 1u, memory_order_relaxed); - if (_24 < 1024u) + uint _19 = atomic_fetch_add_explicit((device atomic_uint*)&_7.count, 1u, memory_order_relaxed); + if (_19 < 1024u) { - _5.data[_24] = gl_GlobalInvocationID.x; + _7.data[_19] = gl_GlobalInvocationID.x; } } diff --git a/reference/shaders-msl-no-opt/asm/comp/bitcast-fp16-fp32.asm.comp b/reference/shaders-msl-no-opt/asm/comp/bitcast-fp16-fp32.asm.comp index 0d63f5fa..2a692f63 100644 --- a/reference/shaders-msl-no-opt/asm/comp/bitcast-fp16-fp32.asm.comp +++ b/reference/shaders-msl-no-opt/asm/comp/bitcast-fp16-fp32.asm.comp @@ -13,9 +13,9 @@ struct SSBO constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -kernel void main0(device SSBO& _4 [[buffer(0)]]) +kernel void main0(device SSBO& _6 [[buffer(0)]]) { - _4.b = as_type(_4.a); - _4.d = as_type(_4.c); + _6.b = as_type(_6.a); + _6.d = as_type(_6.c); } diff --git a/reference/shaders-msl-no-opt/asm/comp/bitfield-signed-operations.asm.comp b/reference/shaders-msl-no-opt/asm/comp/bitfield-signed-operations.asm.comp index 8e198a94..cbf0b513 100644 --- a/reference/shaders-msl-no-opt/asm/comp/bitfield-signed-operations.asm.comp +++ b/reference/shaders-msl-no-opt/asm/comp/bitfield-signed-operations.asm.comp @@ -9,21 +9,21 @@ struct SSBO uint4 uints; }; -kernel void main0(device SSBO& _3 [[buffer(0)]]) +kernel void main0(device SSBO& _4 [[buffer(0)]]) { - int4 _19 = _3.ints; - uint4 _20 = _3.uints; - _3.ints = popcount(_19); - _3.uints = uint4(popcount(_19)); - _3.ints = int4(popcount(_20)); - _3.uints = popcount(_20); - _3.ints = reverse_bits(_19); - _3.uints = reverse_bits(_20); - _3.ints = extract_bits(_19, uint(1), 11u); - _3.uints = uint4(extract_bits(int4(_20), 11u, uint(1))); - _3.ints = int4(extract_bits(uint4(_19), uint(1), 11u)); - _3.uints = extract_bits(_20, 11u, uint(1)); - _3.ints = insert_bits(_19, _19.wzyx, uint(1), 11u); - _3.uints = insert_bits(_20, _20.wzyx, 11u, uint(1)); + int4 _19 = _4.ints; + uint4 _20 = _4.uints; + _4.ints = popcount(_19); + _4.uints = uint4(popcount(_19)); + _4.ints = int4(popcount(_20)); + _4.uints = popcount(_20); + _4.ints = reverse_bits(_19); + _4.uints = reverse_bits(_20); + _4.ints = extract_bits(_19, uint(1), 11u); + _4.uints = uint4(extract_bits(int4(_20), 11u, uint(1))); + _4.ints = int4(extract_bits(uint4(_19), uint(1), 11u)); + _4.uints = extract_bits(_20, 11u, uint(1)); + _4.ints = insert_bits(_19, _19.wzyx, uint(1), 11u); + _4.uints = insert_bits(_20, _20.wzyx, 11u, uint(1)); } diff --git a/reference/shaders-msl-no-opt/asm/comp/bitscan.asm.comp b/reference/shaders-msl-no-opt/asm/comp/bitscan.asm.comp index 1be65ec7..1eaa940d 100644 --- a/reference/shaders-msl-no-opt/asm/comp/bitscan.asm.comp +++ b/reference/shaders-msl-no-opt/asm/comp/bitscan.asm.comp @@ -33,21 +33,21 @@ struct SSBO int4 i; }; -kernel void main0(device SSBO& _4 [[buffer(0)]]) +kernel void main0(device SSBO& _6 [[buffer(0)]]) { - uint4 _19 = _4.u; - int4 _20 = _4.i; - _4.u = spvFindLSB(_19); - _4.i = int4(spvFindLSB(_19)); - _4.u = uint4(spvFindLSB(_20)); - _4.i = spvFindLSB(_20); - _4.u = spvFindUMSB(_19); - _4.i = int4(spvFindUMSB(_19)); - _4.u = spvFindUMSB(uint4(_20)); - _4.i = int4(spvFindUMSB(uint4(_20))); - _4.u = uint4(spvFindSMSB(int4(_19))); - _4.i = spvFindSMSB(int4(_19)); - _4.u = uint4(spvFindSMSB(_20)); - _4.i = spvFindSMSB(_20); + uint4 _19 = _6.u; + int4 _20 = _6.i; + _6.u = spvFindLSB(_19); + _6.i = int4(spvFindLSB(_19)); + _6.u = uint4(spvFindLSB(_20)); + _6.i = spvFindLSB(_20); + _6.u = spvFindUMSB(_19); + _6.i = int4(spvFindUMSB(_19)); + _6.u = spvFindUMSB(uint4(_20)); + _6.i = int4(spvFindUMSB(uint4(_20))); + _6.u = uint4(spvFindSMSB(int4(_19))); + _6.i = spvFindSMSB(int4(_19)); + _6.u = uint4(spvFindSMSB(_20)); + _6.i = spvFindSMSB(_20); } diff --git a/reference/shaders-msl-no-opt/asm/comp/block-like-array-type-construct.asm.comp b/reference/shaders-msl-no-opt/asm/comp/block-like-array-type-construct.asm.comp index f3f73fbd..8c886bb6 100644 --- a/reference/shaders-msl-no-opt/asm/comp/block-like-array-type-construct.asm.comp +++ b/reference/shaders-msl-no-opt/asm/comp/block-like-array-type-construct.asm.comp @@ -44,7 +44,7 @@ struct spvUnsafeArray } }; -struct _10 +struct _12 { float _m0[4]; float _m1[4]; @@ -58,19 +58,19 @@ struct SSBO int b; }; -constant spvUnsafeArray _31 = spvUnsafeArray({ 1.0, 2.0, 3.0, 4.0 }); +constant spvUnsafeArray _36 = spvUnsafeArray({ 1.0, 2.0, 3.0, 4.0 }); kernel void main0() { - spvUnsafeArray<_10, 2> _34 = spvUnsafeArray<_10, 2>({ _10{ { 1.0, 2.0, 3.0, 4.0 }, { 1.0, 2.0, 3.0, 4.0 } }, _10{ { 1.0, 2.0, 3.0, 4.0 }, { 1.0, 2.0, 3.0, 4.0 } } }); + spvUnsafeArray<_12, 2> _39 = spvUnsafeArray<_12, 2>({ _12{ { 1.0, 2.0, 3.0, 4.0 }, { 1.0, 2.0, 3.0, 4.0 } }, _12{ { 1.0, 2.0, 3.0, 4.0 }, { 1.0, 2.0, 3.0, 4.0 } } }); spvUnsafeArray foo; foo[0] = 1.0; - foo = _31; + foo = _36; foo[1] = 2.0; foo[2] = 3.0; foo[3] = 4.0; spvUnsafeArray foo2 = foo; - _10 _37 = _10{ { foo[0], foo[1], foo[2], foo[3] }, { foo2[0], foo2[1], foo2[2], foo2[3] } }; + _12 _41 = _12{ { foo[0], foo[1], foo[2], foo[3] }, { foo2[0], foo2[1], foo2[2], foo2[3] } }; } diff --git a/reference/shaders-msl-no-opt/asm/comp/constant-lut-name-aliasing.asm.comp b/reference/shaders-msl-no-opt/asm/comp/constant-lut-name-aliasing.asm.comp index a5b6fc32..e9f2ba79 100644 --- a/reference/shaders-msl-no-opt/asm/comp/constant-lut-name-aliasing.asm.comp +++ b/reference/shaders-msl-no-opt/asm/comp/constant-lut-name-aliasing.asm.comp @@ -54,8 +54,8 @@ constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(4u, 4u, 1u); constant spvUnsafeArray indexable = spvUnsafeArray({ 0, 1, 2, 3 }); constant spvUnsafeArray indexable_1 = spvUnsafeArray({ 4, 5, 6, 7 }); -kernel void main0(device SSBO& _6 [[buffer(0)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]], uint3 gl_LocalInvocationID [[thread_position_in_threadgroup]]) +kernel void main0(device SSBO& _8 [[buffer(0)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]], uint3 gl_LocalInvocationID [[thread_position_in_threadgroup]]) { - _6.values[gl_GlobalInvocationID.x] = indexable[gl_LocalInvocationID.x] + indexable_1[gl_LocalInvocationID.y]; + _8.values[gl_GlobalInvocationID.x] = indexable[gl_LocalInvocationID.x] + indexable_1[gl_LocalInvocationID.y]; } diff --git a/reference/shaders-msl-no-opt/asm/comp/copy-logical-2.spv14.asm.comp b/reference/shaders-msl-no-opt/asm/comp/copy-logical-2.spv14.asm.comp index 09a31d68..e0f21144 100644 --- a/reference/shaders-msl-no-opt/asm/comp/copy-logical-2.spv14.asm.comp +++ b/reference/shaders-msl-no-opt/asm/comp/copy-logical-2.spv14.asm.comp @@ -3,12 +3,12 @@ using namespace metal; -struct _11 +struct _13 { float2x2 _m0; }; -struct _12 +struct _14 { float2x4 _m0; }; @@ -23,7 +23,7 @@ struct C float4 c; B2 b2; B2 b2_array[4]; - _12 _m3; + _14 _m3; }; struct B1 @@ -36,25 +36,25 @@ struct A float4 a; B1 b1; B1 b1_array[4]; - _11 _m3; + _13 _m3; }; -struct _8 +struct _10 { A a_block; C c_block; }; -kernel void main0(device _8& _3 [[buffer(0)]]) +kernel void main0(device _10& _4 [[buffer(0)]]) { - A _31; - _31.a = _3.c_block.c; - _31.b1.elem1 = _3.c_block.b2.elem2; - _31.b1_array[0].elem1 = _3.c_block.b2_array[0].elem2; - _31.b1_array[1].elem1 = _3.c_block.b2_array[1].elem2; - _31.b1_array[2].elem1 = _3.c_block.b2_array[2].elem2; - _31.b1_array[3].elem1 = _3.c_block.b2_array[3].elem2; - _31._m3._m0 = transpose(float2x2(_3.c_block._m3._m0[0].xy, _3.c_block._m3._m0[1].xy)); - _3.a_block = _31; + A _24; + _24.a = _4.c_block.c; + _24.b1.elem1 = _4.c_block.b2.elem2; + _24.b1_array[0].elem1 = _4.c_block.b2_array[0].elem2; + _24.b1_array[1].elem1 = _4.c_block.b2_array[1].elem2; + _24.b1_array[2].elem1 = _4.c_block.b2_array[2].elem2; + _24.b1_array[3].elem1 = _4.c_block.b2_array[3].elem2; + _24._m3._m0 = transpose(float2x2(_4.c_block._m3._m0[0].xy, _4.c_block._m3._m0[1].xy)); + _4.a_block = _24; } diff --git a/reference/shaders-msl-no-opt/asm/comp/copy-logical-offset-and-array-stride-diffs.spv14.asm.comp b/reference/shaders-msl-no-opt/asm/comp/copy-logical-offset-and-array-stride-diffs.spv14.asm.comp index 54087ddc..ac819095 100644 --- a/reference/shaders-msl-no-opt/asm/comp/copy-logical-offset-and-array-stride-diffs.spv14.asm.comp +++ b/reference/shaders-msl-no-opt/asm/comp/copy-logical-offset-and-array-stride-diffs.spv14.asm.comp @@ -3,52 +3,52 @@ using namespace metal; -struct _8 +struct _9 { char _m0_pad[4]; uint _m0; }; -struct _9 +struct _10 { char _m0_pad[8]; uint _m0; }; -struct _4 +struct _5 { uint _m0; uint4 _m1[2]; uint _m2; char _m3_pad[12]; - _8 _m3; - float4 _m4; - float3 _m5; - float2 _m6; -}; - -struct _5 -{ - uint _m0; - uint _m1[2]; - uint _m2; _9 _m3; float4 _m4; float3 _m5; float2 _m6; }; -kernel void main0(device _5& _2 [[buffer(0)]], device _4& _3 [[buffer(1)]]) +struct _6 { - _4 _23; - _23._m0 = _2._m0; - (thread uint&)_23._m1[0] = _2._m1[0]; - (thread uint&)_23._m1[1] = _2._m1[1]; - _23._m2 = _2._m2; - _23._m3._m0 = _2._m3._m0; - _23._m4 = _2._m4; - _23._m5 = _2._m5; - _23._m6 = _2._m6; - _3 = _23; + uint _m0; + uint _m1[2]; + uint _m2; + _10 _m3; + float4 _m4; + float3 _m5; + float2 _m6; +}; + +kernel void main0(device _6& _3 [[buffer(0)]], device _5& _4 [[buffer(1)]]) +{ + _5 _23; + _23._m0 = _3._m0; + (thread uint&)_23._m1[0] = _3._m1[0]; + (thread uint&)_23._m1[1] = _3._m1[1]; + _23._m2 = _3._m2; + _23._m3._m0 = _3._m3._m0; + _23._m4 = _3._m4; + _23._m5 = _3._m5; + _23._m6 = _3._m6; + _4 = _23; } diff --git a/reference/shaders-msl-no-opt/asm/comp/copy-logical.spv14.asm.comp b/reference/shaders-msl-no-opt/asm/comp/copy-logical.spv14.asm.comp index 22259815..4d39ef50 100644 --- a/reference/shaders-msl-no-opt/asm/comp/copy-logical.spv14.asm.comp +++ b/reference/shaders-msl-no-opt/asm/comp/copy-logical.spv14.asm.comp @@ -27,21 +27,21 @@ struct A B1 b1_array[4]; }; -struct _8 +struct _10 { A a_block; C c_block; }; -kernel void main0(device _8& _3 [[buffer(0)]]) +kernel void main0(device _10& _4 [[buffer(0)]]) { - A _27; - _27.a = _3.c_block.c; - _27.b1.elem1 = _3.c_block.b2.elem2; - _27.b1_array[0].elem1 = _3.c_block.b2_array[0].elem2; - _27.b1_array[1].elem1 = _3.c_block.b2_array[1].elem2; - _27.b1_array[2].elem1 = _3.c_block.b2_array[2].elem2; - _27.b1_array[3].elem1 = _3.c_block.b2_array[3].elem2; - _3.a_block = _27; + A _24; + _24.a = _4.c_block.c; + _24.b1.elem1 = _4.c_block.b2.elem2; + _24.b1_array[0].elem1 = _4.c_block.b2_array[0].elem2; + _24.b1_array[1].elem1 = _4.c_block.b2_array[1].elem2; + _24.b1_array[2].elem1 = _4.c_block.b2_array[2].elem2; + _24.b1_array[3].elem1 = _4.c_block.b2_array[3].elem2; + _4.a_block = _24; } diff --git a/reference/shaders-msl-no-opt/asm/comp/device-constant-array-load-store.asm.comp b/reference/shaders-msl-no-opt/asm/comp/device-constant-array-load-store.asm.comp index 3ebc0d91..3aad395d 100644 --- a/reference/shaders-msl-no-opt/asm/comp/device-constant-array-load-store.asm.comp +++ b/reference/shaders-msl-no-opt/asm/comp/device-constant-array-load-store.asm.comp @@ -168,12 +168,12 @@ kernel void main0(device SSBO& ssbo [[buffer(0)]], constant SSBO& ubo [[buffer(1 threadgroup uint2 _18[2]; spvArrayCopyFromDeviceToDevice1(ssbo._m0[0u]._m0, ssbo._m0[0u]._m1); spvArrayCopyFromConstantToDevice1(ssbo._m0[0u]._m0, ubo._m0[0u]._m1); - spvUnsafeArray _24; - spvArrayCopyFromStackToDevice1(ssbo._m0[0u]._m0, _24.elements); + spvUnsafeArray _23; + spvArrayCopyFromStackToDevice1(ssbo._m0[0u]._m0, _23.elements); spvArrayCopyFromThreadGroupToDevice1(ssbo._m0[0u]._m0, _18); spvArrayCopyFromDeviceToThreadGroup1(_18, ssbo._m0[0u]._m1); - spvArrayCopyFromDeviceToStack1(_24.elements, ssbo._m0[0u]._m1); + spvArrayCopyFromDeviceToStack1(_23.elements, ssbo._m0[0u]._m1); spvArrayCopyFromConstantToThreadGroup1(_18, ubo._m0[0u]._m1); - spvArrayCopyFromConstantToStack1(_24.elements, ubo._m0[0u]._m1); + spvArrayCopyFromConstantToStack1(_23.elements, ubo._m0[0u]._m1); } diff --git a/reference/shaders-msl-no-opt/asm/comp/device-constant-array-load-store.force-native-array.asm.comp b/reference/shaders-msl-no-opt/asm/comp/device-constant-array-load-store.force-native-array.asm.comp index 6f63d36e..599efb4b 100644 --- a/reference/shaders-msl-no-opt/asm/comp/device-constant-array-load-store.force-native-array.asm.comp +++ b/reference/shaders-msl-no-opt/asm/comp/device-constant-array-load-store.force-native-array.asm.comp @@ -129,12 +129,12 @@ kernel void main0(device SSBO& ssbo [[buffer(0)]], constant SSBO& ubo [[buffer(1 threadgroup uint2 _18[2]; spvArrayCopyFromDeviceToDevice1(ssbo._m0[0u]._m0, ssbo._m0[0u]._m1); spvArrayCopyFromConstantToDevice1(ssbo._m0[0u]._m0, ubo._m0[0u]._m1); - uint2 _24[2]; - spvArrayCopyFromStackToDevice1(ssbo._m0[0u]._m0, _24); + uint2 _23[2]; + spvArrayCopyFromStackToDevice1(ssbo._m0[0u]._m0, _23); spvArrayCopyFromThreadGroupToDevice1(ssbo._m0[0u]._m0, _18); spvArrayCopyFromDeviceToThreadGroup1(_18, ssbo._m0[0u]._m1); - spvArrayCopyFromDeviceToStack1(_24, ssbo._m0[0u]._m1); + spvArrayCopyFromDeviceToStack1(_23, ssbo._m0[0u]._m1); spvArrayCopyFromConstantToThreadGroup1(_18, ubo._m0[0u]._m1); - spvArrayCopyFromConstantToStack1(_24, ubo._m0[0u]._m1); + spvArrayCopyFromConstantToStack1(_23, ubo._m0[0u]._m1); } diff --git a/reference/shaders-msl-no-opt/asm/comp/glsl-signed-operations.asm.comp b/reference/shaders-msl-no-opt/asm/comp/glsl-signed-operations.asm.comp index ab7a3363..8a5d965b 100644 --- a/reference/shaders-msl-no-opt/asm/comp/glsl-signed-operations.asm.comp +++ b/reference/shaders-msl-no-opt/asm/comp/glsl-signed-operations.asm.comp @@ -33,41 +33,41 @@ struct SSBO uint4 uints; }; -kernel void main0(device SSBO& _4 [[buffer(0)]]) +kernel void main0(device SSBO& _6 [[buffer(0)]]) { - int4 _19 = _4.ints; - uint4 _20 = _4.uints; - _4.ints = abs(_19); - _4.uints = uint4(abs(_19)); - _4.ints = abs(int4(_20)); - _4.uints = uint4(abs(int4(_20))); - _4.ints = sign(_19); - _4.uints = uint4(sign(_19)); - _4.ints = sign(int4(_20)); - _4.uints = uint4(sign(int4(_20))); - _4.ints = spvFindSMSB(int4(_20)); - _4.uints = uint4(spvFindSMSB(int4(_20))); - _4.ints = int4(spvFindUMSB(uint4(_19))); - _4.uints = spvFindUMSB(uint4(_19)); - _4.ints = min(_19, _19); - _4.uints = uint4(min(_19, int4(_20))); - _4.ints = min(int4(_20), int4(_20)); - _4.uints = uint4(min(int4(_20), _19)); - _4.ints = int4(min(uint4(_19), _20)); - _4.uints = min(uint4(_19), _20); - _4.ints = int4(min(_20, uint4(_19))); - _4.uints = min(_20, uint4(_19)); - _4.ints = max(_19, _19); - _4.uints = uint4(max(_19, _19)); - _4.ints = max(int4(_20), _19); - _4.uints = uint4(max(int4(_20), _19)); - _4.ints = int4(max(uint4(_19), _20)); - _4.uints = max(uint4(_19), uint4(_19)); - _4.ints = int4(max(_20, uint4(_19))); - _4.uints = max(_20, uint4(_19)); - _4.ints = clamp(int4(_20), int4(_20), int4(_20)); - _4.uints = uint4(clamp(int4(_20), int4(_20), int4(_20))); - _4.ints = int4(clamp(uint4(_19), uint4(_19), uint4(_19))); - _4.uints = clamp(uint4(_19), uint4(_19), uint4(_19)); + int4 _19 = _6.ints; + uint4 _20 = _6.uints; + _6.ints = abs(_19); + _6.uints = uint4(abs(_19)); + _6.ints = abs(int4(_20)); + _6.uints = uint4(abs(int4(_20))); + _6.ints = sign(_19); + _6.uints = uint4(sign(_19)); + _6.ints = sign(int4(_20)); + _6.uints = uint4(sign(int4(_20))); + _6.ints = spvFindSMSB(int4(_20)); + _6.uints = uint4(spvFindSMSB(int4(_20))); + _6.ints = int4(spvFindUMSB(uint4(_19))); + _6.uints = spvFindUMSB(uint4(_19)); + _6.ints = min(_19, _19); + _6.uints = uint4(min(_19, int4(_20))); + _6.ints = min(int4(_20), int4(_20)); + _6.uints = uint4(min(int4(_20), _19)); + _6.ints = int4(min(uint4(_19), _20)); + _6.uints = min(uint4(_19), _20); + _6.ints = int4(min(_20, uint4(_19))); + _6.uints = min(_20, uint4(_19)); + _6.ints = max(_19, _19); + _6.uints = uint4(max(_19, _19)); + _6.ints = max(int4(_20), _19); + _6.uints = uint4(max(int4(_20), _19)); + _6.ints = int4(max(uint4(_19), _20)); + _6.uints = max(uint4(_19), uint4(_19)); + _6.ints = int4(max(_20, uint4(_19))); + _6.uints = max(_20, uint4(_19)); + _6.ints = clamp(int4(_20), int4(_20), int4(_20)); + _6.uints = uint4(clamp(int4(_20), int4(_20), int4(_20))); + _6.ints = int4(clamp(uint4(_19), uint4(_19), uint4(_19))); + _6.uints = clamp(uint4(_19), uint4(_19), uint4(_19)); } diff --git a/reference/shaders-msl-no-opt/asm/comp/glsl.std450.frexp-modf-struct.asm.comp b/reference/shaders-msl-no-opt/asm/comp/glsl.std450.frexp-modf-struct.asm.comp index 0063face..11777d07 100644 --- a/reference/shaders-msl-no-opt/asm/comp/glsl.std450.frexp-modf-struct.asm.comp +++ b/reference/shaders-msl-no-opt/asm/comp/glsl.std450.frexp-modf-struct.asm.comp @@ -3,33 +3,33 @@ using namespace metal; -struct _8 +struct _9 { float _m0; float _m1; }; -struct _15 +struct _16 { float _m0; int _m1; }; -struct _3 +struct _4 { float _m0; int _m1; }; -kernel void main0(device _3& _4 [[buffer(0)]]) +kernel void main0(device _4& _6 [[buffer(0)]]) { - _8 _23; + _9 _23; _23._m0 = modf(20.0, _23._m1); - _15 _24; + _16 _24; _24._m0 = frexp(40.0, _24._m1); - _4._m0 = _23._m0; - _4._m0 = _23._m1; - _4._m0 = _24._m0; - _4._m1 = _24._m1; + _6._m0 = _23._m0; + _6._m0 = _23._m1; + _6._m0 = _24._m0; + _6._m1 = _24._m1; } diff --git a/reference/shaders-msl-no-opt/asm/comp/local-size-id-override.asm.comp b/reference/shaders-msl-no-opt/asm/comp/local-size-id-override.asm.comp index 365f89f7..e3a6b352 100644 --- a/reference/shaders-msl-no-opt/asm/comp/local-size-id-override.asm.comp +++ b/reference/shaders-msl-no-opt/asm/comp/local-size-id-override.asm.comp @@ -8,18 +8,18 @@ struct SSBO float4 values[1]; }; -constant uint _10_tmp [[function_constant(1)]]; -constant uint _10 = is_function_constant_defined(_10_tmp) ? _10_tmp : 11u; -constant uint _11_tmp [[function_constant(2)]]; -constant uint _11 = is_function_constant_defined(_11_tmp) ? _11_tmp : 12u; -constant uint _4_tmp [[function_constant(3)]]; -constant uint _4 = is_function_constant_defined(_4_tmp) ? _4_tmp : 13u; -constant uint _5_tmp [[function_constant(4)]]; -constant uint _5 = is_function_constant_defined(_5_tmp) ? _5_tmp : 14u; -constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(3u, _10, _11); +constant uint _12_tmp [[function_constant(1)]]; +constant uint _12 = is_function_constant_defined(_12_tmp) ? _12_tmp : 11u; +constant uint _13_tmp [[function_constant(2)]]; +constant uint _13 = is_function_constant_defined(_13_tmp) ? _13_tmp : 12u; +constant uint _6_tmp [[function_constant(3)]]; +constant uint _6 = is_function_constant_defined(_6_tmp) ? _6_tmp : 13u; +constant uint _7_tmp [[function_constant(4)]]; +constant uint _7 = is_function_constant_defined(_7_tmp) ? _7_tmp : 14u; +constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(3u, _12, _13); -kernel void main0(device SSBO& _8 [[buffer(0)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]]) +kernel void main0(device SSBO& _10 [[buffer(0)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]]) { - _8.values[gl_GlobalInvocationID.x] += float4(2.0); + _10.values[gl_GlobalInvocationID.x] += float4(2.0); } diff --git a/reference/shaders-msl-no-opt/asm/comp/local-size-id.asm.comp b/reference/shaders-msl-no-opt/asm/comp/local-size-id.asm.comp index 2dcff369..cbca58a7 100644 --- a/reference/shaders-msl-no-opt/asm/comp/local-size-id.asm.comp +++ b/reference/shaders-msl-no-opt/asm/comp/local-size-id.asm.comp @@ -8,19 +8,19 @@ struct SSBO float4 values[1]; }; -constant int _10_tmp [[function_constant(1)]]; -constant int _10 = is_function_constant_defined(_10_tmp) ? _10_tmp : 11; -constant int _11_tmp [[function_constant(2)]]; -constant int _11 = is_function_constant_defined(_11_tmp) ? _11_tmp : 12; -constant int _4_tmp [[function_constant(3)]]; -constant int _4 = is_function_constant_defined(_4_tmp) ? _4_tmp : 13; -constant int _5_tmp [[function_constant(4)]]; -constant int _5 = is_function_constant_defined(_5_tmp) ? _5_tmp : 14; -constant uint _29 = (uint(_4) + 3u); -constant uint3 _30 = uint3(_29, _5, 2u); +constant int _12_tmp [[function_constant(1)]]; +constant int _12 = is_function_constant_defined(_12_tmp) ? _12_tmp : 11; +constant int _13_tmp [[function_constant(2)]]; +constant int _13 = is_function_constant_defined(_13_tmp) ? _13_tmp : 12; +constant int _6_tmp [[function_constant(3)]]; +constant int _6 = is_function_constant_defined(_6_tmp) ? _6_tmp : 13; +constant int _7_tmp [[function_constant(4)]]; +constant int _7 = is_function_constant_defined(_7_tmp) ? _7_tmp : 14; +constant uint _37 = (uint(_6) + 3u); +constant uint3 _38 = uint3(_37, _7, 2u); -kernel void main0(device SSBO& _8 [[buffer(0)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]]) +kernel void main0(device SSBO& _10 [[buffer(0)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]]) { - _8.values[gl_GlobalInvocationID.x] = ((((_8.values[gl_GlobalInvocationID.x] + float4(2.0)) + float3(_30).xyzz) * float(_4)) * float(_5)) * float(int(2u)); + _10.values[gl_GlobalInvocationID.x] = ((((_10.values[gl_GlobalInvocationID.x] + float4(2.0)) + float3(_38).xyzz) * float(_6)) * float(_7)) * float(int(2u)); } diff --git a/reference/shaders-msl-no-opt/asm/comp/modf-storage-class.asm.comp b/reference/shaders-msl-no-opt/asm/comp/modf-storage-class.asm.comp index 3c00707f..0f976333 100644 --- a/reference/shaders-msl-no-opt/asm/comp/modf-storage-class.asm.comp +++ b/reference/shaders-msl-no-opt/asm/comp/modf-storage-class.asm.comp @@ -3,42 +3,42 @@ using namespace metal; -struct _17 +struct _19 { float2 _m0; float2 _m1; }; -struct _4 +struct _6 { uint2 _m0[324]; }; -struct _7 +struct _9 { float2 _m0[648]; }; -struct _10 +struct _13 { float2 _m0[648]; }; -kernel void main0(const device _4& _5 [[buffer(0)]], device _7& _8 [[buffer(1)]], device _10& _11 [[buffer(2)]]) +kernel void main0(const device _6& _7 [[buffer(0)]], device _9& _11 [[buffer(1)]], device _13& _14 [[buffer(2)]]) { - for (uint _39 = 0u; _39 < 648u; _39 += 2u) + for (uint _46 = 0u; _46 < 648u; _46 += 2u) { - uint2 _40 = _5._m0[_39 / 2u]; - float2 _41 = as_type(_40); - float2 _76; - float2 _61 = modf(_41, _76); - _8._m0[_39] = _76; - _8._m0[_39 + 1u] = _61; - _17 _64; - _64._m0 = modf(_41, _64._m1); - _17 _42 = _64; - _11._m0[_39] = _42._m1; - _11._m0[_39 + 1u] = _42._m0; + uint2 _47 = _7._m0[_46 / 2u]; + float2 _48 = as_type(_47); + float2 _91; + float2 _69 = modf(_48, _91); + _11._m0[_46] = _91; + _11._m0[_46 + 1u] = _69; + _19 _74; + _74._m0 = modf(_48, _74._m1); + _19 _50 = _74; + _14._m0[_46] = _50._m1; + _14._m0[_46 + 1u] = _50._m0; } } diff --git a/reference/shaders-msl-no-opt/asm/comp/spec-constant-name-aliasing.asm.comp b/reference/shaders-msl-no-opt/asm/comp/spec-constant-name-aliasing.asm.comp index dda85050..7f1494a9 100644 --- a/reference/shaders-msl-no-opt/asm/comp/spec-constant-name-aliasing.asm.comp +++ b/reference/shaders-msl-no-opt/asm/comp/spec-constant-name-aliasing.asm.comp @@ -28,8 +28,8 @@ constant int A_10 = (A_9 - A_5); constant int A_11 = (A_10 + A_5); constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(1u); -kernel void main0(device SSBO& _5 [[buffer(0)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]]) +kernel void main0(device SSBO& _7 [[buffer(0)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]]) { - _5.values[gl_GlobalInvocationID.x] = A_11; + _7.values[gl_GlobalInvocationID.x] = A_11; } diff --git a/reference/shaders-msl-no-opt/asm/comp/storage-buffer-basic.invalid.asm.comp b/reference/shaders-msl-no-opt/asm/comp/storage-buffer-basic.invalid.asm.comp index 5b1ed8ae..6a8538f0 100644 --- a/reference/shaders-msl-no-opt/asm/comp/storage-buffer-basic.invalid.asm.comp +++ b/reference/shaders-msl-no-opt/asm/comp/storage-buffer-basic.invalid.asm.comp @@ -3,20 +3,20 @@ using namespace metal; -struct _6 +struct _3 { float _m0[1]; }; -constant uint _3_tmp [[function_constant(0)]]; -constant uint _3 = is_function_constant_defined(_3_tmp) ? _3_tmp : 1u; -constant uint _4_tmp [[function_constant(2)]]; -constant uint _4 = is_function_constant_defined(_4_tmp) ? _4_tmp : 3u; -constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(_3, 2u, _4); +constant uint _15_tmp [[function_constant(0)]]; +constant uint _15 = is_function_constant_defined(_15_tmp) ? _15_tmp : 1u; +constant uint _17_tmp [[function_constant(2)]]; +constant uint _17 = is_function_constant_defined(_17_tmp) ? _17_tmp : 3u; +constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(_15, 2u, _17); -kernel void main0(device _6& _8 [[buffer(0)]], device _6& _9 [[buffer(1)]], uint3 gl_WorkGroupID [[threadgroup_position_in_grid]]) +kernel void main0(device _3& _20 [[buffer(0)]], device _3& _21 [[buffer(1)]], uint3 gl_WorkGroupID [[threadgroup_position_in_grid]]) { - uint3 _23 = gl_WorkGroupSize; - _8._m0[gl_WorkGroupID.x] = _9._m0[gl_WorkGroupID.x] + _8._m0[gl_WorkGroupID.x]; + uint3 _19 = gl_WorkGroupSize; + _20._m0[gl_WorkGroupID.x] = _21._m0[gl_WorkGroupID.x] + _20._m0[gl_WorkGroupID.x]; } diff --git a/reference/shaders-msl-no-opt/asm/comp/storage-buffer-pointer-argument.asm.comp b/reference/shaders-msl-no-opt/asm/comp/storage-buffer-pointer-argument.asm.comp index 6e976854..beab3e7b 100644 --- a/reference/shaders-msl-no-opt/asm/comp/storage-buffer-pointer-argument.asm.comp +++ b/reference/shaders-msl-no-opt/asm/comp/storage-buffer-pointer-argument.asm.comp @@ -21,8 +21,8 @@ void copy_out(device float& A, device const float& B) A = B; } -kernel void main0(device SSBO& _7 [[buffer(0)]], const device SSBORead& _9 [[buffer(1)]]) +kernel void main0(device SSBO& _10 [[buffer(0)]], const device SSBORead& _14 [[buffer(1)]]) { - copy_out(_7.a, _9.b); + copy_out(_10.a, _14.b); } diff --git a/reference/shaders-msl-no-opt/asm/comp/variable-pointers.asm.comp b/reference/shaders-msl-no-opt/asm/comp/variable-pointers.asm.comp index 7c9718d1..8637752a 100644 --- a/reference/shaders-msl-no-opt/asm/comp/variable-pointers.asm.comp +++ b/reference/shaders-msl-no-opt/asm/comp/variable-pointers.asm.comp @@ -47,22 +47,22 @@ kernel void main0(device foo& buf [[buffer(0)]], constant bar& cb [[buffer(1)]], device int* sbuf2 = select_buffer_null(buf, cb); threadgroup int* stgsm = select_tgsm(cb, tgsm); threadgroup int* cur = stgsm; - device int* _73; - _73 = &buf.a[0u]; - threadgroup int* _76; - int _77; + device int* _78; + _78 = &buf.a[0u]; + threadgroup int* _81; + int _82; for (;;) { - _76 = cur; - _77 = *_73; - if (_77 != 0) + _81 = cur; + _82 = *_78; + if (_82 != 0) { - int _81 = *_76; - int _82 = _77 + _81; - *_73 = _82; - *_76 = _82; - cur = &_76[1u]; - _73 = &_73[1u]; + int _86 = *_81; + int _87 = _82 + _86; + *_78 = _87; + *_81 = _87; + cur = &_81[1u]; + _78 = &_78[1u]; continue; } else diff --git a/reference/shaders-msl-no-opt/asm/frag/composite-insert-inheritance.asm.frag b/reference/shaders-msl-no-opt/asm/frag/composite-insert-inheritance.asm.frag index a4bb5628..6c28fe93 100644 --- a/reference/shaders-msl-no-opt/asm/frag/composite-insert-inheritance.asm.frag +++ b/reference/shaders-msl-no-opt/asm/frag/composite-insert-inheritance.asm.frag @@ -44,9 +44,9 @@ struct spvUnsafeArray } }; -constant float4 _32 = {}; +constant float4 _33 = {}; -constant spvUnsafeArray _34 = spvUnsafeArray({ float4(0.0), float4(0.0) }); +constant spvUnsafeArray _35 = spvUnsafeArray({ float4(0.0), float4(0.0) }); struct main0_out { @@ -68,12 +68,12 @@ fragment main0_out main0(main0_in in [[stage_in]]) _38.z = 3.0; _38.w = 4.0; out.FragColor = _38; - float4 _6 = _37; - _6.x = 1.0; - _6.y = 2.0; - _6.z = 3.0; - _6.w = 4.0; - out.FragColor = _6; + float4 _8 = _37; + _8.x = 1.0; + _8.y = 2.0; + _8.z = 3.0; + _8.w = 4.0; + out.FragColor = _8; float4 _42 = _37; _42.x = 1.0; _42.y = 2.0; @@ -99,7 +99,7 @@ fragment main0_out main0(main0_in in [[stage_in]]) float4 _53 = float4(0.0); _53.x = 1.0; out.FragColor = _53; - spvUnsafeArray _54 = _34; + spvUnsafeArray _54 = _35; _54[1].z = 1.0; _54[0].w = 2.0; out.FragColor = _54[0]; diff --git a/reference/shaders-msl-no-opt/asm/frag/copy-memory-block-like-thread-local.asm.frag b/reference/shaders-msl-no-opt/asm/frag/copy-memory-block-like-thread-local.asm.frag index faa528bc..21a631a8 100644 --- a/reference/shaders-msl-no-opt/asm/frag/copy-memory-block-like-thread-local.asm.frag +++ b/reference/shaders-msl-no-opt/asm/frag/copy-memory-block-like-thread-local.asm.frag @@ -159,12 +159,12 @@ struct _3 fragment void main0() { - spvUnsafeArray _20; - _20[0u] = 0.0; - _20[1u] = 0.0; - _20[2u] = 0.0; - _20[3u] = 0.0; - _3 _19; - spvArrayCopyFromStackToStack1(_19._m0, _20.elements); + spvUnsafeArray _34; + _34[0u] = 0.0; + _34[1u] = 0.0; + _34[2u] = 0.0; + _34[3u] = 0.0; + _3 _33; + spvArrayCopyFromStackToStack1(_33._m0, _34.elements); } diff --git a/reference/shaders-msl-no-opt/asm/frag/modf-frexp-scalar-access-chain-output.asm.frag b/reference/shaders-msl-no-opt/asm/frag/modf-frexp-scalar-access-chain-output.asm.frag index 910c8fa7..4b17f53d 100644 --- a/reference/shaders-msl-no-opt/asm/frag/modf-frexp-scalar-access-chain-output.asm.frag +++ b/reference/shaders-msl-no-opt/asm/frag/modf-frexp-scalar-access-chain-output.asm.frag @@ -6,12 +6,12 @@ using namespace metal; fragment void main0() { float3 col; - int2 _18; + int2 _20; float _23; - float _21 = modf(0.1500000059604644775390625, _23); + float _16 = modf(0.1500000059604644775390625, _23); col.x = _23; int _24; - float _22 = frexp(0.1500000059604644775390625, _24); - _18.y = _24; + float _17 = frexp(0.1500000059604644775390625, _24); + _20.y = _24; } diff --git a/reference/shaders-msl-no-opt/asm/frag/phi.zero-initialize.asm.frag b/reference/shaders-msl-no-opt/asm/frag/phi.zero-initialize.asm.frag index cffd0bd1..9a506203 100644 --- a/reference/shaders-msl-no-opt/asm/frag/phi.zero-initialize.asm.frag +++ b/reference/shaders-msl-no-opt/asm/frag/phi.zero-initialize.asm.frag @@ -27,14 +27,14 @@ struct main0_in fragment main0_out main0(main0_in in [[stage_in]]) { main0_out out = {}; - int _39 = {}; + int _27 = {}; if (in.vColor.x > 10.0) { - _39 = 10; + _27 = 10; } else { - _39 = 20; + _27 = 20; } out.FragColor = in.vColor; return out; diff --git a/reference/shaders-msl-no-opt/asm/frag/pixel-interlock-callstack.msl2.asm.frag b/reference/shaders-msl-no-opt/asm/frag/pixel-interlock-callstack.msl2.asm.frag index 09c74069..4c85b65e 100644 --- a/reference/shaders-msl-no-opt/asm/frag/pixel-interlock-callstack.msl2.asm.frag +++ b/reference/shaders-msl-no-opt/asm/frag/pixel-interlock-callstack.msl2.asm.frag @@ -16,22 +16,22 @@ struct SSBO0 }; static inline __attribute__((always_inline)) -void callee2(thread float4& gl_FragCoord, device SSBO1& _7) +void callee2(thread float4& gl_FragCoord, device SSBO1& _11) { - int _31 = int(gl_FragCoord.x); - _7.values1[_31]++; + int _25 = int(gl_FragCoord.x); + _11.values1[_25]++; } static inline __attribute__((always_inline)) -void callee(thread float4& gl_FragCoord, device SSBO1& _7, device SSBO0& _9) +void callee(thread float4& gl_FragCoord, device SSBO1& _11, device SSBO0& _13) { - int _39 = int(gl_FragCoord.x); - _9.values0[_39]++; - callee2(gl_FragCoord, _7); + int _38 = int(gl_FragCoord.x); + _13.values0[_38]++; + callee2(gl_FragCoord, _11); } -fragment void main0(device SSBO1& _7 [[buffer(0), raster_order_group(0)]], device SSBO0& _9 [[buffer(1)]], float4 gl_FragCoord [[position]]) +fragment void main0(device SSBO1& _11 [[buffer(0), raster_order_group(0)]], device SSBO0& _13 [[buffer(1)]], float4 gl_FragCoord [[position]]) { - callee(gl_FragCoord, _7, _9); + callee(gl_FragCoord, _11, _13); } diff --git a/reference/shaders-msl-no-opt/asm/frag/pixel-interlock-control-flow.msl2.asm.frag b/reference/shaders-msl-no-opt/asm/frag/pixel-interlock-control-flow.msl2.asm.frag index 692e391b..56bdcc7a 100644 --- a/reference/shaders-msl-no-opt/asm/frag/pixel-interlock-control-flow.msl2.asm.frag +++ b/reference/shaders-msl-no-opt/asm/frag/pixel-interlock-control-flow.msl2.asm.frag @@ -10,7 +10,7 @@ struct SSBO1 uint values1[1]; }; -struct _12 +struct _16 { uint _m0[1]; }; @@ -21,32 +21,32 @@ struct SSBO0 }; static inline __attribute__((always_inline)) -void callee2(thread float4& gl_FragCoord, device SSBO1& _7) +void callee2(thread float4& gl_FragCoord, device SSBO1& _11) { - int _44 = int(gl_FragCoord.x); - _7.values1[_44]++; + int _25 = int(gl_FragCoord.x); + _11.values1[_25]++; } static inline __attribute__((always_inline)) -void callee(thread float4& gl_FragCoord, device SSBO1& _7, device SSBO0& _9) +void callee(thread float4& gl_FragCoord, device SSBO1& _11, device SSBO0& _13) { - int _52 = int(gl_FragCoord.x); - _9.values0[_52]++; - callee2(gl_FragCoord, _7); + int _38 = int(gl_FragCoord.x); + _13.values0[_38]++; + callee2(gl_FragCoord, _11); if (true) { } } static inline __attribute__((always_inline)) -void _35(thread float4& gl_FragCoord, device _12& _13) +void _52(thread float4& gl_FragCoord, device _16& _17) { - _13._m0[int(gl_FragCoord.x)] = 4u; + _17._m0[int(gl_FragCoord.x)] = 4u; } -fragment void main0(device SSBO1& _7 [[buffer(0), raster_order_group(0)]], device _12& _13 [[buffer(1)]], device SSBO0& _9 [[buffer(2), raster_order_group(0)]], float4 gl_FragCoord [[position]]) +fragment void main0(device SSBO1& _11 [[buffer(0), raster_order_group(0)]], device _16& _17 [[buffer(1)]], device SSBO0& _13 [[buffer(2), raster_order_group(0)]], float4 gl_FragCoord [[position]]) { - callee(gl_FragCoord, _7, _9); - _35(gl_FragCoord, _13); + callee(gl_FragCoord, _11, _13); + _52(gl_FragCoord, _17); } diff --git a/reference/shaders-msl-no-opt/asm/frag/pixel-interlock-split-functions.msl2.asm.frag b/reference/shaders-msl-no-opt/asm/frag/pixel-interlock-split-functions.msl2.asm.frag index 659e9760..f405a716 100644 --- a/reference/shaders-msl-no-opt/asm/frag/pixel-interlock-split-functions.msl2.asm.frag +++ b/reference/shaders-msl-no-opt/asm/frag/pixel-interlock-split-functions.msl2.asm.frag @@ -16,34 +16,34 @@ struct SSBO0 }; static inline __attribute__((always_inline)) -void callee2(thread float4& gl_FragCoord, device SSBO1& _7) +void callee2(thread float4& gl_FragCoord, device SSBO1& _11) { - int _37 = int(gl_FragCoord.x); - _7.values1[_37]++; + int _25 = int(gl_FragCoord.x); + _11.values1[_25]++; } static inline __attribute__((always_inline)) -void callee(thread float4& gl_FragCoord, device SSBO1& _7, device SSBO0& _9) +void callee(thread float4& gl_FragCoord, device SSBO1& _11, device SSBO0& _13) { - int _45 = int(gl_FragCoord.x); - _9.values0[_45]++; - callee2(gl_FragCoord, _7); + int _38 = int(gl_FragCoord.x); + _13.values0[_38]++; + callee2(gl_FragCoord, _11); } static inline __attribute__((always_inline)) -void _29() +void _46() { } static inline __attribute__((always_inline)) -void _31() +void _48() { } -fragment void main0(device SSBO1& _7 [[buffer(0), raster_order_group(0)]], device SSBO0& _9 [[buffer(1), raster_order_group(0)]], float4 gl_FragCoord [[position]]) +fragment void main0(device SSBO1& _11 [[buffer(0), raster_order_group(0)]], device SSBO0& _13 [[buffer(1), raster_order_group(0)]], float4 gl_FragCoord [[position]]) { - callee(gl_FragCoord, _7, _9); - _29(); - _31(); + callee(gl_FragCoord, _11, _13); + _46(); + _48(); } diff --git a/reference/shaders-msl-no-opt/asm/frag/scalar-select.spv14.asm.frag b/reference/shaders-msl-no-opt/asm/frag/scalar-select.spv14.asm.frag index 7fa8233d..bb2ede18 100644 --- a/reference/shaders-msl-no-opt/asm/frag/scalar-select.spv14.asm.frag +++ b/reference/shaders-msl-no-opt/asm/frag/scalar-select.spv14.asm.frag @@ -44,13 +44,13 @@ struct spvUnsafeArray } }; -struct _15 +struct _16 { float _m0; }; -constant spvUnsafeArray _29 = spvUnsafeArray({ 0.0, 1.0 }); -constant spvUnsafeArray _30 = spvUnsafeArray({ 1.0, 0.0 }); +constant spvUnsafeArray _34 = spvUnsafeArray({ 0.0, 1.0 }); +constant spvUnsafeArray _35 = spvUnsafeArray({ 1.0, 0.0 }); struct main0_out { @@ -64,8 +64,8 @@ fragment main0_out main0() out.FragColor = float4(false); out.FragColor = select(float4(0.0, 0.0, 0.0, 1.0), float4(1.0, 1.0, 0.0, 1.0), bool4(false, true, false, true)); out.FragColor = float4(bool4(false, true, false, true)); - _15 _32 = false ? (_15{ 0.0 }) : (_15{ 1.0 }); - spvUnsafeArray _33 = true ? _29 : _30; + _16 _36 = false ? (_16{ 0.0 }) : (_16{ 1.0 }); + spvUnsafeArray _37 = true ? _34 : _35; return out; } diff --git a/reference/shaders-msl-no-opt/asm/frag/switch-block-case-fallthrough.asm.invalid.frag b/reference/shaders-msl-no-opt/asm/frag/switch-block-case-fallthrough.asm.invalid.frag index e179b7e2..bd85aecd 100644 --- a/reference/shaders-msl-no-opt/asm/frag/switch-block-case-fallthrough.asm.invalid.frag +++ b/reference/shaders-msl-no-opt/asm/frag/switch-block-case-fallthrough.asm.invalid.frag @@ -18,31 +18,31 @@ fragment main0_out main0(main0_in in [[stage_in]]) int i = 0; main0_out out = {}; int j; - int _30; - int _31; + int _33; + int _34; if (in.vIndex != 0 && in.vIndex != 1 && in.vIndex != 11 && in.vIndex != 2 && in.vIndex != 3 && in.vIndex != 4 && in.vIndex != 5) { - _30 = 2; + _33 = 2; } if (in.vIndex == 1 || in.vIndex == 11) { - _31 = 1; + _34 = 1; } switch (in.vIndex) { case 0: { - _30 = 3; + _33 = 3; } default: { - j = _30; - _31 = 0; + j = _33; + _34 = 0; } case 1: case 11: { - j = _31; + j = _34; } case 2: { diff --git a/reference/shaders-msl-no-opt/asm/frag/texture-access.swizzle.asm.frag b/reference/shaders-msl-no-opt/asm/frag/texture-access.swizzle.asm.frag index 32fdc297..48d34df3 100644 --- a/reference/shaders-msl-no-opt/asm/frag/texture-access.swizzle.asm.frag +++ b/reference/shaders-msl-no-opt/asm/frag/texture-access.swizzle.asm.frag @@ -157,9 +157,9 @@ fragment void main0(constant uint* spvSwizzleConstants [[buffer(30)]], texture1d c = spvTextureSwizzle(tex1d.sample(tex1dSamp, float2(0.0, 1.0).x / float2(0.0, 1.0).y), tex1dSwzl); c = spvTextureSwizzle(tex2d.sample(tex2dSamp, float3(0.0, 0.0, 1.0).xy / float3(0.0, 0.0, 1.0).z), tex2dSwzl); c = spvTextureSwizzle(tex3d.sample(tex3dSamp, float4(0.0, 0.0, 0.0, 1.0).xyz / float4(0.0, 0.0, 0.0, 1.0).w), tex3dSwzl); - float4 _152 = float4(0.0, 0.0, 1.0, 1.0); - _152.z = 1.0; - c.x = spvTextureSwizzle(depth2d.sample_compare(depth2dSamp, _152.xy / _152.z, 1.0 / _152.z), depth2dSwzl); + float4 _108 = float4(0.0, 0.0, 1.0, 1.0); + _108.z = 1.0; + c.x = spvTextureSwizzle(depth2d.sample_compare(depth2dSamp, _108.xy / _108.z, 1.0 / _108.z), depth2dSwzl); c = spvTextureSwizzle(tex1d.sample(tex1dSamp, 0.0), tex1dSwzl); c = spvTextureSwizzle(tex2d.sample(tex2dSamp, float2(0.0), level(0.0)), tex2dSwzl); c = spvTextureSwizzle(tex3d.sample(tex3dSamp, float3(0.0), level(0.0)), tex3dSwzl); @@ -170,9 +170,9 @@ fragment void main0(constant uint* spvSwizzleConstants [[buffer(30)]], texture1d c = spvTextureSwizzle(tex1d.sample(tex1dSamp, float2(0.0, 1.0).x / float2(0.0, 1.0).y), tex1dSwzl); c = spvTextureSwizzle(tex2d.sample(tex2dSamp, float3(0.0, 0.0, 1.0).xy / float3(0.0, 0.0, 1.0).z, level(0.0)), tex2dSwzl); c = spvTextureSwizzle(tex3d.sample(tex3dSamp, float4(0.0, 0.0, 0.0, 1.0).xyz / float4(0.0, 0.0, 0.0, 1.0).w, level(0.0)), tex3dSwzl); - float4 _202 = float4(0.0, 0.0, 1.0, 1.0); - _202.z = 1.0; - c.x = spvTextureSwizzle(depth2d.sample_compare(depth2dSamp, _202.xy / _202.z, 1.0 / _202.z, level(0.0)), depth2dSwzl); + float4 _161 = float4(0.0, 0.0, 1.0, 1.0); + _161.z = 1.0; + c.x = spvTextureSwizzle(depth2d.sample_compare(depth2dSamp, _161.xy / _161.z, 1.0 / _161.z, level(0.0)), depth2dSwzl); c = spvTextureSwizzle(tex1d.read(uint(0)), tex1dSwzl); c = spvTextureSwizzle(tex2d.read(uint2(int2(0)), 0), tex2dSwzl); c = spvTextureSwizzle(tex3d.read(uint3(int3(0)), 0), tex3dSwzl); diff --git a/reference/shaders-msl-no-opt/asm/masking/initializers-block.mask-location-0.msl2.asm.tesc b/reference/shaders-msl-no-opt/asm/masking/initializers-block.mask-location-0.msl2.asm.tesc index 3872124d..729838bb 100644 --- a/reference/shaders-msl-no-opt/asm/masking/initializers-block.mask-location-0.msl2.asm.tesc +++ b/reference/shaders-msl-no-opt/asm/masking/initializers-block.mask-location-0.msl2.asm.tesc @@ -67,11 +67,11 @@ struct main0_patchOut kernel void main0(uint gl_InvocationID [[thread_index_in_threadgroup]], uint gl_PrimitiveID [[threadgroup_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device main0_patchOut* spvPatchOut [[buffer(27)]], device MTLQuadTessellationFactorsHalf* spvTessLevel [[buffer(26)]]) { - spvUnsafeArray _18 = spvUnsafeArray({ C{ float4(0.0) }, C{ float4(0.0) }, C{ float4(0.0) }, C{ float4(0.0) } }); + spvUnsafeArray _21 = spvUnsafeArray({ C{ float4(0.0) }, C{ float4(0.0) }, C{ float4(0.0) }, C{ float4(0.0) } }); threadgroup C c[4]; device main0_out* gl_out = &spvOut[gl_PrimitiveID * 4]; - c[gl_InvocationID] = _18[gl_InvocationID]; + c[gl_InvocationID] = _21[gl_InvocationID]; device main0_patchOut& patchOut = spvPatchOut[gl_PrimitiveID]; patchOut.p_v = float4(0.0); c[gl_InvocationID].v = float4(1.0); diff --git a/reference/shaders-msl-no-opt/asm/masking/initializers-block.mask-location-0.multi-patch.msl2.asm.tesc b/reference/shaders-msl-no-opt/asm/masking/initializers-block.mask-location-0.multi-patch.msl2.asm.tesc index e576472f..4bb05550 100644 --- a/reference/shaders-msl-no-opt/asm/masking/initializers-block.mask-location-0.multi-patch.msl2.asm.tesc +++ b/reference/shaders-msl-no-opt/asm/masking/initializers-block.mask-location-0.multi-patch.msl2.asm.tesc @@ -67,12 +67,12 @@ struct main0_patchOut kernel void main0(uint3 gl_GlobalInvocationID [[thread_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device main0_patchOut* spvPatchOut [[buffer(27)]], device MTLQuadTessellationFactorsHalf* spvTessLevel [[buffer(26)]]) { - spvUnsafeArray _18 = spvUnsafeArray({ C{ float4(0.0) }, C{ float4(0.0) }, C{ float4(0.0) }, C{ float4(0.0) } }); + spvUnsafeArray _21 = spvUnsafeArray({ C{ float4(0.0) }, C{ float4(0.0) }, C{ float4(0.0) }, C{ float4(0.0) } }); device main0_out* gl_out = &spvOut[gl_GlobalInvocationID.x - gl_GlobalInvocationID.x % 4]; threadgroup C spvStoragec[8][4]; threadgroup C (&c)[4] = spvStoragec[(gl_GlobalInvocationID.x / 4) % 8]; - c[gl_GlobalInvocationID.x % 4] = _18[gl_GlobalInvocationID.x % 4]; + c[gl_GlobalInvocationID.x % 4] = _21[gl_GlobalInvocationID.x % 4]; device main0_patchOut& patchOut = spvPatchOut[gl_GlobalInvocationID.x / 4]; patchOut.p_v = float4(0.0); uint gl_InvocationID = gl_GlobalInvocationID.x % 4; diff --git a/reference/shaders-msl-no-opt/asm/masking/initializers-block.mask-location-1.msl2.asm.tesc b/reference/shaders-msl-no-opt/asm/masking/initializers-block.mask-location-1.msl2.asm.tesc index 5c6ad2a8..f94c910d 100644 --- a/reference/shaders-msl-no-opt/asm/masking/initializers-block.mask-location-1.msl2.asm.tesc +++ b/reference/shaders-msl-no-opt/asm/masking/initializers-block.mask-location-1.msl2.asm.tesc @@ -66,11 +66,11 @@ struct main0_patchOut }; kernel void main0(uint gl_InvocationID [[thread_index_in_threadgroup]], uint gl_PrimitiveID [[threadgroup_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device main0_patchOut* spvPatchOut [[buffer(27)]], device MTLQuadTessellationFactorsHalf* spvTessLevel [[buffer(26)]]) { - spvUnsafeArray _18 = spvUnsafeArray({ C{ float4(0.0) }, C{ float4(0.0) }, C{ float4(0.0) }, C{ float4(0.0) } }); + spvUnsafeArray _21 = spvUnsafeArray({ C{ float4(0.0) }, C{ float4(0.0) }, C{ float4(0.0) }, C{ float4(0.0) } }); threadgroup P p; device main0_out* gl_out = &spvOut[gl_PrimitiveID * 4]; - gl_out[gl_InvocationID].c_v = _18[gl_InvocationID].v; + gl_out[gl_InvocationID].c_v = _21[gl_InvocationID].v; device main0_patchOut& patchOut = spvPatchOut[gl_PrimitiveID]; p = P{ float4(0.0) }; gl_out[gl_InvocationID].c_v = float4(1.0); diff --git a/reference/shaders-msl-no-opt/asm/masking/initializers-block.mask-location-1.multi-patch.msl2.asm.tesc b/reference/shaders-msl-no-opt/asm/masking/initializers-block.mask-location-1.multi-patch.msl2.asm.tesc index 12295e77..2877ef79 100644 --- a/reference/shaders-msl-no-opt/asm/masking/initializers-block.mask-location-1.multi-patch.msl2.asm.tesc +++ b/reference/shaders-msl-no-opt/asm/masking/initializers-block.mask-location-1.multi-patch.msl2.asm.tesc @@ -66,10 +66,10 @@ struct main0_patchOut }; kernel void main0(uint3 gl_GlobalInvocationID [[thread_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device main0_patchOut* spvPatchOut [[buffer(27)]], device MTLQuadTessellationFactorsHalf* spvTessLevel [[buffer(26)]]) { - spvUnsafeArray _18 = spvUnsafeArray({ C{ float4(0.0) }, C{ float4(0.0) }, C{ float4(0.0) }, C{ float4(0.0) } }); + spvUnsafeArray _21 = spvUnsafeArray({ C{ float4(0.0) }, C{ float4(0.0) }, C{ float4(0.0) }, C{ float4(0.0) } }); device main0_out* gl_out = &spvOut[gl_GlobalInvocationID.x - gl_GlobalInvocationID.x % 4]; - gl_out[gl_GlobalInvocationID.x % 4].c_v = _18[gl_GlobalInvocationID.x % 4].v; + gl_out[gl_GlobalInvocationID.x % 4].c_v = _21[gl_GlobalInvocationID.x % 4].v; device main0_patchOut& patchOut = spvPatchOut[gl_GlobalInvocationID.x / 4]; threadgroup P spvStoragep[8]; threadgroup P (&p) = spvStoragep[(gl_GlobalInvocationID.x / 4) % 8]; diff --git a/reference/shaders-msl-no-opt/asm/masking/initializers-block.mask-point-size.msl2.asm.tesc b/reference/shaders-msl-no-opt/asm/masking/initializers-block.mask-point-size.msl2.asm.tesc index d5ff9d0b..1ed6c291 100644 --- a/reference/shaders-msl-no-opt/asm/masking/initializers-block.mask-point-size.msl2.asm.tesc +++ b/reference/shaders-msl-no-opt/asm/masking/initializers-block.mask-point-size.msl2.asm.tesc @@ -80,16 +80,16 @@ struct main0_patchOut kernel void main0(uint gl_InvocationID [[thread_index_in_threadgroup]], uint gl_PrimitiveID [[threadgroup_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device main0_patchOut* spvPatchOut [[buffer(27)]], device MTLQuadTessellationFactorsHalf* spvTessLevel [[buffer(26)]]) { - spvUnsafeArray _18 = spvUnsafeArray({ C{ float4(0.0) }, C{ float4(0.0) }, C{ float4(0.0) }, C{ float4(0.0) } }); - spvUnsafeArray _33 = spvUnsafeArray({ gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) } }); + spvUnsafeArray _21 = spvUnsafeArray({ C{ float4(0.0) }, C{ float4(0.0) }, C{ float4(0.0) }, C{ float4(0.0) } }); + spvUnsafeArray _39 = spvUnsafeArray({ gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) } }); threadgroup gl_PerVertex gl_out_masked[4]; device main0_out* gl_out = &spvOut[gl_PrimitiveID * 4]; - gl_out[gl_InvocationID].c_v = _18[gl_InvocationID].v; - gl_out[gl_InvocationID].gl_Position = _33[gl_InvocationID].gl_Position; - gl_out[gl_InvocationID].gl_ClipDistance = _33[gl_InvocationID].gl_ClipDistance; - gl_out[gl_InvocationID].gl_CullDistance = _33[gl_InvocationID].gl_CullDistance; - gl_out_masked[gl_InvocationID] = _33[gl_InvocationID]; + gl_out[gl_InvocationID].c_v = _21[gl_InvocationID].v; + gl_out[gl_InvocationID].gl_Position = _39[gl_InvocationID].gl_Position; + gl_out[gl_InvocationID].gl_ClipDistance = _39[gl_InvocationID].gl_ClipDistance; + gl_out[gl_InvocationID].gl_CullDistance = _39[gl_InvocationID].gl_CullDistance; + gl_out_masked[gl_InvocationID] = _39[gl_InvocationID]; device main0_patchOut& patchOut = spvPatchOut[gl_PrimitiveID]; patchOut.p_v = float4(0.0); gl_out[gl_InvocationID].c_v = float4(1.0); diff --git a/reference/shaders-msl-no-opt/asm/masking/initializers-block.mask-point-size.multi-patch.msl2.asm.tesc b/reference/shaders-msl-no-opt/asm/masking/initializers-block.mask-point-size.multi-patch.msl2.asm.tesc index 32fb6598..247a399a 100644 --- a/reference/shaders-msl-no-opt/asm/masking/initializers-block.mask-point-size.multi-patch.msl2.asm.tesc +++ b/reference/shaders-msl-no-opt/asm/masking/initializers-block.mask-point-size.multi-patch.msl2.asm.tesc @@ -80,17 +80,17 @@ struct main0_patchOut kernel void main0(uint3 gl_GlobalInvocationID [[thread_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device main0_patchOut* spvPatchOut [[buffer(27)]], device MTLQuadTessellationFactorsHalf* spvTessLevel [[buffer(26)]]) { - spvUnsafeArray _18 = spvUnsafeArray({ C{ float4(0.0) }, C{ float4(0.0) }, C{ float4(0.0) }, C{ float4(0.0) } }); - spvUnsafeArray _33 = spvUnsafeArray({ gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) } }); + spvUnsafeArray _21 = spvUnsafeArray({ C{ float4(0.0) }, C{ float4(0.0) }, C{ float4(0.0) }, C{ float4(0.0) } }); + spvUnsafeArray _39 = spvUnsafeArray({ gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) } }); device main0_out* gl_out = &spvOut[gl_GlobalInvocationID.x - gl_GlobalInvocationID.x % 4]; - gl_out[gl_GlobalInvocationID.x % 4].c_v = _18[gl_GlobalInvocationID.x % 4].v; - gl_out[gl_GlobalInvocationID.x % 4].gl_Position = _33[gl_GlobalInvocationID.x % 4].gl_Position; - gl_out[gl_GlobalInvocationID.x % 4].gl_ClipDistance = _33[gl_GlobalInvocationID.x % 4].gl_ClipDistance; - gl_out[gl_GlobalInvocationID.x % 4].gl_CullDistance = _33[gl_GlobalInvocationID.x % 4].gl_CullDistance; + gl_out[gl_GlobalInvocationID.x % 4].c_v = _21[gl_GlobalInvocationID.x % 4].v; + gl_out[gl_GlobalInvocationID.x % 4].gl_Position = _39[gl_GlobalInvocationID.x % 4].gl_Position; + gl_out[gl_GlobalInvocationID.x % 4].gl_ClipDistance = _39[gl_GlobalInvocationID.x % 4].gl_ClipDistance; + gl_out[gl_GlobalInvocationID.x % 4].gl_CullDistance = _39[gl_GlobalInvocationID.x % 4].gl_CullDistance; threadgroup gl_PerVertex spvStoragegl_out_masked[8][4]; threadgroup gl_PerVertex (&gl_out_masked)[4] = spvStoragegl_out_masked[(gl_GlobalInvocationID.x / 4) % 8]; - gl_out_masked[gl_GlobalInvocationID.x % 4] = _33[gl_GlobalInvocationID.x % 4]; + gl_out_masked[gl_GlobalInvocationID.x % 4] = _39[gl_GlobalInvocationID.x % 4]; device main0_patchOut& patchOut = spvPatchOut[gl_GlobalInvocationID.x / 4]; patchOut.p_v = float4(0.0); uint gl_InvocationID = gl_GlobalInvocationID.x % 4; diff --git a/reference/shaders-msl-no-opt/asm/masking/initializers-block.mask-position.msl2.asm.tesc b/reference/shaders-msl-no-opt/asm/masking/initializers-block.mask-position.msl2.asm.tesc index ce16f379..5c7772b0 100644 --- a/reference/shaders-msl-no-opt/asm/masking/initializers-block.mask-position.msl2.asm.tesc +++ b/reference/shaders-msl-no-opt/asm/masking/initializers-block.mask-position.msl2.asm.tesc @@ -80,16 +80,16 @@ struct main0_patchOut kernel void main0(uint gl_InvocationID [[thread_index_in_threadgroup]], uint gl_PrimitiveID [[threadgroup_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device main0_patchOut* spvPatchOut [[buffer(27)]], device MTLQuadTessellationFactorsHalf* spvTessLevel [[buffer(26)]]) { - spvUnsafeArray _18 = spvUnsafeArray({ C{ float4(0.0) }, C{ float4(0.0) }, C{ float4(0.0) }, C{ float4(0.0) } }); - spvUnsafeArray _33 = spvUnsafeArray({ gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) } }); + spvUnsafeArray _21 = spvUnsafeArray({ C{ float4(0.0) }, C{ float4(0.0) }, C{ float4(0.0) }, C{ float4(0.0) } }); + spvUnsafeArray _39 = spvUnsafeArray({ gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) } }); threadgroup gl_PerVertex gl_out_masked[4]; device main0_out* gl_out = &spvOut[gl_PrimitiveID * 4]; - gl_out[gl_InvocationID].c_v = _18[gl_InvocationID].v; - gl_out[gl_InvocationID].gl_PointSize = _33[gl_InvocationID].gl_PointSize; - gl_out[gl_InvocationID].gl_ClipDistance = _33[gl_InvocationID].gl_ClipDistance; - gl_out[gl_InvocationID].gl_CullDistance = _33[gl_InvocationID].gl_CullDistance; - gl_out_masked[gl_InvocationID] = _33[gl_InvocationID]; + gl_out[gl_InvocationID].c_v = _21[gl_InvocationID].v; + gl_out[gl_InvocationID].gl_PointSize = _39[gl_InvocationID].gl_PointSize; + gl_out[gl_InvocationID].gl_ClipDistance = _39[gl_InvocationID].gl_ClipDistance; + gl_out[gl_InvocationID].gl_CullDistance = _39[gl_InvocationID].gl_CullDistance; + gl_out_masked[gl_InvocationID] = _39[gl_InvocationID]; device main0_patchOut& patchOut = spvPatchOut[gl_PrimitiveID]; patchOut.p_v = float4(0.0); gl_out[gl_InvocationID].c_v = float4(1.0); diff --git a/reference/shaders-msl-no-opt/asm/masking/initializers-block.mask-position.multi-patch.msl2.asm.tesc b/reference/shaders-msl-no-opt/asm/masking/initializers-block.mask-position.multi-patch.msl2.asm.tesc index 671aa25a..015617dc 100644 --- a/reference/shaders-msl-no-opt/asm/masking/initializers-block.mask-position.multi-patch.msl2.asm.tesc +++ b/reference/shaders-msl-no-opt/asm/masking/initializers-block.mask-position.multi-patch.msl2.asm.tesc @@ -80,17 +80,17 @@ struct main0_patchOut kernel void main0(uint3 gl_GlobalInvocationID [[thread_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device main0_patchOut* spvPatchOut [[buffer(27)]], device MTLQuadTessellationFactorsHalf* spvTessLevel [[buffer(26)]]) { - spvUnsafeArray _18 = spvUnsafeArray({ C{ float4(0.0) }, C{ float4(0.0) }, C{ float4(0.0) }, C{ float4(0.0) } }); - spvUnsafeArray _33 = spvUnsafeArray({ gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) } }); + spvUnsafeArray _21 = spvUnsafeArray({ C{ float4(0.0) }, C{ float4(0.0) }, C{ float4(0.0) }, C{ float4(0.0) } }); + spvUnsafeArray _39 = spvUnsafeArray({ gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) } }); device main0_out* gl_out = &spvOut[gl_GlobalInvocationID.x - gl_GlobalInvocationID.x % 4]; - gl_out[gl_GlobalInvocationID.x % 4].c_v = _18[gl_GlobalInvocationID.x % 4].v; - gl_out[gl_GlobalInvocationID.x % 4].gl_PointSize = _33[gl_GlobalInvocationID.x % 4].gl_PointSize; - gl_out[gl_GlobalInvocationID.x % 4].gl_ClipDistance = _33[gl_GlobalInvocationID.x % 4].gl_ClipDistance; - gl_out[gl_GlobalInvocationID.x % 4].gl_CullDistance = _33[gl_GlobalInvocationID.x % 4].gl_CullDistance; + gl_out[gl_GlobalInvocationID.x % 4].c_v = _21[gl_GlobalInvocationID.x % 4].v; + gl_out[gl_GlobalInvocationID.x % 4].gl_PointSize = _39[gl_GlobalInvocationID.x % 4].gl_PointSize; + gl_out[gl_GlobalInvocationID.x % 4].gl_ClipDistance = _39[gl_GlobalInvocationID.x % 4].gl_ClipDistance; + gl_out[gl_GlobalInvocationID.x % 4].gl_CullDistance = _39[gl_GlobalInvocationID.x % 4].gl_CullDistance; threadgroup gl_PerVertex spvStoragegl_out_masked[8][4]; threadgroup gl_PerVertex (&gl_out_masked)[4] = spvStoragegl_out_masked[(gl_GlobalInvocationID.x / 4) % 8]; - gl_out_masked[gl_GlobalInvocationID.x % 4] = _33[gl_GlobalInvocationID.x % 4]; + gl_out_masked[gl_GlobalInvocationID.x % 4] = _39[gl_GlobalInvocationID.x % 4]; device main0_patchOut& patchOut = spvPatchOut[gl_GlobalInvocationID.x / 4]; patchOut.p_v = float4(0.0); uint gl_InvocationID = gl_GlobalInvocationID.x % 4; diff --git a/reference/shaders-msl-no-opt/asm/masking/initializers.mask-location-0.msl2.asm.tesc b/reference/shaders-msl-no-opt/asm/masking/initializers.mask-location-0.msl2.asm.tesc index 25fe13bf..971241f4 100644 --- a/reference/shaders-msl-no-opt/asm/masking/initializers.mask-location-0.msl2.asm.tesc +++ b/reference/shaders-msl-no-opt/asm/masking/initializers.mask-location-0.msl2.asm.tesc @@ -52,7 +52,7 @@ struct _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex spvUnsafeArray _RESERVED_IDENTIFIER_FIXUP_gl_CullDistance; }; -constant spvUnsafeArray _15 = spvUnsafeArray({ float4(0.0), float4(0.0), float4(0.0), float4(0.0) }); +constant spvUnsafeArray _17 = spvUnsafeArray({ float4(0.0), float4(0.0), float4(0.0), float4(0.0) }); constant spvUnsafeArray _45 = spvUnsafeArray({ 0.0 }); constant spvUnsafeArray _46 = spvUnsafeArray({ 0.0 }); @@ -71,15 +71,15 @@ struct main0_patchOut kernel void main0(uint gl_InvocationID [[thread_index_in_threadgroup]], uint gl_PrimitiveID [[threadgroup_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device main0_patchOut* spvPatchOut [[buffer(27)]], device MTLQuadTessellationFactorsHalf* spvTessLevel [[buffer(26)]]) { - spvUnsafeArray<_RESERVED_IDENTIFIER_FIXUP_gl_PerVertex, 4> _29 = spvUnsafeArray<_RESERVED_IDENTIFIER_FIXUP_gl_PerVertex, 4>({ _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) } }); + spvUnsafeArray<_RESERVED_IDENTIFIER_FIXUP_gl_PerVertex, 4> _32 = spvUnsafeArray<_RESERVED_IDENTIFIER_FIXUP_gl_PerVertex, 4>({ _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) } }); threadgroup float4 foo[4]; device main0_out* gl_out = &spvOut[gl_PrimitiveID * 4]; - foo[gl_InvocationID] = _15[gl_InvocationID]; - gl_out[gl_InvocationID].gl_Position = _29[gl_InvocationID]._RESERVED_IDENTIFIER_FIXUP_gl_Position; - gl_out[gl_InvocationID].gl_PointSize = _29[gl_InvocationID]._RESERVED_IDENTIFIER_FIXUP_gl_PointSize; - gl_out[gl_InvocationID].gl_ClipDistance = _29[gl_InvocationID]._RESERVED_IDENTIFIER_FIXUP_gl_ClipDistance; - gl_out[gl_InvocationID].gl_CullDistance = _29[gl_InvocationID]._RESERVED_IDENTIFIER_FIXUP_gl_CullDistance; + foo[gl_InvocationID] = _17[gl_InvocationID]; + gl_out[gl_InvocationID].gl_Position = _32[gl_InvocationID]._RESERVED_IDENTIFIER_FIXUP_gl_Position; + gl_out[gl_InvocationID].gl_PointSize = _32[gl_InvocationID]._RESERVED_IDENTIFIER_FIXUP_gl_PointSize; + gl_out[gl_InvocationID].gl_ClipDistance = _32[gl_InvocationID]._RESERVED_IDENTIFIER_FIXUP_gl_ClipDistance; + gl_out[gl_InvocationID].gl_CullDistance = _32[gl_InvocationID]._RESERVED_IDENTIFIER_FIXUP_gl_CullDistance; device main0_patchOut& patchOut = spvPatchOut[gl_PrimitiveID]; patchOut.foo_patch = float4(0.0); foo[gl_InvocationID] = float4(1.0); diff --git a/reference/shaders-msl-no-opt/asm/masking/initializers.mask-location-0.msl2.multi-patch.asm.tesc b/reference/shaders-msl-no-opt/asm/masking/initializers.mask-location-0.msl2.multi-patch.asm.tesc index 750ef96d..13ad6773 100644 --- a/reference/shaders-msl-no-opt/asm/masking/initializers.mask-location-0.msl2.multi-patch.asm.tesc +++ b/reference/shaders-msl-no-opt/asm/masking/initializers.mask-location-0.msl2.multi-patch.asm.tesc @@ -52,7 +52,7 @@ struct _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex spvUnsafeArray _RESERVED_IDENTIFIER_FIXUP_gl_CullDistance; }; -constant spvUnsafeArray _15 = spvUnsafeArray({ float4(0.0), float4(0.0), float4(0.0), float4(0.0) }); +constant spvUnsafeArray _17 = spvUnsafeArray({ float4(0.0), float4(0.0), float4(0.0), float4(0.0) }); constant spvUnsafeArray _45 = spvUnsafeArray({ 0.0 }); constant spvUnsafeArray _46 = spvUnsafeArray({ 0.0 }); @@ -71,16 +71,16 @@ struct main0_patchOut kernel void main0(uint3 gl_GlobalInvocationID [[thread_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device main0_patchOut* spvPatchOut [[buffer(27)]], device MTLQuadTessellationFactorsHalf* spvTessLevel [[buffer(26)]]) { - spvUnsafeArray<_RESERVED_IDENTIFIER_FIXUP_gl_PerVertex, 4> _29 = spvUnsafeArray<_RESERVED_IDENTIFIER_FIXUP_gl_PerVertex, 4>({ _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) } }); + spvUnsafeArray<_RESERVED_IDENTIFIER_FIXUP_gl_PerVertex, 4> _32 = spvUnsafeArray<_RESERVED_IDENTIFIER_FIXUP_gl_PerVertex, 4>({ _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) } }); device main0_out* gl_out = &spvOut[gl_GlobalInvocationID.x - gl_GlobalInvocationID.x % 4]; threadgroup float4 spvStoragefoo[8][4]; threadgroup float4 (&foo)[4] = spvStoragefoo[(gl_GlobalInvocationID.x / 4) % 8]; - foo[gl_GlobalInvocationID.x % 4] = _15[gl_GlobalInvocationID.x % 4]; - gl_out[gl_GlobalInvocationID.x % 4].gl_Position = _29[gl_GlobalInvocationID.x % 4]._RESERVED_IDENTIFIER_FIXUP_gl_Position; - gl_out[gl_GlobalInvocationID.x % 4].gl_PointSize = _29[gl_GlobalInvocationID.x % 4]._RESERVED_IDENTIFIER_FIXUP_gl_PointSize; - gl_out[gl_GlobalInvocationID.x % 4].gl_ClipDistance = _29[gl_GlobalInvocationID.x % 4]._RESERVED_IDENTIFIER_FIXUP_gl_ClipDistance; - gl_out[gl_GlobalInvocationID.x % 4].gl_CullDistance = _29[gl_GlobalInvocationID.x % 4]._RESERVED_IDENTIFIER_FIXUP_gl_CullDistance; + foo[gl_GlobalInvocationID.x % 4] = _17[gl_GlobalInvocationID.x % 4]; + gl_out[gl_GlobalInvocationID.x % 4].gl_Position = _32[gl_GlobalInvocationID.x % 4]._RESERVED_IDENTIFIER_FIXUP_gl_Position; + gl_out[gl_GlobalInvocationID.x % 4].gl_PointSize = _32[gl_GlobalInvocationID.x % 4]._RESERVED_IDENTIFIER_FIXUP_gl_PointSize; + gl_out[gl_GlobalInvocationID.x % 4].gl_ClipDistance = _32[gl_GlobalInvocationID.x % 4]._RESERVED_IDENTIFIER_FIXUP_gl_ClipDistance; + gl_out[gl_GlobalInvocationID.x % 4].gl_CullDistance = _32[gl_GlobalInvocationID.x % 4]._RESERVED_IDENTIFIER_FIXUP_gl_CullDistance; device main0_patchOut& patchOut = spvPatchOut[gl_GlobalInvocationID.x / 4]; patchOut.foo_patch = float4(0.0); uint gl_InvocationID = gl_GlobalInvocationID.x % 4; diff --git a/reference/shaders-msl-no-opt/asm/masking/initializers.mask-location-1.asm.tesc b/reference/shaders-msl-no-opt/asm/masking/initializers.mask-location-1.asm.tesc index e8f1146b..b55bf7c6 100644 --- a/reference/shaders-msl-no-opt/asm/masking/initializers.mask-location-1.asm.tesc +++ b/reference/shaders-msl-no-opt/asm/masking/initializers.mask-location-1.asm.tesc @@ -52,7 +52,7 @@ struct _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex spvUnsafeArray _RESERVED_IDENTIFIER_FIXUP_gl_CullDistance; }; -constant spvUnsafeArray _15 = spvUnsafeArray({ float4(0.0), float4(0.0), float4(0.0), float4(0.0) }); +constant spvUnsafeArray _17 = spvUnsafeArray({ float4(0.0), float4(0.0), float4(0.0), float4(0.0) }); constant spvUnsafeArray _45 = spvUnsafeArray({ 0.0 }); constant spvUnsafeArray _46 = spvUnsafeArray({ 0.0 }); @@ -70,15 +70,15 @@ struct main0_patchOut }; kernel void main0(uint gl_InvocationID [[thread_index_in_threadgroup]], uint gl_PrimitiveID [[threadgroup_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device main0_patchOut* spvPatchOut [[buffer(27)]], device MTLQuadTessellationFactorsHalf* spvTessLevel [[buffer(26)]]) { - spvUnsafeArray<_RESERVED_IDENTIFIER_FIXUP_gl_PerVertex, 4> _29 = spvUnsafeArray<_RESERVED_IDENTIFIER_FIXUP_gl_PerVertex, 4>({ _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) } }); + spvUnsafeArray<_RESERVED_IDENTIFIER_FIXUP_gl_PerVertex, 4> _32 = spvUnsafeArray<_RESERVED_IDENTIFIER_FIXUP_gl_PerVertex, 4>({ _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) } }); threadgroup float4 foo_patch; device main0_out* gl_out = &spvOut[gl_PrimitiveID * 4]; - gl_out[gl_InvocationID].foo = _15[gl_InvocationID]; - gl_out[gl_InvocationID].gl_Position = _29[gl_InvocationID]._RESERVED_IDENTIFIER_FIXUP_gl_Position; - gl_out[gl_InvocationID].gl_PointSize = _29[gl_InvocationID]._RESERVED_IDENTIFIER_FIXUP_gl_PointSize; - gl_out[gl_InvocationID].gl_ClipDistance = _29[gl_InvocationID]._RESERVED_IDENTIFIER_FIXUP_gl_ClipDistance; - gl_out[gl_InvocationID].gl_CullDistance = _29[gl_InvocationID]._RESERVED_IDENTIFIER_FIXUP_gl_CullDistance; + gl_out[gl_InvocationID].foo = _17[gl_InvocationID]; + gl_out[gl_InvocationID].gl_Position = _32[gl_InvocationID]._RESERVED_IDENTIFIER_FIXUP_gl_Position; + gl_out[gl_InvocationID].gl_PointSize = _32[gl_InvocationID]._RESERVED_IDENTIFIER_FIXUP_gl_PointSize; + gl_out[gl_InvocationID].gl_ClipDistance = _32[gl_InvocationID]._RESERVED_IDENTIFIER_FIXUP_gl_ClipDistance; + gl_out[gl_InvocationID].gl_CullDistance = _32[gl_InvocationID]._RESERVED_IDENTIFIER_FIXUP_gl_CullDistance; device main0_patchOut& patchOut = spvPatchOut[gl_PrimitiveID]; foo_patch = float4(0.0); gl_out[gl_InvocationID].foo = float4(1.0); diff --git a/reference/shaders-msl-no-opt/asm/masking/initializers.mask-location-1.multi-patch.asm.tesc b/reference/shaders-msl-no-opt/asm/masking/initializers.mask-location-1.multi-patch.asm.tesc index a7c1e5d6..48223425 100644 --- a/reference/shaders-msl-no-opt/asm/masking/initializers.mask-location-1.multi-patch.asm.tesc +++ b/reference/shaders-msl-no-opt/asm/masking/initializers.mask-location-1.multi-patch.asm.tesc @@ -52,7 +52,7 @@ struct _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex spvUnsafeArray _RESERVED_IDENTIFIER_FIXUP_gl_CullDistance; }; -constant spvUnsafeArray _15 = spvUnsafeArray({ float4(0.0), float4(0.0), float4(0.0), float4(0.0) }); +constant spvUnsafeArray _17 = spvUnsafeArray({ float4(0.0), float4(0.0), float4(0.0), float4(0.0) }); constant spvUnsafeArray _45 = spvUnsafeArray({ 0.0 }); constant spvUnsafeArray _46 = spvUnsafeArray({ 0.0 }); @@ -70,14 +70,14 @@ struct main0_patchOut }; kernel void main0(uint3 gl_GlobalInvocationID [[thread_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device main0_patchOut* spvPatchOut [[buffer(27)]], device MTLQuadTessellationFactorsHalf* spvTessLevel [[buffer(26)]]) { - spvUnsafeArray<_RESERVED_IDENTIFIER_FIXUP_gl_PerVertex, 4> _29 = spvUnsafeArray<_RESERVED_IDENTIFIER_FIXUP_gl_PerVertex, 4>({ _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) } }); + spvUnsafeArray<_RESERVED_IDENTIFIER_FIXUP_gl_PerVertex, 4> _32 = spvUnsafeArray<_RESERVED_IDENTIFIER_FIXUP_gl_PerVertex, 4>({ _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) } }); device main0_out* gl_out = &spvOut[gl_GlobalInvocationID.x - gl_GlobalInvocationID.x % 4]; - gl_out[gl_GlobalInvocationID.x % 4].foo = _15[gl_GlobalInvocationID.x % 4]; - gl_out[gl_GlobalInvocationID.x % 4].gl_Position = _29[gl_GlobalInvocationID.x % 4]._RESERVED_IDENTIFIER_FIXUP_gl_Position; - gl_out[gl_GlobalInvocationID.x % 4].gl_PointSize = _29[gl_GlobalInvocationID.x % 4]._RESERVED_IDENTIFIER_FIXUP_gl_PointSize; - gl_out[gl_GlobalInvocationID.x % 4].gl_ClipDistance = _29[gl_GlobalInvocationID.x % 4]._RESERVED_IDENTIFIER_FIXUP_gl_ClipDistance; - gl_out[gl_GlobalInvocationID.x % 4].gl_CullDistance = _29[gl_GlobalInvocationID.x % 4]._RESERVED_IDENTIFIER_FIXUP_gl_CullDistance; + gl_out[gl_GlobalInvocationID.x % 4].foo = _17[gl_GlobalInvocationID.x % 4]; + gl_out[gl_GlobalInvocationID.x % 4].gl_Position = _32[gl_GlobalInvocationID.x % 4]._RESERVED_IDENTIFIER_FIXUP_gl_Position; + gl_out[gl_GlobalInvocationID.x % 4].gl_PointSize = _32[gl_GlobalInvocationID.x % 4]._RESERVED_IDENTIFIER_FIXUP_gl_PointSize; + gl_out[gl_GlobalInvocationID.x % 4].gl_ClipDistance = _32[gl_GlobalInvocationID.x % 4]._RESERVED_IDENTIFIER_FIXUP_gl_ClipDistance; + gl_out[gl_GlobalInvocationID.x % 4].gl_CullDistance = _32[gl_GlobalInvocationID.x % 4]._RESERVED_IDENTIFIER_FIXUP_gl_CullDistance; device main0_patchOut& patchOut = spvPatchOut[gl_GlobalInvocationID.x / 4]; threadgroup float4 spvStoragefoo_patch[8]; threadgroup float4 (&foo_patch) = spvStoragefoo_patch[(gl_GlobalInvocationID.x / 4) % 8]; diff --git a/reference/shaders-msl-no-opt/asm/masking/initializers.mask-point-size.msl2.asm.tesc b/reference/shaders-msl-no-opt/asm/masking/initializers.mask-point-size.msl2.asm.tesc index 344751b0..27a4d19f 100644 --- a/reference/shaders-msl-no-opt/asm/masking/initializers.mask-point-size.msl2.asm.tesc +++ b/reference/shaders-msl-no-opt/asm/masking/initializers.mask-point-size.msl2.asm.tesc @@ -52,7 +52,7 @@ struct gl_PerVertex spvUnsafeArray gl_CullDistance; }; -constant spvUnsafeArray _15 = spvUnsafeArray({ float4(0.0), float4(0.0), float4(0.0), float4(0.0) }); +constant spvUnsafeArray _17 = spvUnsafeArray({ float4(0.0), float4(0.0), float4(0.0), float4(0.0) }); constant spvUnsafeArray _45 = spvUnsafeArray({ 0.0 }); constant spvUnsafeArray _46 = spvUnsafeArray({ 0.0 }); @@ -71,15 +71,15 @@ struct main0_patchOut kernel void main0(uint gl_InvocationID [[thread_index_in_threadgroup]], uint gl_PrimitiveID [[threadgroup_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device main0_patchOut* spvPatchOut [[buffer(27)]], device MTLQuadTessellationFactorsHalf* spvTessLevel [[buffer(26)]]) { - spvUnsafeArray _29 = spvUnsafeArray({ gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) } }); + spvUnsafeArray _32 = spvUnsafeArray({ gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) } }); threadgroup gl_PerVertex gl_out_masked[4]; device main0_out* gl_out = &spvOut[gl_PrimitiveID * 4]; - gl_out[gl_InvocationID].foo = _15[gl_InvocationID]; - gl_out[gl_InvocationID].gl_Position = _29[gl_InvocationID].gl_Position; - gl_out[gl_InvocationID].gl_ClipDistance = _29[gl_InvocationID].gl_ClipDistance; - gl_out[gl_InvocationID].gl_CullDistance = _29[gl_InvocationID].gl_CullDistance; - gl_out_masked[gl_InvocationID] = _29[gl_InvocationID]; + gl_out[gl_InvocationID].foo = _17[gl_InvocationID]; + gl_out[gl_InvocationID].gl_Position = _32[gl_InvocationID].gl_Position; + gl_out[gl_InvocationID].gl_ClipDistance = _32[gl_InvocationID].gl_ClipDistance; + gl_out[gl_InvocationID].gl_CullDistance = _32[gl_InvocationID].gl_CullDistance; + gl_out_masked[gl_InvocationID] = _32[gl_InvocationID]; device main0_patchOut& patchOut = spvPatchOut[gl_PrimitiveID]; patchOut.foo_patch = float4(0.0); gl_out[gl_InvocationID].foo = float4(1.0); diff --git a/reference/shaders-msl-no-opt/asm/masking/initializers.mask-point-size.msl2.multi-patch.asm.tesc b/reference/shaders-msl-no-opt/asm/masking/initializers.mask-point-size.msl2.multi-patch.asm.tesc index 92731ec0..bf5f8364 100644 --- a/reference/shaders-msl-no-opt/asm/masking/initializers.mask-point-size.msl2.multi-patch.asm.tesc +++ b/reference/shaders-msl-no-opt/asm/masking/initializers.mask-point-size.msl2.multi-patch.asm.tesc @@ -52,7 +52,7 @@ struct gl_PerVertex spvUnsafeArray gl_CullDistance; }; -constant spvUnsafeArray _15 = spvUnsafeArray({ float4(0.0), float4(0.0), float4(0.0), float4(0.0) }); +constant spvUnsafeArray _17 = spvUnsafeArray({ float4(0.0), float4(0.0), float4(0.0), float4(0.0) }); constant spvUnsafeArray _45 = spvUnsafeArray({ 0.0 }); constant spvUnsafeArray _46 = spvUnsafeArray({ 0.0 }); @@ -71,16 +71,16 @@ struct main0_patchOut kernel void main0(uint3 gl_GlobalInvocationID [[thread_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device main0_patchOut* spvPatchOut [[buffer(27)]], device MTLQuadTessellationFactorsHalf* spvTessLevel [[buffer(26)]]) { - spvUnsafeArray _29 = spvUnsafeArray({ gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) } }); + spvUnsafeArray _32 = spvUnsafeArray({ gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) } }); device main0_out* gl_out = &spvOut[gl_GlobalInvocationID.x - gl_GlobalInvocationID.x % 4]; - gl_out[gl_GlobalInvocationID.x % 4].foo = _15[gl_GlobalInvocationID.x % 4]; - gl_out[gl_GlobalInvocationID.x % 4].gl_Position = _29[gl_GlobalInvocationID.x % 4].gl_Position; - gl_out[gl_GlobalInvocationID.x % 4].gl_ClipDistance = _29[gl_GlobalInvocationID.x % 4].gl_ClipDistance; - gl_out[gl_GlobalInvocationID.x % 4].gl_CullDistance = _29[gl_GlobalInvocationID.x % 4].gl_CullDistance; + gl_out[gl_GlobalInvocationID.x % 4].foo = _17[gl_GlobalInvocationID.x % 4]; + gl_out[gl_GlobalInvocationID.x % 4].gl_Position = _32[gl_GlobalInvocationID.x % 4].gl_Position; + gl_out[gl_GlobalInvocationID.x % 4].gl_ClipDistance = _32[gl_GlobalInvocationID.x % 4].gl_ClipDistance; + gl_out[gl_GlobalInvocationID.x % 4].gl_CullDistance = _32[gl_GlobalInvocationID.x % 4].gl_CullDistance; threadgroup gl_PerVertex spvStoragegl_out_masked[8][4]; threadgroup gl_PerVertex (&gl_out_masked)[4] = spvStoragegl_out_masked[(gl_GlobalInvocationID.x / 4) % 8]; - gl_out_masked[gl_GlobalInvocationID.x % 4] = _29[gl_GlobalInvocationID.x % 4]; + gl_out_masked[gl_GlobalInvocationID.x % 4] = _32[gl_GlobalInvocationID.x % 4]; device main0_patchOut& patchOut = spvPatchOut[gl_GlobalInvocationID.x / 4]; patchOut.foo_patch = float4(0.0); uint gl_InvocationID = gl_GlobalInvocationID.x % 4; diff --git a/reference/shaders-msl-no-opt/asm/masking/initializers.mask-position.msl2.asm.tesc b/reference/shaders-msl-no-opt/asm/masking/initializers.mask-position.msl2.asm.tesc index 2f11636a..fddc3b96 100644 --- a/reference/shaders-msl-no-opt/asm/masking/initializers.mask-position.msl2.asm.tesc +++ b/reference/shaders-msl-no-opt/asm/masking/initializers.mask-position.msl2.asm.tesc @@ -52,7 +52,7 @@ struct gl_PerVertex spvUnsafeArray gl_CullDistance; }; -constant spvUnsafeArray _15 = spvUnsafeArray({ float4(0.0), float4(0.0), float4(0.0), float4(0.0) }); +constant spvUnsafeArray _17 = spvUnsafeArray({ float4(0.0), float4(0.0), float4(0.0), float4(0.0) }); constant spvUnsafeArray _45 = spvUnsafeArray({ 0.0 }); constant spvUnsafeArray _46 = spvUnsafeArray({ 0.0 }); @@ -71,15 +71,15 @@ struct main0_patchOut kernel void main0(uint gl_InvocationID [[thread_index_in_threadgroup]], uint gl_PrimitiveID [[threadgroup_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device main0_patchOut* spvPatchOut [[buffer(27)]], device MTLQuadTessellationFactorsHalf* spvTessLevel [[buffer(26)]]) { - spvUnsafeArray _29 = spvUnsafeArray({ gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) } }); + spvUnsafeArray _32 = spvUnsafeArray({ gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) } }); threadgroup gl_PerVertex gl_out_masked[4]; device main0_out* gl_out = &spvOut[gl_PrimitiveID * 4]; - gl_out[gl_InvocationID].foo = _15[gl_InvocationID]; - gl_out[gl_InvocationID].gl_PointSize = _29[gl_InvocationID].gl_PointSize; - gl_out[gl_InvocationID].gl_ClipDistance = _29[gl_InvocationID].gl_ClipDistance; - gl_out[gl_InvocationID].gl_CullDistance = _29[gl_InvocationID].gl_CullDistance; - gl_out_masked[gl_InvocationID] = _29[gl_InvocationID]; + gl_out[gl_InvocationID].foo = _17[gl_InvocationID]; + gl_out[gl_InvocationID].gl_PointSize = _32[gl_InvocationID].gl_PointSize; + gl_out[gl_InvocationID].gl_ClipDistance = _32[gl_InvocationID].gl_ClipDistance; + gl_out[gl_InvocationID].gl_CullDistance = _32[gl_InvocationID].gl_CullDistance; + gl_out_masked[gl_InvocationID] = _32[gl_InvocationID]; device main0_patchOut& patchOut = spvPatchOut[gl_PrimitiveID]; patchOut.foo_patch = float4(0.0); gl_out[gl_InvocationID].foo = float4(1.0); diff --git a/reference/shaders-msl-no-opt/asm/masking/initializers.mask-position.msl2.multi-patch.asm.tesc b/reference/shaders-msl-no-opt/asm/masking/initializers.mask-position.msl2.multi-patch.asm.tesc index 7283eddb..56d0662a 100644 --- a/reference/shaders-msl-no-opt/asm/masking/initializers.mask-position.msl2.multi-patch.asm.tesc +++ b/reference/shaders-msl-no-opt/asm/masking/initializers.mask-position.msl2.multi-patch.asm.tesc @@ -52,7 +52,7 @@ struct gl_PerVertex spvUnsafeArray gl_CullDistance; }; -constant spvUnsafeArray _15 = spvUnsafeArray({ float4(0.0), float4(0.0), float4(0.0), float4(0.0) }); +constant spvUnsafeArray _17 = spvUnsafeArray({ float4(0.0), float4(0.0), float4(0.0), float4(0.0) }); constant spvUnsafeArray _45 = spvUnsafeArray({ 0.0 }); constant spvUnsafeArray _46 = spvUnsafeArray({ 0.0 }); @@ -71,16 +71,16 @@ struct main0_patchOut kernel void main0(uint3 gl_GlobalInvocationID [[thread_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device main0_patchOut* spvPatchOut [[buffer(27)]], device MTLQuadTessellationFactorsHalf* spvTessLevel [[buffer(26)]]) { - spvUnsafeArray _29 = spvUnsafeArray({ gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) } }); + spvUnsafeArray _32 = spvUnsafeArray({ gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) }, gl_PerVertex{ float4(0.0), 0.0, spvUnsafeArray({ 0.0 }), spvUnsafeArray({ 0.0 }) } }); device main0_out* gl_out = &spvOut[gl_GlobalInvocationID.x - gl_GlobalInvocationID.x % 4]; - gl_out[gl_GlobalInvocationID.x % 4].foo = _15[gl_GlobalInvocationID.x % 4]; - gl_out[gl_GlobalInvocationID.x % 4].gl_PointSize = _29[gl_GlobalInvocationID.x % 4].gl_PointSize; - gl_out[gl_GlobalInvocationID.x % 4].gl_ClipDistance = _29[gl_GlobalInvocationID.x % 4].gl_ClipDistance; - gl_out[gl_GlobalInvocationID.x % 4].gl_CullDistance = _29[gl_GlobalInvocationID.x % 4].gl_CullDistance; + gl_out[gl_GlobalInvocationID.x % 4].foo = _17[gl_GlobalInvocationID.x % 4]; + gl_out[gl_GlobalInvocationID.x % 4].gl_PointSize = _32[gl_GlobalInvocationID.x % 4].gl_PointSize; + gl_out[gl_GlobalInvocationID.x % 4].gl_ClipDistance = _32[gl_GlobalInvocationID.x % 4].gl_ClipDistance; + gl_out[gl_GlobalInvocationID.x % 4].gl_CullDistance = _32[gl_GlobalInvocationID.x % 4].gl_CullDistance; threadgroup gl_PerVertex spvStoragegl_out_masked[8][4]; threadgroup gl_PerVertex (&gl_out_masked)[4] = spvStoragegl_out_masked[(gl_GlobalInvocationID.x / 4) % 8]; - gl_out_masked[gl_GlobalInvocationID.x % 4] = _29[gl_GlobalInvocationID.x % 4]; + gl_out_masked[gl_GlobalInvocationID.x % 4] = _32[gl_GlobalInvocationID.x % 4]; device main0_patchOut& patchOut = spvPatchOut[gl_GlobalInvocationID.x / 4]; patchOut.foo_patch = float4(0.0); uint gl_InvocationID = gl_GlobalInvocationID.x % 4; diff --git a/reference/shaders-msl-no-opt/asm/packing/composite-extract-row-major.asm.comp b/reference/shaders-msl-no-opt/asm/packing/composite-extract-row-major.asm.comp index d2c368b8..7787da89 100644 --- a/reference/shaders-msl-no-opt/asm/packing/composite-extract-row-major.asm.comp +++ b/reference/shaders-msl-no-opt/asm/packing/composite-extract-row-major.asm.comp @@ -9,8 +9,8 @@ struct SSBORow float4x4 row_major0; }; -kernel void main0(device SSBORow& _4 [[buffer(0)]]) +kernel void main0(device SSBORow& _6 [[buffer(0)]]) { - _4.v = _4.row_major0[2][1]; + _6.v = _6.row_major0[2][1]; } diff --git a/reference/shaders-msl-no-opt/asm/packing/load-packed-no-forwarding-2.asm.comp b/reference/shaders-msl-no-opt/asm/packing/load-packed-no-forwarding-2.asm.comp index 0ae12f08..6aad2ed0 100644 --- a/reference/shaders-msl-no-opt/asm/packing/load-packed-no-forwarding-2.asm.comp +++ b/reference/shaders-msl-no-opt/asm/packing/load-packed-no-forwarding-2.asm.comp @@ -10,10 +10,10 @@ struct SSBOScalar float3x3 c; }; -kernel void main0(device SSBOScalar& _4 [[buffer(0)]]) +kernel void main0(device SSBOScalar& _6 [[buffer(0)]]) { - float3x3 _20 = transpose(_4.b); - _4.b = _4.c; - _4.a = _20 * _4.a; + float3x3 _24 = transpose(_6.b); + _6.b = _6.c; + _6.a = _24 * _6.a; } diff --git a/reference/shaders-msl-no-opt/asm/packing/load-packed-no-forwarding-3.asm.comp b/reference/shaders-msl-no-opt/asm/packing/load-packed-no-forwarding-3.asm.comp index 86bdd452..76751d5b 100644 --- a/reference/shaders-msl-no-opt/asm/packing/load-packed-no-forwarding-3.asm.comp +++ b/reference/shaders-msl-no-opt/asm/packing/load-packed-no-forwarding-3.asm.comp @@ -10,11 +10,11 @@ struct SSBOScalar packed_float3 c; }; -kernel void main0(device SSBOScalar& _4 [[buffer(0)]]) +kernel void main0(device SSBOScalar& _6 [[buffer(0)]]) { - float3 _17 = float3(_4.b); - float3 _19 = float3(_4.c); - _4.c = _17; - _4.a = _17 * _19; + float3 _16 = float3(_6.b); + float3 _19 = float3(_6.c); + _6.c = _16; + _6.a = _16 * _19; } diff --git a/reference/shaders-msl-no-opt/asm/packing/load-packed-no-forwarding-4.asm.comp b/reference/shaders-msl-no-opt/asm/packing/load-packed-no-forwarding-4.asm.comp index 66942043..229ab2b6 100644 --- a/reference/shaders-msl-no-opt/asm/packing/load-packed-no-forwarding-4.asm.comp +++ b/reference/shaders-msl-no-opt/asm/packing/load-packed-no-forwarding-4.asm.comp @@ -10,11 +10,11 @@ struct SSBOScalar float4 c[16]; }; -kernel void main0(device SSBOScalar& _4 [[buffer(0)]]) +kernel void main0(device SSBOScalar& _6 [[buffer(0)]]) { - float2 _27 = _4.b[10].xy; - float _29 = _4.c[10].x; - (device float2&)_4.b[10] = float2(10.0, 11.0); - (device float2&)_4.a[10] = _27 * _29; + float2 _22 = _6.b[10].xy; + float _26 = _6.c[10].x; + (device float2&)_6.b[10] = float2(10.0, 11.0); + (device float2&)_6.a[10] = _22 * _26; } diff --git a/reference/shaders-msl-no-opt/asm/packing/load-packed-no-forwarding-5.asm.comp b/reference/shaders-msl-no-opt/asm/packing/load-packed-no-forwarding-5.asm.comp index 23d25b82..24be4115 100644 --- a/reference/shaders-msl-no-opt/asm/packing/load-packed-no-forwarding-5.asm.comp +++ b/reference/shaders-msl-no-opt/asm/packing/load-packed-no-forwarding-5.asm.comp @@ -10,11 +10,11 @@ struct SSBOScalar packed_float3 c; }; -kernel void main0(device SSBOScalar& _4 [[buffer(0)]]) +kernel void main0(device SSBOScalar& _6 [[buffer(0)]]) { - float3 _21 = float3(_4.b); - float3 _24 = float3(_4.c); - _4.b = float3(1.0); - _4.a = _21.xy * _24.yz; + float3 _17 = float3(_6.b); + float3 _21 = float3(_6.c); + _6.b = float3(1.0); + _6.a = _17.xy * _21.yz; } diff --git a/reference/shaders-msl-no-opt/asm/packing/load-packed-no-forwarding.asm.comp b/reference/shaders-msl-no-opt/asm/packing/load-packed-no-forwarding.asm.comp index c21fcc7f..04e12948 100644 --- a/reference/shaders-msl-no-opt/asm/packing/load-packed-no-forwarding.asm.comp +++ b/reference/shaders-msl-no-opt/asm/packing/load-packed-no-forwarding.asm.comp @@ -12,12 +12,12 @@ struct SSBOScalar packed_rm_float3x3 c; }; -kernel void main0(device SSBOScalar& _4 [[buffer(0)]]) +kernel void main0(device SSBOScalar& _6 [[buffer(0)]]) { - float3x3 _20 = transpose(float3x3(float3(_4.b[0]), float3(_4.b[1]), float3(_4.b[2]))); - _4.b[0] = float3x3(float3(_4.c[0]), float3(_4.c[1]), float3(_4.c[2]))[0]; - _4.b[1] = float3x3(float3(_4.c[0]), float3(_4.c[1]), float3(_4.c[2]))[1]; - _4.b[2] = float3x3(float3(_4.c[0]), float3(_4.c[1]), float3(_4.c[2]))[2]; - _4.a = _20 * float3(_4.a); + float3x3 _24 = transpose(float3x3(float3(_6.b[0]), float3(_6.b[1]), float3(_6.b[2]))); + _6.b[0] = float3x3(float3(_6.c[0]), float3(_6.c[1]), float3(_6.c[2]))[0]; + _6.b[1] = float3x3(float3(_6.c[0]), float3(_6.c[1]), float3(_6.c[2]))[1]; + _6.b[2] = float3x3(float3(_6.c[0]), float3(_6.c[1]), float3(_6.c[2]))[2]; + _6.a = _24 * float3(_6.a); } diff --git a/reference/shaders-msl-no-opt/asm/packing/packed-vector-extract-insert.asm.comp b/reference/shaders-msl-no-opt/asm/packing/packed-vector-extract-insert.asm.comp index 4c70aede..d2ecc3a2 100644 --- a/reference/shaders-msl-no-opt/asm/packing/packed-vector-extract-insert.asm.comp +++ b/reference/shaders-msl-no-opt/asm/packing/packed-vector-extract-insert.asm.comp @@ -11,12 +11,12 @@ struct SSBOScalar float3 d; }; -kernel void main0(device SSBOScalar& _4 [[buffer(0)]]) +kernel void main0(device SSBOScalar& _6 [[buffer(0)]]) { - float3 _23 = float3(_4.b); + float3 _23 = float3(_6.b); float3 _24 = _23; _24.z = 2.0; - _4.a = _23.xy * _23.z; - _4.b = _24; + _6.a = _23.xy * _23.z; + _6.b = _24; } diff --git a/reference/shaders-msl-no-opt/asm/packing/row-major-split-access-chain.asm.comp b/reference/shaders-msl-no-opt/asm/packing/row-major-split-access-chain.asm.comp index f12092cf..88dba735 100644 --- a/reference/shaders-msl-no-opt/asm/packing/row-major-split-access-chain.asm.comp +++ b/reference/shaders-msl-no-opt/asm/packing/row-major-split-access-chain.asm.comp @@ -9,8 +9,8 @@ struct SSBORow float4x4 row_major0; }; -kernel void main0(device SSBORow& _4 [[buffer(0)]]) +kernel void main0(device SSBORow& _6 [[buffer(0)]]) { - _4.v = ((device float*)&_4.row_major0[2u])[1]; + _6.v = ((device float*)&_6.row_major0[2u])[1]; } diff --git a/reference/shaders-msl-no-opt/asm/temporary.zero-initialize.asm.frag b/reference/shaders-msl-no-opt/asm/temporary.zero-initialize.asm.frag index 6fbf2ff7..8e5f6b8e 100644 --- a/reference/shaders-msl-no-opt/asm/temporary.zero-initialize.asm.frag +++ b/reference/shaders-msl-no-opt/asm/temporary.zero-initialize.asm.frag @@ -18,19 +18,19 @@ fragment main0_out main0(main0_in in [[stage_in]]) { main0_out out = {}; out.FragColor = float4(0.0); - int _10 = {}; - int _15 = {}; - for (int _16 = 0, _17 = 0; _16 < in.vA; _17 = _15, _16 += _10) + int _49 = {}; + int _58 = {}; + for (int _57 = 0, _60 = 0; _57 < in.vA; _60 = _58, _57 += _49) { - if ((in.vA + _16) == 20) + if ((in.vA + _57) == 20) { - _15 = 50; + _58 = 50; } else { - _15 = ((in.vB + _16) == 40) ? 60 : _17; + _58 = ((in.vB + _57) == 40) ? 60 : _60; } - _10 = _15 + 10; + _49 = _58 + 10; out.FragColor += float4(1.0); } return out; diff --git a/reference/shaders-msl-no-opt/asm/tesc/array-control-point-initializer.asm.tesc b/reference/shaders-msl-no-opt/asm/tesc/array-control-point-initializer.asm.tesc index 5c30e05a..139c357e 100644 --- a/reference/shaders-msl-no-opt/asm/tesc/array-control-point-initializer.asm.tesc +++ b/reference/shaders-msl-no-opt/asm/tesc/array-control-point-initializer.asm.tesc @@ -45,7 +45,7 @@ struct spvUnsafeArray }; constant spvUnsafeArray _49 = spvUnsafeArray({ 0.0, 0.0, 0.0 }); -constant spvUnsafeArray, 4> _27 = spvUnsafeArray, 4>({ spvUnsafeArray({ 0.0, 0.0, 0.0 }), spvUnsafeArray({ 0.0, 0.0, 0.0 }), spvUnsafeArray({ 0.0, 0.0, 0.0 }), spvUnsafeArray({ 0.0, 0.0, 0.0 }) }); +constant spvUnsafeArray, 4> _33 = spvUnsafeArray, 4>({ spvUnsafeArray({ 0.0, 0.0, 0.0 }), spvUnsafeArray({ 0.0, 0.0, 0.0 }), spvUnsafeArray({ 0.0, 0.0, 0.0 }), spvUnsafeArray({ 0.0, 0.0, 0.0 }) }); struct main0_out { @@ -56,7 +56,7 @@ struct main0_out kernel void main0(uint gl_InvocationID [[thread_index_in_threadgroup]], uint gl_PrimitiveID [[threadgroup_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device MTLQuadTessellationFactorsHalf* spvTessLevel [[buffer(26)]]) { device main0_out* gl_out = &spvOut[gl_PrimitiveID * 4]; - gl_out[gl_InvocationID].foo = _27[gl_InvocationID]; + gl_out[gl_InvocationID].foo = _33[gl_InvocationID]; gl_out[gl_InvocationID].gl_Position = float4(1.0); gl_out[gl_InvocationID].foo[0] = float(gl_InvocationID); gl_out[gl_InvocationID].foo[1] = float(gl_InvocationID) + 1.0; diff --git a/reference/shaders-msl-no-opt/asm/tesc/block-control-point-initializer.asm.tesc b/reference/shaders-msl-no-opt/asm/tesc/block-control-point-initializer.asm.tesc index 71498f5b..dd5c6996 100644 --- a/reference/shaders-msl-no-opt/asm/tesc/block-control-point-initializer.asm.tesc +++ b/reference/shaders-msl-no-opt/asm/tesc/block-control-point-initializer.asm.tesc @@ -59,11 +59,11 @@ struct main0_out kernel void main0(uint gl_InvocationID [[thread_index_in_threadgroup]], uint gl_PrimitiveID [[threadgroup_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device MTLQuadTessellationFactorsHalf* spvTessLevel [[buffer(26)]]) { - spvUnsafeArray _27 = spvUnsafeArray({ Verts{ 0.0, float2(0.0) }, Verts{ 0.0, float2(0.0) }, Verts{ 0.0, float2(0.0) }, Verts{ 0.0, float2(0.0) } }); + spvUnsafeArray _33 = spvUnsafeArray({ Verts{ 0.0, float2(0.0) }, Verts{ 0.0, float2(0.0) }, Verts{ 0.0, float2(0.0) }, Verts{ 0.0, float2(0.0) } }); device main0_out* gl_out = &spvOut[gl_PrimitiveID * 4]; - gl_out[gl_InvocationID].verts_a = _27[gl_InvocationID].a; - gl_out[gl_InvocationID].verts_b = _27[gl_InvocationID].b; + gl_out[gl_InvocationID].verts_a = _33[gl_InvocationID].a; + gl_out[gl_InvocationID].verts_b = _33[gl_InvocationID].b; gl_out[gl_InvocationID].gl_Position = float4(1.0); gl_out[gl_InvocationID].verts_a = float(gl_InvocationID); } diff --git a/reference/shaders-msl-no-opt/asm/tesc/builtin-control-point-initializer.asm.tesc b/reference/shaders-msl-no-opt/asm/tesc/builtin-control-point-initializer.asm.tesc index d8b74bfa..65dc4ed5 100644 --- a/reference/shaders-msl-no-opt/asm/tesc/builtin-control-point-initializer.asm.tesc +++ b/reference/shaders-msl-no-opt/asm/tesc/builtin-control-point-initializer.asm.tesc @@ -66,14 +66,14 @@ struct main0_out kernel void main0(uint gl_InvocationID [[thread_index_in_threadgroup]], uint gl_PrimitiveID [[threadgroup_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device MTLQuadTessellationFactorsHalf* spvTessLevel [[buffer(26)]]) { - spvUnsafeArray<_RESERVED_IDENTIFIER_FIXUP_gl_PerVertex, 4> _17 = spvUnsafeArray<_RESERVED_IDENTIFIER_FIXUP_gl_PerVertex, 4>({ _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0 }, _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0 }, _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0 }, _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0 } }); - spvUnsafeArray _27 = spvUnsafeArray({ Verts{ 0.0, float2(0.0) }, Verts{ 0.0, float2(0.0) }, Verts{ 0.0, float2(0.0) }, Verts{ 0.0, float2(0.0) } }); + spvUnsafeArray<_RESERVED_IDENTIFIER_FIXUP_gl_PerVertex, 4> _18 = spvUnsafeArray<_RESERVED_IDENTIFIER_FIXUP_gl_PerVertex, 4>({ _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0 }, _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0 }, _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0 }, _RESERVED_IDENTIFIER_FIXUP_gl_PerVertex{ float4(0.0), 0.0 } }); + spvUnsafeArray _33 = spvUnsafeArray({ Verts{ 0.0, float2(0.0) }, Verts{ 0.0, float2(0.0) }, Verts{ 0.0, float2(0.0) }, Verts{ 0.0, float2(0.0) } }); device main0_out* gl_out = &spvOut[gl_PrimitiveID * 4]; - gl_out[gl_InvocationID].gl_Position = _17[gl_InvocationID]._RESERVED_IDENTIFIER_FIXUP_gl_Position; - gl_out[gl_InvocationID].gl_PointSize = _17[gl_InvocationID]._RESERVED_IDENTIFIER_FIXUP_gl_PointSize; - gl_out[gl_InvocationID].verts_a = _27[gl_InvocationID].a; - gl_out[gl_InvocationID].verts_b = _27[gl_InvocationID].b; + gl_out[gl_InvocationID].gl_Position = _18[gl_InvocationID]._RESERVED_IDENTIFIER_FIXUP_gl_Position; + gl_out[gl_InvocationID].gl_PointSize = _18[gl_InvocationID]._RESERVED_IDENTIFIER_FIXUP_gl_PointSize; + gl_out[gl_InvocationID].verts_a = _33[gl_InvocationID].a; + gl_out[gl_InvocationID].verts_b = _33[gl_InvocationID].b; gl_out[gl_InvocationID].gl_Position = float4(1.0); gl_out[gl_InvocationID].verts_a = float(gl_InvocationID); } diff --git a/reference/shaders-msl-no-opt/asm/tesc/composite-control-point-initializer.asm.tesc b/reference/shaders-msl-no-opt/asm/tesc/composite-control-point-initializer.asm.tesc index a10731bb..aa51eb67 100644 --- a/reference/shaders-msl-no-opt/asm/tesc/composite-control-point-initializer.asm.tesc +++ b/reference/shaders-msl-no-opt/asm/tesc/composite-control-point-initializer.asm.tesc @@ -59,10 +59,10 @@ struct main0_out kernel void main0(uint gl_InvocationID [[thread_index_in_threadgroup]], uint gl_PrimitiveID [[threadgroup_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device MTLQuadTessellationFactorsHalf* spvTessLevel [[buffer(26)]]) { - spvUnsafeArray _27 = spvUnsafeArray({ Foo{ 0.0, float2(0.0), float4(0.0) }, Foo{ 0.0, float2(0.0), float4(0.0) }, Foo{ 0.0, float2(0.0), float4(0.0) }, Foo{ 0.0, float2(0.0), float4(0.0) } }); + spvUnsafeArray _33 = spvUnsafeArray({ Foo{ 0.0, float2(0.0), float4(0.0) }, Foo{ 0.0, float2(0.0), float4(0.0) }, Foo{ 0.0, float2(0.0), float4(0.0) }, Foo{ 0.0, float2(0.0), float4(0.0) } }); device main0_out* gl_out = &spvOut[gl_PrimitiveID * 4]; - gl_out[gl_InvocationID].foo = _27[gl_InvocationID]; + gl_out[gl_InvocationID].foo = _33[gl_InvocationID]; gl_out[gl_InvocationID].gl_Position = float4(1.0); gl_out[gl_InvocationID].foo.a = float(gl_InvocationID); } diff --git a/reference/shaders-msl-no-opt/asm/tesc/copy-memory-control-point.asm.tesc b/reference/shaders-msl-no-opt/asm/tesc/copy-memory-control-point.asm.tesc index c606f6a0..fe8ed266 100644 --- a/reference/shaders-msl-no-opt/asm/tesc/copy-memory-control-point.asm.tesc +++ b/reference/shaders-msl-no-opt/asm/tesc/copy-memory-control-point.asm.tesc @@ -64,37 +64,37 @@ struct main0_in }; static inline __attribute__((always_inline)) -void fork0_epilogue(thread const float4& _87, thread const float4& _88, thread const float4& _89, device half (&gl_TessLevelOuter)[3]) +void fork0_epilogue(thread const float4& _61, thread const float4& _62, thread const float4& _63, device half (&gl_TessLevelOuter)[3]) { - gl_TessLevelOuter[0u] = half(_87.x); - gl_TessLevelOuter[1u] = half(_88.x); - gl_TessLevelOuter[2u] = half(_89.x); + gl_TessLevelOuter[0u] = half(_61.x); + gl_TessLevelOuter[1u] = half(_62.x); + gl_TessLevelOuter[2u] = half(_63.x); } static inline __attribute__((always_inline)) -void fork0(uint vForkInstanceId, device half (&gl_TessLevelOuter)[3], thread spvUnsafeArray& opc, constant cb1_struct& cb0_0, thread float4& _48, thread float4& _49, thread float4& _50) +void fork0(uint vForkInstanceId, thread spvUnsafeArray& opc, constant cb1_struct& cb0_0, device half (&gl_TessLevelOuter)[3], thread float4& _52, thread float4& _55, thread float4& _58) { float4 r0; r0.x = as_type(vForkInstanceId); opc[as_type(r0.x)].x = cb0_0._m0[0u].x; - _48 = opc[0u]; - _49 = opc[1u]; - _50 = opc[2u]; - fork0_epilogue(_48, _49, _50, gl_TessLevelOuter); + _52 = opc[0u]; + _55 = opc[1u]; + _58 = opc[2u]; + fork0_epilogue(_52, _55, _58, gl_TessLevelOuter); } static inline __attribute__((always_inline)) -void fork1_epilogue(thread const float4& _109, device half &gl_TessLevelInner) +void fork1_epilogue(thread const float4& _92, device half &gl_TessLevelInner) { - gl_TessLevelInner = half(_109.x); + gl_TessLevelInner = half(_92.x); } static inline __attribute__((always_inline)) -void fork1(device half &gl_TessLevelInner, thread spvUnsafeArray& opc, constant cb1_struct& cb0_0, thread float4& _56) +void fork1(thread spvUnsafeArray& opc, constant cb1_struct& cb0_0, device half &gl_TessLevelInner, thread float4& _89) { opc[3u].x = cb0_0._m0[0u].x; - _56 = opc[3u]; - fork1_epilogue(_56, gl_TessLevelInner); + _89 = opc[3u]; + fork1_epilogue(_89, gl_TessLevelInner); } kernel void main0(main0_in in [[stage_in]], constant cb1_struct& cb0_0 [[buffer(0)]], uint gl_InvocationID [[thread_index_in_threadgroup]], uint gl_PrimitiveID [[threadgroup_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device MTLTriangleTessellationFactorsHalf* spvTessLevel [[buffer(26)]], threadgroup main0_in* gl_in [[threadgroup(0)]]) @@ -113,13 +113,13 @@ kernel void main0(main0_in in [[stage_in]], constant cb1_struct& cb0_0 [[buffer( gl_out[gl_InvocationID].vocp0 = gl_in[gl_InvocationID].vicp0; gl_out[gl_InvocationID].vocp1 = gl_in[gl_InvocationID].vicp1; spvUnsafeArray opc; - float4 _48; - float4 _49; - float4 _50; - fork0(0u, spvTessLevel[gl_PrimitiveID].edgeTessellationFactor, opc, cb0_0, _48, _49, _50); - fork0(1u, spvTessLevel[gl_PrimitiveID].edgeTessellationFactor, opc, cb0_0, _48, _49, _50); - fork0(2u, spvTessLevel[gl_PrimitiveID].edgeTessellationFactor, opc, cb0_0, _48, _49, _50); - float4 _56; - fork1(spvTessLevel[gl_PrimitiveID].insideTessellationFactor, opc, cb0_0, _56); + float4 _52; + float4 _55; + float4 _58; + fork0(0u, opc, cb0_0, spvTessLevel[gl_PrimitiveID].edgeTessellationFactor, _52, _55, _58); + fork0(1u, opc, cb0_0, spvTessLevel[gl_PrimitiveID].edgeTessellationFactor, _52, _55, _58); + fork0(2u, opc, cb0_0, spvTessLevel[gl_PrimitiveID].edgeTessellationFactor, _52, _55, _58); + float4 _89; + fork1(opc, cb0_0, spvTessLevel[gl_PrimitiveID].insideTessellationFactor, _89); } diff --git a/reference/shaders-msl-no-opt/asm/tesc/copy-tess-level-tri.asm.tesc b/reference/shaders-msl-no-opt/asm/tesc/copy-tess-level-tri.asm.tesc index 6585e772..ba1e0b6d 100644 --- a/reference/shaders-msl-no-opt/asm/tesc/copy-tess-level-tri.asm.tesc +++ b/reference/shaders-msl-no-opt/asm/tesc/copy-tess-level-tri.asm.tesc @@ -44,8 +44,8 @@ struct spvUnsafeArray } }; -constant spvUnsafeArray _19 = spvUnsafeArray({ 1.0, 2.0 }); -constant spvUnsafeArray _25 = spvUnsafeArray({ 1.0, 2.0, 3.0, 4.0 }); +constant spvUnsafeArray _14 = spvUnsafeArray({ 1.0, 2.0 }); +constant spvUnsafeArray _21 = spvUnsafeArray({ 1.0, 2.0, 3.0, 4.0 }); struct main0_out { @@ -55,10 +55,10 @@ struct main0_out kernel void main0(uint gl_InvocationID [[thread_index_in_threadgroup]], uint gl_PrimitiveID [[threadgroup_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device MTLTriangleTessellationFactorsHalf* spvTessLevel [[buffer(26)]]) { device main0_out* gl_out = &spvOut[gl_PrimitiveID * 1]; - spvTessLevel[gl_PrimitiveID].insideTessellationFactor = half(_19[0]); - spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[0] = half(_25[0]); - spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[1] = half(_25[1]); - spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[2] = half(_25[2]); + spvTessLevel[gl_PrimitiveID].insideTessellationFactor = half(_14[0]); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[0] = half(_21[0]); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[1] = half(_21[1]); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[2] = half(_21[2]); spvUnsafeArray inner = spvUnsafeArray({ float(spvTessLevel[gl_PrimitiveID].insideTessellationFactor), 0.0 }); spvUnsafeArray outer = spvUnsafeArray({ float(spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[0]), float(spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[1]), float(spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[2]), 0.0 }); gl_out[gl_InvocationID].gl_Position = float4(1.0); diff --git a/reference/shaders-msl-no-opt/asm/tesc/plain-control-point-initializer.asm.tesc b/reference/shaders-msl-no-opt/asm/tesc/plain-control-point-initializer.asm.tesc index 0c6c1dc8..b1c2c232 100644 --- a/reference/shaders-msl-no-opt/asm/tesc/plain-control-point-initializer.asm.tesc +++ b/reference/shaders-msl-no-opt/asm/tesc/plain-control-point-initializer.asm.tesc @@ -44,7 +44,7 @@ struct spvUnsafeArray } }; -constant spvUnsafeArray _25 = spvUnsafeArray({ 0.0, 0.0, 0.0, 0.0 }); +constant spvUnsafeArray _31 = spvUnsafeArray({ 0.0, 0.0, 0.0, 0.0 }); struct main0_out { @@ -55,7 +55,7 @@ struct main0_out kernel void main0(uint gl_InvocationID [[thread_index_in_threadgroup]], uint gl_PrimitiveID [[threadgroup_position_in_grid]], device main0_out* spvOut [[buffer(28)]], constant uint* spvIndirectParams [[buffer(29)]], device MTLQuadTessellationFactorsHalf* spvTessLevel [[buffer(26)]]) { device main0_out* gl_out = &spvOut[gl_PrimitiveID * 4]; - gl_out[gl_InvocationID].v = _25[gl_InvocationID]; + gl_out[gl_InvocationID].v = _31[gl_InvocationID]; gl_out[gl_InvocationID].gl_Position = float4(1.0); gl_out[gl_InvocationID].v = float(gl_InvocationID); } diff --git a/reference/shaders-msl-no-opt/asm/tesc/tess-fixed-input-array-builtin-array.invalid.multi-patch.asm.tesc b/reference/shaders-msl-no-opt/asm/tesc/tess-fixed-input-array-builtin-array.invalid.multi-patch.asm.tesc index c3ace1b9..aa86c0f1 100644 --- a/reference/shaders-msl-no-opt/asm/tesc/tess-fixed-input-array-builtin-array.invalid.multi-patch.asm.tesc +++ b/reference/shaders-msl-no-opt/asm/tesc/tess-fixed-input-array-builtin-array.invalid.multi-patch.asm.tesc @@ -81,7 +81,7 @@ struct main0_out struct main0_in { VertexOutput_1 p; - ushort2 m_171; + ushort2 m_173; float4 gl_Position; }; diff --git a/reference/shaders-msl-no-opt/asm/tesc/tess-level-initializer-quad.asm.tesc b/reference/shaders-msl-no-opt/asm/tesc/tess-level-initializer-quad.asm.tesc index d6d0bc01..53ce5fc6 100644 --- a/reference/shaders-msl-no-opt/asm/tesc/tess-level-initializer-quad.asm.tesc +++ b/reference/shaders-msl-no-opt/asm/tesc/tess-level-initializer-quad.asm.tesc @@ -44,8 +44,8 @@ struct spvUnsafeArray } }; -constant spvUnsafeArray _27 = spvUnsafeArray({ 0.0, 0.0 }); -constant spvUnsafeArray _33 = spvUnsafeArray({ 0.0, 0.0, 0.0, 0.0 }); +constant spvUnsafeArray _31 = spvUnsafeArray({ 0.0, 0.0 }); +constant spvUnsafeArray _39 = spvUnsafeArray({ 0.0, 0.0, 0.0, 0.0 }); struct main0_out { diff --git a/reference/shaders-msl-no-opt/asm/tesc/tess-level-initializer-triangle.asm.tesc b/reference/shaders-msl-no-opt/asm/tesc/tess-level-initializer-triangle.asm.tesc index 979f4329..41622c5a 100644 --- a/reference/shaders-msl-no-opt/asm/tesc/tess-level-initializer-triangle.asm.tesc +++ b/reference/shaders-msl-no-opt/asm/tesc/tess-level-initializer-triangle.asm.tesc @@ -44,8 +44,8 @@ struct spvUnsafeArray } }; -constant spvUnsafeArray _27 = spvUnsafeArray({ 0.0, 0.0 }); -constant spvUnsafeArray _33 = spvUnsafeArray({ 0.0, 0.0, 0.0, 0.0 }); +constant spvUnsafeArray _31 = spvUnsafeArray({ 0.0, 0.0 }); +constant spvUnsafeArray _39 = spvUnsafeArray({ 0.0, 0.0, 0.0, 0.0 }); struct main0_out { diff --git a/reference/shaders-msl-no-opt/asm/vert/block-io-use-in-function.asm.vert b/reference/shaders-msl-no-opt/asm/vert/block-io-use-in-function.asm.vert index 3e91bb9e..e84bb560 100644 --- a/reference/shaders-msl-no-opt/asm/vert/block-io-use-in-function.asm.vert +++ b/reference/shaders-msl-no-opt/asm/vert/block-io-use-in-function.asm.vert @@ -92,9 +92,9 @@ struct LightContext struct main0_out { - float4 m_3_v_color [[user(locn1)]]; - float2 m_3_v_texPos [[user(locn2)]]; - float3 m_3_v_worldPosition [[user(locn3)]]; + float4 m_4_v_color [[user(locn1)]]; + float2 m_4_v_texPos [[user(locn2)]]; + float3 m_4_v_worldPosition [[user(locn3)]]; float4 gl_Position [[position]]; }; @@ -106,23 +106,23 @@ struct main0_in }; static inline __attribute__((always_inline)) -void DrawWorldVS(thread PerVertex& _3, thread float4& a_color, thread float2& a_texcoord, thread float3& a_position, thread float4& gl_Position, constant u_objToWorlds& _12, constant SceneSettings& _17) +void DrawWorldVS(thread PerVertex& _4, thread float4& a_color, thread float2& a_texcoord, thread float3& a_position, thread float4& gl_Position, constant u_objToWorlds& _15, constant SceneSettings& _22) { - _3.v_color = a_color; - _3.v_texPos = a_texcoord; - _3.v_worldPosition = a_position; - float4 worldSpacePosition = _12.u_objToWorld * float4(a_position, 1.0); - gl_Position = _17.u_cameras[0].u_projectFromWorld * worldSpacePosition; + _4.v_color = a_color; + _4.v_texPos = a_texcoord; + _4.v_worldPosition = a_position; + float4 worldSpacePosition = _15.u_objToWorld * float4(a_position, 1.0); + gl_Position = _22.u_cameras[0].u_projectFromWorld * worldSpacePosition; } -vertex main0_out main0(main0_in in [[stage_in]], constant u_objToWorlds& _12 [[buffer(0)]], constant SceneSettings& _17 [[buffer(1)]]) +vertex main0_out main0(main0_in in [[stage_in]], constant u_objToWorlds& _15 [[buffer(0)]], constant SceneSettings& _22 [[buffer(1)]]) { main0_out out = {}; - PerVertex _3 = {}; - DrawWorldVS(_3, in.a_color, in.a_texcoord, in.a_position, out.gl_Position, _12, _17); - out.m_3_v_color = _3.v_color; - out.m_3_v_texPos = _3.v_texPos; - out.m_3_v_worldPosition = _3.v_worldPosition; + PerVertex _4 = {}; + DrawWorldVS(_4, in.a_color, in.a_texcoord, in.a_position, out.gl_Position, _15, _22); + out.m_4_v_color = _4.v_color; + out.m_4_v_texPos = _4.v_texPos; + out.m_4_v_worldPosition = _4.v_worldPosition; return out; } diff --git a/reference/shaders-msl-no-opt/asm/vert/block-struct-initializer.asm.vert b/reference/shaders-msl-no-opt/asm/vert/block-struct-initializer.asm.vert index 6c8f9382..5926a20a 100644 --- a/reference/shaders-msl-no-opt/asm/vert/block-struct-initializer.asm.vert +++ b/reference/shaders-msl-no-opt/asm/vert/block-struct-initializer.asm.vert @@ -17,8 +17,8 @@ struct Foo struct main0_out { - float m_3_a [[user(locn0)]]; - float m_3_b [[user(locn1)]]; + float m_4_a [[user(locn0)]]; + float m_4_b [[user(locn1)]]; float foo_c [[user(locn2)]]; float foo_d [[user(locn3)]]; float4 gl_Position [[position]]; @@ -27,11 +27,11 @@ struct main0_out vertex main0_out main0() { main0_out out = {}; - Vert _3 = Vert{ 0.0, 0.0 }; + Vert _4 = Vert{ 0.0, 0.0 }; Foo foo = Foo{ 0.0, 0.0 }; out.gl_Position = float4(0.0); - out.m_3_a = _3.a; - out.m_3_b = _3.b; + out.m_4_a = _4.a; + out.m_4_b = _4.b; out.foo_c = foo.c; out.foo_d = foo.d; return out; diff --git a/reference/shaders-msl-no-opt/comp/illegal-struct-name.asm.comp b/reference/shaders-msl-no-opt/comp/illegal-struct-name.asm.comp index de1695b0..01751668 100644 --- a/reference/shaders-msl-no-opt/comp/illegal-struct-name.asm.comp +++ b/reference/shaders-msl-no-opt/comp/illegal-struct-name.asm.comp @@ -19,11 +19,11 @@ struct SSBO Foo_1 foo2; }; -kernel void main0(device SSBO& _7 [[buffer(0)]]) +kernel void main0(device SSBO& _9 [[buffer(0)]]) { Foo f; - f._abs = _7.foo._abs; + f._abs = _9.foo._abs; int _abs = 10; - _7.foo2._abs = f._abs; + _9.foo2._abs = f._abs; } diff --git a/reference/shaders-msl-no-opt/frag/combined-sampler-parameter-names.asm.frag b/reference/shaders-msl-no-opt/frag/combined-sampler-parameter-names.asm.frag index 35ba5f79..4e823ab1 100644 --- a/reference/shaders-msl-no-opt/frag/combined-sampler-parameter-names.asm.frag +++ b/reference/shaders-msl-no-opt/frag/combined-sampler-parameter-names.asm.frag @@ -7,24 +7,24 @@ using namespace metal; struct main0_out { - float4 m_4 [[color(0)]]; + float4 m_6 [[color(0)]]; }; struct main0_in { - float2 m_3 [[user(locn0)]]; + float2 m_4 [[user(locn0)]]; }; static inline __attribute__((always_inline)) -float4 _19(thread float2& _3, texture2d _5, sampler _5Smplr) +float4 _22(thread float2& _4, texture2d _7, sampler _7Smplr) { - return _5.sample(_5Smplr, _3); + return _7.sample(_7Smplr, _4); } -fragment main0_out main0(main0_in in [[stage_in]], texture2d _5 [[texture(0)]], sampler _5Smplr [[sampler(0)]]) +fragment main0_out main0(main0_in in [[stage_in]], texture2d _7 [[texture(0)]], sampler _7Smplr [[sampler(0)]]) { main0_out out = {}; - out.m_4 = _19(in.m_3, _5, _5Smplr); + out.m_6 = _22(in.m_4, _7, _7Smplr); return out; } diff --git a/reference/shaders-msl/asm/comp/atomic-decrement.asm.comp b/reference/shaders-msl/asm/comp/atomic-decrement.asm.comp index 272337fc..10ba1763 100644 --- a/reference/shaders-msl/asm/comp/atomic-decrement.asm.comp +++ b/reference/shaders-msl/asm/comp/atomic-decrement.asm.comp @@ -21,9 +21,9 @@ struct u0_counters kernel void main0(device u0_counters& u0_counter [[buffer(0)]], texture2d u0 [[texture(0)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]]) { - uint _29 = atomic_fetch_sub_explicit((device atomic_uint*)&u0_counter.c, 1, memory_order_relaxed); + uint _24 = atomic_fetch_sub_explicit((device atomic_uint*)&u0_counter.c, 1, memory_order_relaxed); float4 r0; - r0.x = as_type(_29); + r0.x = as_type(_24); u0.write(uint4(uint(int(gl_GlobalInvocationID.x))), spvTexelBufferCoord(((uint(as_type(r0.x)) * 1u) + (uint(0) >> 2u)))); } diff --git a/reference/shaders-msl/asm/comp/atomic-increment.asm.comp b/reference/shaders-msl/asm/comp/atomic-increment.asm.comp index 4518248b..76208ac7 100644 --- a/reference/shaders-msl/asm/comp/atomic-increment.asm.comp +++ b/reference/shaders-msl/asm/comp/atomic-increment.asm.comp @@ -21,9 +21,9 @@ struct u0_counters kernel void main0(device u0_counters& u0_counter [[buffer(0)]], texture2d u0 [[texture(0)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]]) { - uint _29 = atomic_fetch_add_explicit((device atomic_uint*)&u0_counter.c, 1, memory_order_relaxed); + uint _24 = atomic_fetch_add_explicit((device atomic_uint*)&u0_counter.c, 1, memory_order_relaxed); float4 r0; - r0.x = as_type(_29); + r0.x = as_type(_24); u0.write(uint4(uint(int(gl_GlobalInvocationID.x))), spvTexelBufferCoord(((uint(as_type(r0.x)) * 1u) + (uint(0) >> 2u)))); } diff --git a/reference/shaders-msl/asm/comp/buffer-write-relative-addr.asm.comp b/reference/shaders-msl/asm/comp/buffer-write-relative-addr.asm.comp index ac78a651..94f83822 100644 --- a/reference/shaders-msl/asm/comp/buffer-write-relative-addr.asm.comp +++ b/reference/shaders-msl/asm/comp/buffer-write-relative-addr.asm.comp @@ -22,11 +22,11 @@ kernel void main0(constant cb5_struct& cb0_5 [[buffer(0)]], texture2d(int(gl_LocalInvocationID.x) << 4); r0.y = as_type(int(gl_LocalInvocationID.x)); - uint _44 = as_type(r0.x) >> 2u; - uint4 _51 = as_type(cb0_5._m0[uint(as_type(r0.y)) + 1u]); - u0.write(_51.xxxx, spvTexelBufferCoord(_44)); - u0.write(_51.yyyy, spvTexelBufferCoord((_44 + 1u))); - u0.write(_51.zzzz, spvTexelBufferCoord((_44 + 2u))); - u0.write(_51.wwww, spvTexelBufferCoord((_44 + 3u))); + uint _41 = as_type(r0.x) >> 2u; + uint4 _50 = as_type(cb0_5._m0[uint(as_type(r0.y)) + 1u]); + u0.write(_50.xxxx, spvTexelBufferCoord(_41)); + u0.write(_50.yyyy, spvTexelBufferCoord((_41 + 1u))); + u0.write(_50.zzzz, spvTexelBufferCoord((_41 + 2u))); + u0.write(_50.wwww, spvTexelBufferCoord((_41 + 3u))); } diff --git a/reference/shaders-msl/asm/comp/buffer-write.asm.comp b/reference/shaders-msl/asm/comp/buffer-write.asm.comp index 89e8d83e..f464abf5 100644 --- a/reference/shaders-msl/asm/comp/buffer-write.asm.comp +++ b/reference/shaders-msl/asm/comp/buffer-write.asm.comp @@ -17,8 +17,8 @@ struct cb float value; }; -kernel void main0(constant cb& _6 [[buffer(0)]], texture2d _buffer [[texture(0)]], uint3 gl_WorkGroupID [[threadgroup_position_in_grid]], uint gl_LocalInvocationIndex [[thread_index_in_threadgroup]]) +kernel void main0(constant cb& _8 [[buffer(0)]], texture2d _buffer [[texture(0)]], uint3 gl_WorkGroupID [[threadgroup_position_in_grid]], uint gl_LocalInvocationIndex [[thread_index_in_threadgroup]]) { - _buffer.write(float4(_6.value), spvTexelBufferCoord(((32u * gl_WorkGroupID.x) + gl_LocalInvocationIndex))); + _buffer.write(float4(_8.value), spvTexelBufferCoord(((32u * gl_WorkGroupID.x) + gl_LocalInvocationIndex))); } diff --git a/reference/shaders-msl/asm/comp/quantize.asm.comp b/reference/shaders-msl/asm/comp/quantize.asm.comp index 672c2b20..461bf7b8 100644 --- a/reference/shaders-msl/asm/comp/quantize.asm.comp +++ b/reference/shaders-msl/asm/comp/quantize.asm.comp @@ -24,11 +24,11 @@ struct SSBO0 float4 vec4_val; }; -kernel void main0(device SSBO0& _4 [[buffer(0)]]) +kernel void main0(device SSBO0& _12 [[buffer(0)]]) { - _4.scalar = spvQuantizeToF16(_4.scalar); - _4.vec2_val = spvQuantizeToF16(_4.vec2_val); - _4.vec3_val = spvQuantizeToF16(_4.vec3_val); - _4.vec4_val = spvQuantizeToF16(_4.vec4_val); + _12.scalar = spvQuantizeToF16(_12.scalar); + _12.vec2_val = spvQuantizeToF16(_12.vec2_val); + _12.vec3_val = spvQuantizeToF16(_12.vec3_val); + _12.vec4_val = spvQuantizeToF16(_12.vec4_val); } diff --git a/reference/shaders-msl/asm/comp/relaxed-block-layout.asm.comp b/reference/shaders-msl/asm/comp/relaxed-block-layout.asm.comp index 6728a4e2..1464bd8e 100644 --- a/reference/shaders-msl/asm/comp/relaxed-block-layout.asm.comp +++ b/reference/shaders-msl/asm/comp/relaxed-block-layout.asm.comp @@ -12,11 +12,11 @@ struct foo packed_half2 wibble; }; -kernel void main0(device foo& _8 [[buffer(0)]], uint3 gl_LocalInvocationID [[thread_position_in_threadgroup]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]], uint3 gl_WorkGroupID [[threadgroup_position_in_grid]], uint3 gl_NumWorkGroups [[threadgroups_per_grid]]) +kernel void main0(device foo& _10 [[buffer(0)]], uint3 gl_LocalInvocationID [[thread_position_in_threadgroup]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]], uint3 gl_WorkGroupID [[threadgroup_position_in_grid]], uint3 gl_NumWorkGroups [[threadgroups_per_grid]]) { - _8.bar = gl_LocalInvocationID.x; - _8.baz = float3(gl_GlobalInvocationID); - _8.blah = uchar4(uint4(uint4(uchar4(_8.blah)).xyz + gl_WorkGroupID, 0u)); - _8.wibble = half2(float2(half2(_8.wibble)) * float2(gl_NumWorkGroups.xy)); + _10.bar = gl_LocalInvocationID.x; + _10.baz = float3(gl_GlobalInvocationID); + _10.blah = uchar4(uint4(uint4(uchar4(_10.blah)).xyz + gl_WorkGroupID, 0u)); + _10.wibble = half2(float2(half2(_10.wibble)) * float2(gl_NumWorkGroups.xy)); } diff --git a/reference/shaders-msl/asm/comp/specialization-constant-workgroup.asm.comp b/reference/shaders-msl/asm/comp/specialization-constant-workgroup.asm.comp index 1e2880f4..eb13541c 100644 --- a/reference/shaders-msl/asm/comp/specialization-constant-workgroup.asm.comp +++ b/reference/shaders-msl/asm/comp/specialization-constant-workgroup.asm.comp @@ -8,14 +8,14 @@ struct SSBO float a; }; -constant uint _5_tmp [[function_constant(10)]]; -constant uint _5 = is_function_constant_defined(_5_tmp) ? _5_tmp : 9u; -constant uint _6_tmp [[function_constant(12)]]; -constant uint _6 = is_function_constant_defined(_6_tmp) ? _6_tmp : 4u; -constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(_5, 20u, _6); +constant uint _19_tmp [[function_constant(10)]]; +constant uint _19 = is_function_constant_defined(_19_tmp) ? _19_tmp : 9u; +constant uint _21_tmp [[function_constant(12)]]; +constant uint _21 = is_function_constant_defined(_21_tmp) ? _21_tmp : 4u; +constant uint3 gl_WorkGroupSize [[maybe_unused]] = uint3(_19, 20u, _21); -kernel void main0(device SSBO& _4 [[buffer(0)]]) +kernel void main0(device SSBO& _6 [[buffer(0)]]) { - _4.a += 1.0; + _6.a += 1.0; } diff --git a/reference/shaders-msl/asm/comp/variable-pointers-2.asm.comp b/reference/shaders-msl/asm/comp/variable-pointers-2.asm.comp index dafd6d5d..4a042628 100644 --- a/reference/shaders-msl/asm/comp/variable-pointers-2.asm.comp +++ b/reference/shaders-msl/asm/comp/variable-pointers-2.asm.comp @@ -31,27 +31,27 @@ thread uint3* select_input(thread uint3& gl_GlobalInvocationID, thread uint3& gl kernel void main0(device foo& buf [[buffer(0)]], constant bar& cb [[buffer(1)]], uint3 gl_GlobalInvocationID [[thread_position_in_grid]], uint3 gl_LocalInvocationID [[thread_position_in_threadgroup]]) { - device foo* _46 = select_buffer(buf, cb); - device foo* _45 = _46; - thread uint3* _47 = select_input(gl_GlobalInvocationID, gl_LocalInvocationID, cb); - device foo* _48 = _45; + device foo* _44 = select_buffer(buf, cb); + device foo* _65 = _44; + thread uint3* _45 = select_input(gl_GlobalInvocationID, gl_LocalInvocationID, cb); + device foo* _66 = _65; + device int* _49; device int* _52; - device int* _55; - _52 = &_48->a[0u]; - _55 = &buf.a[0u]; - int _57; - int _58; + _49 = &_66->a[0u]; + _52 = &buf.a[0u]; + int _54; + int _55; for (;;) { - _57 = *_52; - _58 = *_55; - if (_57 != _58) + _54 = *_49; + _55 = *_52; + if (_54 != _55) { - int _66 = (_57 + _58) + int((*_47).x); - *_52 = _66; - *_55 = _66; + int _63 = (_54 + _55) + int((*_45).x); + *_49 = _63; + *_52 = _63; + _49 = &_49[1u]; _52 = &_52[1u]; - _55 = &_55[1u]; continue; } else diff --git a/reference/shaders-msl/asm/frag/default-member-names.asm.frag b/reference/shaders-msl/asm/frag/default-member-names.asm.frag index 3628c4ea..2f80be76 100644 --- a/reference/shaders-msl/asm/frag/default-member-names.asm.frag +++ b/reference/shaders-msl/asm/frag/default-member-names.asm.frag @@ -3,12 +3,12 @@ using namespace metal; -struct _9 +struct _10 { float _m0; }; -struct _10 +struct _11 { float _m0; float _m1; @@ -22,7 +22,7 @@ struct _10 float _m9; float _m10; float _m11; - _9 _m12; + _10 _m12; }; struct main0_out @@ -33,8 +33,8 @@ struct main0_out fragment main0_out main0() { main0_out out = {}; - _10 _21; - out.m_3 = float4(_21._m0, _21._m1, _21._m2, _21._m3); + _11 _23; + out.m_3 = float4(_23._m0, _23._m1, _23._m2, _23._m3); return out; } diff --git a/reference/shaders-msl/asm/frag/depth-image-color-format-fetch.asm.frag b/reference/shaders-msl/asm/frag/depth-image-color-format-fetch.asm.frag index cf06cddc..ba6f0aa5 100644 --- a/reference/shaders-msl/asm/frag/depth-image-color-format-fetch.asm.frag +++ b/reference/shaders-msl/asm/frag/depth-image-color-format-fetch.asm.frag @@ -21,27 +21,27 @@ struct main0_in }; static inline __attribute__((always_inline)) -void _108(int _109, texture2d _8, device _7& _10) +void _112(int _113, texture2d _8, device _7& _10) { - int2 _113 = int2(_109 - 8 * (_109 / 8), _109 / 8); - _10._m0[_109] = _8.read(uint2(_113), 0); + int2 _117 = int2(_113 - 8 * (_113 / 8), _113 / 8); + _10._m0[_113] = _8.read(uint2(_117), 0); } static inline __attribute__((always_inline)) -float4 _98(float4 _119, texture2d _8, device _7& _10) +float4 _102(float4 _122, texture2d _8, device _7& _10) { - for (int _121 = 0; _121 < 64; _121++) + for (int _124 = 0; _124 < 64; _124++) { - _108(_121, _8, _10); + _112(_124, _8, _10); } - return _119; + return _122; } fragment main0_out main0(main0_in in [[stage_in]], device _7& _10 [[buffer(0)]], texture2d _8 [[texture(0)]]) { main0_out out = {}; - float4 _97 = _98(in.m_2, _8, _10); - out.m_3 = _97; + float4 _101 = _102(in.m_2, _8, _10); + out.m_3 = _101; return out; } diff --git a/reference/shaders-msl/asm/frag/depth-image-color-format-sampled.asm.frag b/reference/shaders-msl/asm/frag/depth-image-color-format-sampled.asm.frag index ee781a96..6cf446fa 100644 --- a/reference/shaders-msl/asm/frag/depth-image-color-format-sampled.asm.frag +++ b/reference/shaders-msl/asm/frag/depth-image-color-format-sampled.asm.frag @@ -21,26 +21,26 @@ struct main0_in }; static inline __attribute__((always_inline)) -void _108(int _109, texture2d _8, sampler _9, device _7& _10) +void _112(int _113, texture2d _8, sampler _9, device _7& _10) { - _10._m0[_109] = _8.sample(_9, (float2(int2(_109 - 8 * (_109 / 8), _109 / 8)) / float2(8.0)), level(0.0)); + _10._m0[_113] = _8.sample(_9, (float2(int2(_113 - 8 * (_113 / 8), _113 / 8)) / float2(8.0)), level(0.0)); } static inline __attribute__((always_inline)) -float4 _98(float4 _121, texture2d _8, sampler _9, device _7& _10) +float4 _102(float4 _124, texture2d _8, sampler _9, device _7& _10) { - for (int _123 = 0; _123 < 64; _123++) + for (int _126 = 0; _126 < 64; _126++) { - _108(_123, _8, _9, _10); + _112(_126, _8, _9, _10); } - return _121; + return _124; } fragment main0_out main0(main0_in in [[stage_in]], device _7& _10 [[buffer(0)]], texture2d _8 [[texture(0)]], sampler _9 [[sampler(0)]]) { main0_out out = {}; - float4 _97 = _98(in.m_2, _8, _9, _10); - out.m_3 = _97; + float4 _101 = _102(in.m_2, _8, _9, _10); + out.m_3 = _101; return out; } diff --git a/reference/shaders-msl/asm/frag/descriptor-array-unnamed.asm.frag b/reference/shaders-msl/asm/frag/descriptor-array-unnamed.asm.frag index 1870f671..216e83bc 100644 --- a/reference/shaders-msl/asm/frag/descriptor-array-unnamed.asm.frag +++ b/reference/shaders-msl/asm/frag/descriptor-array-unnamed.asm.frag @@ -3,46 +3,46 @@ using namespace metal; -struct _4 +struct _6 { float4 _m0; }; -struct _6 +struct _8 { int _m0; }; -struct _7 +struct _9 { float4 _m0; }; struct main0_out { - float4 m_3 [[color(0)]]; + float4 m_4 [[color(0)]]; }; -fragment main0_out main0(const device _4* _5_0 [[buffer(0)]], const device _4* _5_1 [[buffer(1)]], const device _4* _5_2 [[buffer(2)]], const device _4* _5_3 [[buffer(3)]], constant _6& _20 [[buffer(4)]], constant _7* _8_0 [[buffer(5)]], constant _7* _8_1 [[buffer(6)]], constant _7* _8_2 [[buffer(7)]], constant _7* _8_3 [[buffer(8)]]) +fragment main0_out main0(const device _6* _7_0 [[buffer(0)]], const device _6* _7_1 [[buffer(1)]], const device _6* _7_2 [[buffer(2)]], const device _6* _7_3 [[buffer(3)]], constant _8& _21 [[buffer(4)]], constant _9* _10_0 [[buffer(5)]], constant _9* _10_1 [[buffer(6)]], constant _9* _10_2 [[buffer(7)]], constant _9* _10_3 [[buffer(8)]]) { - const device _4* _5[] = + const device _6* _7[] = { - _5_0, - _5_1, - _5_2, - _5_3, + _7_0, + _7_1, + _7_2, + _7_3, }; - constant _7* _8[] = + constant _9* _10[] = { - _8_0, - _8_1, - _8_2, - _8_3, + _10_0, + _10_1, + _10_2, + _10_3, }; main0_out out = {}; - out.m_3 = _5[_20._m0]->_m0 + (_8[_20._m0]->_m0 * float4(0.20000000298023223876953125)); + out.m_4 = _7[_21._m0]->_m0 + (_10[_21._m0]->_m0 * float4(0.20000000298023223876953125)); return out; } diff --git a/reference/shaders-msl/asm/frag/extract-packed-from-composite.asm.frag b/reference/shaders-msl/asm/frag/extract-packed-from-composite.asm.frag index d946104d..e4d32b81 100644 --- a/reference/shaders-msl/asm/frag/extract-packed-from-composite.asm.frag +++ b/reference/shaders-msl/asm/frag/extract-packed-from-composite.asm.frag @@ -29,21 +29,21 @@ struct main0_out }; static inline __attribute__((always_inline)) -float4 _main(thread const float4& pos, constant buf& _11) +float4 _main(thread const float4& pos, constant buf& _15) { - int _46 = int(pos.x) % 16; + int _32 = int(pos.x) % 16; Foo foo; - foo.a = float3(_11.results[_46].a); - foo.b = _11.results[_46].b; - return float4(dot(foo.a, _11.bar.xyz), foo.b, 0.0, 0.0); + foo.a = float3(_15.results[_32].a); + foo.b = _15.results[_32].b; + return float4(dot(foo.a, _15.bar.xyz), foo.b, 0.0, 0.0); } -fragment main0_out main0(constant buf& _11 [[buffer(0)]], float4 gl_FragCoord [[position]]) +fragment main0_out main0(constant buf& _15 [[buffer(0)]], float4 gl_FragCoord [[position]]) { main0_out out = {}; float4 pos = gl_FragCoord; float4 param = pos; - out._entryPointOutput = _main(param, _11); + out._entryPointOutput = _main(param, _15); return out; } diff --git a/reference/shaders-msl/asm/frag/implicit-read-dep-phi.asm.frag b/reference/shaders-msl/asm/frag/implicit-read-dep-phi.asm.frag index 830df0c7..ffa5af2a 100644 --- a/reference/shaders-msl/asm/frag/implicit-read-dep-phi.asm.frag +++ b/reference/shaders-msl/asm/frag/implicit-read-dep-phi.asm.frag @@ -18,20 +18,20 @@ fragment main0_out main0(main0_in in [[stage_in]], texture2d uImage [[tex main0_out out = {}; int i = 0; float phi; - float4 _36; + float4 _45; phi = 1.0; - _36 = float4(1.0, 2.0, 1.0, 2.0); + _45 = float4(1.0, 2.0, 1.0, 2.0); for (;;) { - out.FragColor = _36; + out.FragColor = _45; if (i < 4) { if (in.v0[i] > 0.0) { - float2 _48 = float2(phi); + float2 _43 = float2(phi); i++; phi += 2.0; - _36 = uImage.sample(uImageSmplr, _48, level(0.0)); + _45 = uImage.sample(uImageSmplr, _43, level(0.0)); continue; } else diff --git a/reference/shaders-msl/asm/frag/locations-components.asm.frag b/reference/shaders-msl/asm/frag/locations-components.asm.frag index 2cebdec4..f70015b8 100644 --- a/reference/shaders-msl/asm/frag/locations-components.asm.frag +++ b/reference/shaders-msl/asm/frag/locations-components.asm.frag @@ -10,23 +10,23 @@ struct main0_out struct main0_in { - float2 m_2 [[user(locn1)]]; - float m_3 [[user(locn1_2)]]; - float m_4 [[user(locn2), flat]]; - uint m_5 [[user(locn2_1)]]; - uint m_6 [[user(locn2_2)]]; + float2 m_8 [[user(locn1)]]; + float m_16 [[user(locn1_2)]]; + float m_22 [[user(locn2), flat]]; + uint m_28 [[user(locn2_1)]]; + uint m_33 [[user(locn2_2)]]; }; fragment main0_out main0(main0_in in [[stage_in]]) { main0_out out = {}; float4 v1; - v1 = float4(in.m_2.x, in.m_2.y, v1.z, v1.w); - v1.z = in.m_3; + v1 = float4(in.m_8.x, in.m_8.y, v1.z, v1.w); + v1.z = in.m_16; float4 v2; - v2.x = in.m_4; - v2.y = as_type(in.m_5); - v2.z = as_type(in.m_6); + v2.x = in.m_22; + v2.y = as_type(in.m_28); + v2.z = as_type(in.m_33); float4 r0; r0.x = as_type(as_type(v2.y) + as_type(v2.z)); out.o0.y = float(as_type(r0.x)); diff --git a/reference/shaders-msl/asm/frag/lut-promotion-initializer.asm.frag b/reference/shaders-msl/asm/frag/lut-promotion-initializer.asm.frag index 41193536..002ffae4 100644 --- a/reference/shaders-msl/asm/frag/lut-promotion-initializer.asm.frag +++ b/reference/shaders-msl/asm/frag/lut-promotion-initializer.asm.frag @@ -44,9 +44,9 @@ struct spvUnsafeArray } }; -constant spvUnsafeArray _46 = spvUnsafeArray({ 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0 }); -constant spvUnsafeArray _76 = spvUnsafeArray({ float4(0.0), float4(1.0), float4(8.0), float4(5.0) }); -constant spvUnsafeArray _90 = spvUnsafeArray({ float4(20.0), float4(30.0), float4(50.0), float4(60.0) }); +constant spvUnsafeArray _16 = spvUnsafeArray({ 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0 }); +constant spvUnsafeArray _60 = spvUnsafeArray({ float4(0.0), float4(1.0), float4(8.0), float4(5.0) }); +constant spvUnsafeArray _104 = spvUnsafeArray({ float4(20.0), float4(30.0), float4(50.0), float4(60.0) }); struct main0_out { @@ -63,29 +63,29 @@ fragment main0_out main0(main0_in in [[stage_in]]) spvUnsafeArray foobar = spvUnsafeArray({ float4(0.0), float4(1.0), float4(8.0), float4(5.0) }); spvUnsafeArray baz = spvUnsafeArray({ float4(0.0), float4(1.0), float4(8.0), float4(5.0) }); main0_out out = {}; - out.FragColor = _46[in.index]; + out.FragColor = _16[in.index]; if (in.index < 10) { - out.FragColor += _46[in.index ^ 1]; + out.FragColor += _16[in.index ^ 1]; } else { - out.FragColor += _46[in.index & 1]; + out.FragColor += _16[in.index & 1]; } if (in.index > 30) { - out.FragColor += _76[in.index & 3].y; + out.FragColor += _60[in.index & 3].y; } else { - out.FragColor += _76[in.index & 1].x; + out.FragColor += _60[in.index & 1].x; } if (in.index > 30) { foobar[1].z = 20.0; } out.FragColor += foobar[in.index & 3].z; - baz = _90; + baz = _104; out.FragColor += baz[in.index & 3].z; return out; } diff --git a/reference/shaders-msl/asm/frag/op-constant-null.asm.frag b/reference/shaders-msl/asm/frag/op-constant-null.asm.frag index f8104f81..e0037589 100644 --- a/reference/shaders-msl/asm/frag/op-constant-null.asm.frag +++ b/reference/shaders-msl/asm/frag/op-constant-null.asm.frag @@ -50,7 +50,7 @@ struct D float b; }; -constant spvUnsafeArray _14 = spvUnsafeArray({ float4(0.0), float4(0.0), float4(0.0), float4(0.0) }); +constant spvUnsafeArray _41 = spvUnsafeArray({ float4(0.0), float4(0.0), float4(0.0), float4(0.0) }); struct main0_out { diff --git a/reference/shaders-msl/asm/frag/phi-loop-variable.asm.frag b/reference/shaders-msl/asm/frag/phi-loop-variable.asm.frag index 036774d6..18c275fb 100644 --- a/reference/shaders-msl/asm/frag/phi-loop-variable.asm.frag +++ b/reference/shaders-msl/asm/frag/phi-loop-variable.asm.frag @@ -5,7 +5,7 @@ using namespace metal; fragment void main0() { - for (int _22 = 35; _22 >= 0; _22--) + for (int _58 = 35; _58 >= 0; _58--) { } } diff --git a/reference/shaders-msl/asm/frag/undef-variable-store.asm.frag b/reference/shaders-msl/asm/frag/undef-variable-store.asm.frag index 2cefeb66..5e240883 100644 --- a/reference/shaders-msl/asm/frag/undef-variable-store.asm.frag +++ b/reference/shaders-msl/asm/frag/undef-variable-store.asm.frag @@ -3,8 +3,8 @@ using namespace metal; -constant float4 _38 = {}; -constant float4 _47 = {}; +constant float4 _48 = {}; +constant float4 _31 = {}; struct main0_out { @@ -14,24 +14,24 @@ struct main0_out fragment main0_out main0() { main0_out out = {}; - float4 _27; + float4 _37; do { - float2 _26 = float2(0.0); - if (_26.x != 0.0) + float2 _35 = float2(0.0); + if (_35.x != 0.0) { - _27 = float4(1.0, 0.0, 0.0, 1.0); + _37 = float4(1.0, 0.0, 0.0, 1.0); break; } else { - _27 = float4(1.0, 1.0, 0.0, 1.0); + _37 = float4(1.0, 1.0, 0.0, 1.0); break; } - _27 = _38; + _37 = _48; break; } while (false); - out._entryPointOutput = _27; + out._entryPointOutput = _37; return out; } diff --git a/reference/shaders-msl/asm/frag/unreachable.asm.frag b/reference/shaders-msl/asm/frag/unreachable.asm.frag index 7ae4aa5e..93b92a01 100644 --- a/reference/shaders-msl/asm/frag/unreachable.asm.frag +++ b/reference/shaders-msl/asm/frag/unreachable.asm.frag @@ -3,7 +3,7 @@ using namespace metal; -constant float4 _21 = {}; +constant float4 _44 = {}; struct main0_out { @@ -18,23 +18,23 @@ struct main0_in fragment main0_out main0(main0_in in [[stage_in]]) { main0_out out = {}; - float4 _24; - _24 = _21; - float4 _33; + float4 _45; + _45 = _44; + float4 _46; for (;;) { if (in.counter == 10) { - _33 = float4(10.0); + _46 = float4(10.0); break; } else { - _33 = float4(30.0); + _46 = float4(30.0); break; } } - out.FragColor = _33; + out.FragColor = _46; return out; } diff --git a/reference/shaders-msl/asm/frag/vector-shuffle-oom.asm.frag b/reference/shaders-msl/asm/frag/vector-shuffle-oom.asm.frag index 9e73be47..b4f40660 100644 --- a/reference/shaders-msl/asm/frag/vector-shuffle-oom.asm.frag +++ b/reference/shaders-msl/asm/frag/vector-shuffle-oom.asm.frag @@ -3,19 +3,19 @@ using namespace metal; -struct _28 +struct _15 { float4 _m0; }; -struct _6 +struct _3 { float4 _m0; float _m1; float4 _m2; }; -struct _10 +struct _4 { float3 _m0; packed_float3 _m1; @@ -44,7 +44,7 @@ struct _10 float4 _m24; }; -struct _18 +struct _7 { float4x4 _m0; float4x4 _m1; @@ -88,7 +88,7 @@ struct _18 float4 _m38[2]; }; -struct _20 +struct _8 { float4 _m0; float4 _m1; @@ -113,224 +113,224 @@ struct _20 float2 _m20; }; -struct _21 +struct _9 { float4 _m0; }; -constant _28 _74 = {}; +constant _15 _10264 = {}; struct main0_out { - float4 m_5 [[color(0)]]; + float4 m_4317 [[color(0)]]; }; -fragment main0_out main0(constant _6& _7 [[buffer(0)]], constant _10& _11 [[buffer(1)]], constant _18& _19 [[buffer(2)]], texture2d _8 [[texture(0)]], texture2d _12 [[texture(1)]], texture2d _14 [[texture(2)]], sampler _9 [[sampler(0)]], sampler _13 [[sampler(1)]], sampler _15 [[sampler(2)]], float4 gl_FragCoord [[position]]) +fragment main0_out main0(constant _3& _22044 [[buffer(0)]], constant _4& _12348 [[buffer(1)]], constant _7& _15259 [[buffer(2)]], texture2d _5785 [[texture(0)]], texture2d _3312 [[texture(1)]], texture2d _4862 [[texture(2)]], sampler _5688 [[sampler(0)]], sampler _4646 [[sampler(1)]], sampler _3594 [[sampler(2)]], float4 gl_FragCoord [[position]]) { main0_out out = {}; - _28 _77; - _77._m0 = float4(0.0); - float2 _82 = gl_FragCoord.xy * _19._m23.xy; - float4 _88 = _7._m2 * _7._m0.xyxy; - float2 _97 = fast::clamp(_82 + (float3(0.0, -2.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw); - float3 _109 = float3(_11._m5) * fast::clamp(_8.sample(_9, _97, level(0.0)).w * _7._m1, 0.0, 1.0); - float4 _113 = _12.sample(_13, _97, level(0.0)); - float3 _129; - if (_113.y > 0.0) + _15 _13863; + _13863._m0 = float4(0.0); + float2 _19927 = gl_FragCoord.xy * _15259._m23.xy; + float4 _17581 = _22044._m2 * _22044._m0.xyxy; + float2 _13149 = fast::clamp(_19927 + (float3(0.0, -2.0, 0.5).xy * _22044._m0.xy), _17581.xy, _17581.zw); + float3 _12103 = float3(_12348._m5) * fast::clamp(_5785.sample(_5688, _13149, level(0.0)).w * _22044._m1, 0.0, 1.0); + float4 _17670 = _3312.sample(_4646, _13149, level(0.0)); + float3 _7719; + if (_17670.y > 0.0) { - _129 = _109 + (_14.sample(_15, _97, level(0.0)).xyz * fast::clamp(_113.y * _113.z, 0.0, 1.0)); + _7719 = _12103 + (_4862.sample(_3594, _13149, level(0.0)).xyz * fast::clamp(_17670.y * _17670.z, 0.0, 1.0)); } else { - _129 = _109; + _7719 = _12103; } - float3 _133 = float4(0.0).xyz + (_129 * 0.5); - float4 _134 = float4(_133.x, _133.y, _133.z, float4(0.0).w); - _77._m0 = _134; - float2 _144 = fast::clamp(_82 + (float3(-1.0, -1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw); - float3 _156 = float3(_11._m5) * fast::clamp(_8.sample(_9, _144, level(0.0)).w * _7._m1, 0.0, 1.0); - float4 _160 = _12.sample(_13, _144, level(0.0)); - float3 _176; - if (_160.y > 0.0) + float3 _22177 = float4(0.0).xyz + (_7719 * 0.5); + float4 _15527 = float4(_22177.x, _22177.y, _22177.z, float4(0.0).w); + _13863._m0 = _15527; + float2 _13150 = fast::clamp(_19927 + (float3(-1.0, -1.0, 0.5).xy * _22044._m0.xy), _17581.xy, _17581.zw); + float3 _12104 = float3(_12348._m5) * fast::clamp(_5785.sample(_5688, _13150, level(0.0)).w * _22044._m1, 0.0, 1.0); + float4 _17671 = _3312.sample(_4646, _13150, level(0.0)); + float3 _7720; + if (_17671.y > 0.0) { - _176 = _156 + (_14.sample(_15, _144, level(0.0)).xyz * fast::clamp(_160.y * _160.z, 0.0, 1.0)); + _7720 = _12104 + (_4862.sample(_3594, _13150, level(0.0)).xyz * fast::clamp(_17671.y * _17671.z, 0.0, 1.0)); } else { - _176 = _156; + _7720 = _12104; } - float3 _180 = _134.xyz + (_176 * 0.5); - float4 _181 = float4(_180.x, _180.y, _180.z, _134.w); - _77._m0 = _181; - float2 _191 = fast::clamp(_82 + (float3(0.0, -1.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw); - float3 _203 = float3(_11._m5) * fast::clamp(_8.sample(_9, _191, level(0.0)).w * _7._m1, 0.0, 1.0); - float4 _207 = _12.sample(_13, _191, level(0.0)); - float3 _223; - if (_207.y > 0.0) + float3 _22178 = _15527.xyz + (_7720 * 0.5); + float4 _15528 = float4(_22178.x, _22178.y, _22178.z, _15527.w); + _13863._m0 = _15528; + float2 _13151 = fast::clamp(_19927 + (float3(0.0, -1.0, 0.75).xy * _22044._m0.xy), _17581.xy, _17581.zw); + float3 _12105 = float3(_12348._m5) * fast::clamp(_5785.sample(_5688, _13151, level(0.0)).w * _22044._m1, 0.0, 1.0); + float4 _17672 = _3312.sample(_4646, _13151, level(0.0)); + float3 _7721; + if (_17672.y > 0.0) { - _223 = _203 + (_14.sample(_15, _191, level(0.0)).xyz * fast::clamp(_207.y * _207.z, 0.0, 1.0)); + _7721 = _12105 + (_4862.sample(_3594, _13151, level(0.0)).xyz * fast::clamp(_17672.y * _17672.z, 0.0, 1.0)); } else { - _223 = _203; + _7721 = _12105; } - float3 _227 = _181.xyz + (_223 * 0.75); - float4 _228 = float4(_227.x, _227.y, _227.z, _181.w); - _77._m0 = _228; - float2 _238 = fast::clamp(_82 + (float3(1.0, -1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw); - float3 _250 = float3(_11._m5) * fast::clamp(_8.sample(_9, _238, level(0.0)).w * _7._m1, 0.0, 1.0); - float4 _254 = _12.sample(_13, _238, level(0.0)); - float3 _270; - if (_254.y > 0.0) + float3 _22179 = _15528.xyz + (_7721 * 0.75); + float4 _15529 = float4(_22179.x, _22179.y, _22179.z, _15528.w); + _13863._m0 = _15529; + float2 _13152 = fast::clamp(_19927 + (float3(1.0, -1.0, 0.5).xy * _22044._m0.xy), _17581.xy, _17581.zw); + float3 _12106 = float3(_12348._m5) * fast::clamp(_5785.sample(_5688, _13152, level(0.0)).w * _22044._m1, 0.0, 1.0); + float4 _17673 = _3312.sample(_4646, _13152, level(0.0)); + float3 _7722; + if (_17673.y > 0.0) { - _270 = _250 + (_14.sample(_15, _238, level(0.0)).xyz * fast::clamp(_254.y * _254.z, 0.0, 1.0)); + _7722 = _12106 + (_4862.sample(_3594, _13152, level(0.0)).xyz * fast::clamp(_17673.y * _17673.z, 0.0, 1.0)); } else { - _270 = _250; + _7722 = _12106; } - float3 _274 = _228.xyz + (_270 * 0.5); - float4 _275 = float4(_274.x, _274.y, _274.z, _228.w); - _77._m0 = _275; - float2 _285 = fast::clamp(_82 + (float3(-2.0, 0.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw); - float3 _297 = float3(_11._m5) * fast::clamp(_8.sample(_9, _285, level(0.0)).w * _7._m1, 0.0, 1.0); - float4 _301 = _12.sample(_13, _285, level(0.0)); - float3 _317; - if (_301.y > 0.0) + float3 _22180 = _15529.xyz + (_7722 * 0.5); + float4 _15530 = float4(_22180.x, _22180.y, _22180.z, _15529.w); + _13863._m0 = _15530; + float2 _13153 = fast::clamp(_19927 + (float3(-2.0, 0.0, 0.5).xy * _22044._m0.xy), _17581.xy, _17581.zw); + float3 _12107 = float3(_12348._m5) * fast::clamp(_5785.sample(_5688, _13153, level(0.0)).w * _22044._m1, 0.0, 1.0); + float4 _17674 = _3312.sample(_4646, _13153, level(0.0)); + float3 _7723; + if (_17674.y > 0.0) { - _317 = _297 + (_14.sample(_15, _285, level(0.0)).xyz * fast::clamp(_301.y * _301.z, 0.0, 1.0)); + _7723 = _12107 + (_4862.sample(_3594, _13153, level(0.0)).xyz * fast::clamp(_17674.y * _17674.z, 0.0, 1.0)); } else { - _317 = _297; + _7723 = _12107; } - float3 _321 = _275.xyz + (_317 * 0.5); - float4 _322 = float4(_321.x, _321.y, _321.z, _275.w); - _77._m0 = _322; - float2 _332 = fast::clamp(_82 + (float3(-1.0, 0.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw); - float3 _344 = float3(_11._m5) * fast::clamp(_8.sample(_9, _332, level(0.0)).w * _7._m1, 0.0, 1.0); - float4 _348 = _12.sample(_13, _332, level(0.0)); - float3 _364; - if (_348.y > 0.0) + float3 _22181 = _15530.xyz + (_7723 * 0.5); + float4 _15531 = float4(_22181.x, _22181.y, _22181.z, _15530.w); + _13863._m0 = _15531; + float2 _13154 = fast::clamp(_19927 + (float3(-1.0, 0.0, 0.75).xy * _22044._m0.xy), _17581.xy, _17581.zw); + float3 _12108 = float3(_12348._m5) * fast::clamp(_5785.sample(_5688, _13154, level(0.0)).w * _22044._m1, 0.0, 1.0); + float4 _17675 = _3312.sample(_4646, _13154, level(0.0)); + float3 _7724; + if (_17675.y > 0.0) { - _364 = _344 + (_14.sample(_15, _332, level(0.0)).xyz * fast::clamp(_348.y * _348.z, 0.0, 1.0)); + _7724 = _12108 + (_4862.sample(_3594, _13154, level(0.0)).xyz * fast::clamp(_17675.y * _17675.z, 0.0, 1.0)); } else { - _364 = _344; + _7724 = _12108; } - float3 _368 = _322.xyz + (_364 * 0.75); - float4 _369 = float4(_368.x, _368.y, _368.z, _322.w); - _77._m0 = _369; - float2 _379 = fast::clamp(_82 + (float3(0.0, 0.0, 1.0).xy * _7._m0.xy), _88.xy, _88.zw); - float3 _391 = float3(_11._m5) * fast::clamp(_8.sample(_9, _379, level(0.0)).w * _7._m1, 0.0, 1.0); - float4 _395 = _12.sample(_13, _379, level(0.0)); - float3 _411; - if (_395.y > 0.0) + float3 _22182 = _15531.xyz + (_7724 * 0.75); + float4 _15532 = float4(_22182.x, _22182.y, _22182.z, _15531.w); + _13863._m0 = _15532; + float2 _13155 = fast::clamp(_19927 + (float3(0.0, 0.0, 1.0).xy * _22044._m0.xy), _17581.xy, _17581.zw); + float3 _12109 = float3(_12348._m5) * fast::clamp(_5785.sample(_5688, _13155, level(0.0)).w * _22044._m1, 0.0, 1.0); + float4 _17676 = _3312.sample(_4646, _13155, level(0.0)); + float3 _7725; + if (_17676.y > 0.0) { - _411 = _391 + (_14.sample(_15, _379, level(0.0)).xyz * fast::clamp(_395.y * _395.z, 0.0, 1.0)); + _7725 = _12109 + (_4862.sample(_3594, _13155, level(0.0)).xyz * fast::clamp(_17676.y * _17676.z, 0.0, 1.0)); } else { - _411 = _391; + _7725 = _12109; } - float3 _415 = _369.xyz + (_411 * 1.0); - float4 _416 = float4(_415.x, _415.y, _415.z, _369.w); - _77._m0 = _416; - float2 _426 = fast::clamp(_82 + (float3(1.0, 0.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw); - float3 _438 = float3(_11._m5) * fast::clamp(_8.sample(_9, _426, level(0.0)).w * _7._m1, 0.0, 1.0); - float4 _442 = _12.sample(_13, _426, level(0.0)); - float3 _458; - if (_442.y > 0.0) + float3 _22183 = _15532.xyz + (_7725 * 1.0); + float4 _15533 = float4(_22183.x, _22183.y, _22183.z, _15532.w); + _13863._m0 = _15533; + float2 _13156 = fast::clamp(_19927 + (float3(1.0, 0.0, 0.75).xy * _22044._m0.xy), _17581.xy, _17581.zw); + float3 _12110 = float3(_12348._m5) * fast::clamp(_5785.sample(_5688, _13156, level(0.0)).w * _22044._m1, 0.0, 1.0); + float4 _17677 = _3312.sample(_4646, _13156, level(0.0)); + float3 _7726; + if (_17677.y > 0.0) { - _458 = _438 + (_14.sample(_15, _426, level(0.0)).xyz * fast::clamp(_442.y * _442.z, 0.0, 1.0)); + _7726 = _12110 + (_4862.sample(_3594, _13156, level(0.0)).xyz * fast::clamp(_17677.y * _17677.z, 0.0, 1.0)); } else { - _458 = _438; + _7726 = _12110; } - float3 _462 = _416.xyz + (_458 * 0.75); - float4 _463 = float4(_462.x, _462.y, _462.z, _416.w); - _77._m0 = _463; - float2 _473 = fast::clamp(_82 + (float3(2.0, 0.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw); - float3 _485 = float3(_11._m5) * fast::clamp(_8.sample(_9, _473, level(0.0)).w * _7._m1, 0.0, 1.0); - float4 _489 = _12.sample(_13, _473, level(0.0)); - float3 _505; - if (_489.y > 0.0) + float3 _22184 = _15533.xyz + (_7726 * 0.75); + float4 _15534 = float4(_22184.x, _22184.y, _22184.z, _15533.w); + _13863._m0 = _15534; + float2 _13157 = fast::clamp(_19927 + (float3(2.0, 0.0, 0.5).xy * _22044._m0.xy), _17581.xy, _17581.zw); + float3 _12111 = float3(_12348._m5) * fast::clamp(_5785.sample(_5688, _13157, level(0.0)).w * _22044._m1, 0.0, 1.0); + float4 _17678 = _3312.sample(_4646, _13157, level(0.0)); + float3 _7727; + if (_17678.y > 0.0) { - _505 = _485 + (_14.sample(_15, _473, level(0.0)).xyz * fast::clamp(_489.y * _489.z, 0.0, 1.0)); + _7727 = _12111 + (_4862.sample(_3594, _13157, level(0.0)).xyz * fast::clamp(_17678.y * _17678.z, 0.0, 1.0)); } else { - _505 = _485; + _7727 = _12111; } - float3 _509 = _463.xyz + (_505 * 0.5); - float4 _510 = float4(_509.x, _509.y, _509.z, _463.w); - _77._m0 = _510; - float2 _520 = fast::clamp(_82 + (float3(-1.0, 1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw); - float3 _532 = float3(_11._m5) * fast::clamp(_8.sample(_9, _520, level(0.0)).w * _7._m1, 0.0, 1.0); - float4 _536 = _12.sample(_13, _520, level(0.0)); - float3 _552; - if (_536.y > 0.0) + float3 _22185 = _15534.xyz + (_7727 * 0.5); + float4 _15535 = float4(_22185.x, _22185.y, _22185.z, _15534.w); + _13863._m0 = _15535; + float2 _13158 = fast::clamp(_19927 + (float3(-1.0, 1.0, 0.5).xy * _22044._m0.xy), _17581.xy, _17581.zw); + float3 _12112 = float3(_12348._m5) * fast::clamp(_5785.sample(_5688, _13158, level(0.0)).w * _22044._m1, 0.0, 1.0); + float4 _17679 = _3312.sample(_4646, _13158, level(0.0)); + float3 _7728; + if (_17679.y > 0.0) { - _552 = _532 + (_14.sample(_15, _520, level(0.0)).xyz * fast::clamp(_536.y * _536.z, 0.0, 1.0)); + _7728 = _12112 + (_4862.sample(_3594, _13158, level(0.0)).xyz * fast::clamp(_17679.y * _17679.z, 0.0, 1.0)); } else { - _552 = _532; + _7728 = _12112; } - float3 _556 = _510.xyz + (_552 * 0.5); - float4 _557 = float4(_556.x, _556.y, _556.z, _510.w); - _77._m0 = _557; - float2 _567 = fast::clamp(_82 + (float3(0.0, 1.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw); - float3 _579 = float3(_11._m5) * fast::clamp(_8.sample(_9, _567, level(0.0)).w * _7._m1, 0.0, 1.0); - float4 _583 = _12.sample(_13, _567, level(0.0)); - float3 _599; - if (_583.y > 0.0) + float3 _22186 = _15535.xyz + (_7728 * 0.5); + float4 _15536 = float4(_22186.x, _22186.y, _22186.z, _15535.w); + _13863._m0 = _15536; + float2 _13159 = fast::clamp(_19927 + (float3(0.0, 1.0, 0.75).xy * _22044._m0.xy), _17581.xy, _17581.zw); + float3 _12113 = float3(_12348._m5) * fast::clamp(_5785.sample(_5688, _13159, level(0.0)).w * _22044._m1, 0.0, 1.0); + float4 _17680 = _3312.sample(_4646, _13159, level(0.0)); + float3 _7729; + if (_17680.y > 0.0) { - _599 = _579 + (_14.sample(_15, _567, level(0.0)).xyz * fast::clamp(_583.y * _583.z, 0.0, 1.0)); + _7729 = _12113 + (_4862.sample(_3594, _13159, level(0.0)).xyz * fast::clamp(_17680.y * _17680.z, 0.0, 1.0)); } else { - _599 = _579; + _7729 = _12113; } - float3 _603 = _557.xyz + (_599 * 0.75); - float4 _604 = float4(_603.x, _603.y, _603.z, _557.w); - _77._m0 = _604; - float2 _614 = fast::clamp(_82 + (float3(1.0, 1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw); - float3 _626 = float3(_11._m5) * fast::clamp(_8.sample(_9, _614, level(0.0)).w * _7._m1, 0.0, 1.0); - float4 _630 = _12.sample(_13, _614, level(0.0)); - float3 _646; - if (_630.y > 0.0) + float3 _22187 = _15536.xyz + (_7729 * 0.75); + float4 _15537 = float4(_22187.x, _22187.y, _22187.z, _15536.w); + _13863._m0 = _15537; + float2 _13160 = fast::clamp(_19927 + (float3(1.0, 1.0, 0.5).xy * _22044._m0.xy), _17581.xy, _17581.zw); + float3 _12114 = float3(_12348._m5) * fast::clamp(_5785.sample(_5688, _13160, level(0.0)).w * _22044._m1, 0.0, 1.0); + float4 _17681 = _3312.sample(_4646, _13160, level(0.0)); + float3 _7730; + if (_17681.y > 0.0) { - _646 = _626 + (_14.sample(_15, _614, level(0.0)).xyz * fast::clamp(_630.y * _630.z, 0.0, 1.0)); + _7730 = _12114 + (_4862.sample(_3594, _13160, level(0.0)).xyz * fast::clamp(_17681.y * _17681.z, 0.0, 1.0)); } else { - _646 = _626; + _7730 = _12114; } - float3 _650 = _604.xyz + (_646 * 0.5); - float4 _651 = float4(_650.x, _650.y, _650.z, _604.w); - _77._m0 = _651; - float2 _661 = fast::clamp(_82 + (float3(0.0, 2.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw); - float3 _673 = float3(_11._m5) * fast::clamp(_8.sample(_9, _661, level(0.0)).w * _7._m1, 0.0, 1.0); - float4 _677 = _12.sample(_13, _661, level(0.0)); - float3 _693; - if (_677.y > 0.0) + float3 _22188 = _15537.xyz + (_7730 * 0.5); + float4 _15539 = float4(_22188.x, _22188.y, _22188.z, _15537.w); + _13863._m0 = _15539; + float2 _13161 = fast::clamp(_19927 + (float3(0.0, 2.0, 0.5).xy * _22044._m0.xy), _17581.xy, _17581.zw); + float3 _12115 = float3(_12348._m5) * fast::clamp(_5785.sample(_5688, _13161, level(0.0)).w * _22044._m1, 0.0, 1.0); + float4 _17682 = _3312.sample(_4646, _13161, level(0.0)); + float3 _7731; + if (_17682.y > 0.0) { - _693 = _673 + (_14.sample(_15, _661, level(0.0)).xyz * fast::clamp(_677.y * _677.z, 0.0, 1.0)); + _7731 = _12115 + (_4862.sample(_3594, _13161, level(0.0)).xyz * fast::clamp(_17682.y * _17682.z, 0.0, 1.0)); } else { - _693 = _673; + _7731 = _12115; } - float3 _697 = _651.xyz + (_693 * 0.5); - float4 _698 = float4(_697.x, _697.y, _697.z, _651.w); - _77._m0 = _698; - float3 _702 = _698.xyz / float3(((((((((((((0.0 + 0.5) + 0.5) + 0.75) + 0.5) + 0.5) + 0.75) + 1.0) + 0.75) + 0.5) + 0.5) + 0.75) + 0.5) + 0.5); - _77._m0 = float4(_702.x, _702.y, _702.z, _698.w); - _77._m0.w = 1.0; - out.m_5 = _77._m0; + float3 _22189 = _15539.xyz + (_7731 * 0.5); + float4 _15541 = float4(_22189.x, _22189.y, _22189.z, _15539.w); + _13863._m0 = _15541; + float3 _13750 = _15541.xyz / float3(((((((((((((0.0 + 0.5) + 0.5) + 0.75) + 0.5) + 0.5) + 0.75) + 1.0) + 0.75) + 0.5) + 0.5) + 0.75) + 0.5) + 0.5); + _13863._m0 = float4(_13750.x, _13750.y, _13750.z, _15541.w); + _13863._m0.w = 1.0; + out.m_4317 = _13863._m0; return out; } diff --git a/reference/shaders-msl/asm/vert/invariant.msl21.asm.vert b/reference/shaders-msl/asm/vert/invariant.msl21.asm.vert index d74c43b3..5272bdc1 100644 --- a/reference/shaders-msl/asm/vert/invariant.msl21.asm.vert +++ b/reference/shaders-msl/asm/vert/invariant.msl21.asm.vert @@ -19,8 +19,8 @@ float4 _main() vertex main0_out main0() { main0_out out = {}; - float4 _14 = _main(); - out.gl_Position = _14; + float4 _17 = _main(); + out.gl_Position = _17; return out; } diff --git a/reference/shaders-msl/asm/vert/packed-bool-to-uint.asm.vert b/reference/shaders-msl/asm/vert/packed-bool-to-uint.asm.vert index 1926ff9e..a0f383c9 100644 --- a/reference/shaders-msl/asm/vert/packed-bool-to-uint.asm.vert +++ b/reference/shaders-msl/asm/vert/packed-bool-to-uint.asm.vert @@ -25,11 +25,11 @@ struct main0_in float4 a_position [[attribute(0)]]; }; -vertex main0_out main0(main0_in in [[stage_in]], constant defaultUniformsVS& _9 [[buffer(0)]], uint gl_VertexIndex [[vertex_id]]) +vertex main0_out main0(main0_in in [[stage_in]], constant defaultUniformsVS& _11 [[buffer(0)]], uint gl_VertexIndex [[vertex_id]]) { main0_out out = {}; - out.gl_Position = _9.umatrix * float4(_9.uquad[int(gl_VertexIndex)].x, _9.uquad[int(gl_VertexIndex)].y, in.a_position.z, in.a_position.w); - if (_9.flags.flags[0] != 0u) + out.gl_Position = _11.umatrix * float4(_11.uquad[int(gl_VertexIndex)].x, _11.uquad[int(gl_VertexIndex)].y, in.a_position.z, in.a_position.w); + if (_11.flags.flags[0] != 0u) { out.gl_Position.z = 0.0; } diff --git a/reference/shaders-msl/asm/vert/packed-bool2-to-packed_uint2.asm.vert b/reference/shaders-msl/asm/vert/packed-bool2-to-packed_uint2.asm.vert index ee206385..4d137ebf 100644 --- a/reference/shaders-msl/asm/vert/packed-bool2-to-packed_uint2.asm.vert +++ b/reference/shaders-msl/asm/vert/packed-bool2-to-packed_uint2.asm.vert @@ -25,11 +25,11 @@ struct main0_in float4 a_position [[attribute(0)]]; }; -vertex main0_out main0(main0_in in [[stage_in]], constant defaultUniformsVS& _9 [[buffer(0)]], uint gl_VertexIndex [[vertex_id]]) +vertex main0_out main0(main0_in in [[stage_in]], constant defaultUniformsVS& _11 [[buffer(0)]], uint gl_VertexIndex [[vertex_id]]) { main0_out out = {}; - out.gl_Position = _9.umatrix * float4(_9.uquad[int(gl_VertexIndex)].x, _9.uquad[int(gl_VertexIndex)].y, in.a_position.z, in.a_position.w); - if (_9.flags.flags[0].x != 0u) + out.gl_Position = _11.umatrix * float4(_11.uquad[int(gl_VertexIndex)].x, _11.uquad[int(gl_VertexIndex)].y, in.a_position.z, in.a_position.w); + if (_11.flags.flags[0].x != 0u) { out.gl_Position.z = 0.0; } diff --git a/reference/shaders-msl/asm/vert/spec-constant-op-composite.asm.vert b/reference/shaders-msl/asm/vert/spec-constant-op-composite.asm.vert index 074a47a6..cbfb409d 100644 --- a/reference/shaders-msl/asm/vert/spec-constant-op-composite.asm.vert +++ b/reference/shaders-msl/asm/vert/spec-constant-op-composite.asm.vert @@ -16,23 +16,23 @@ template::H> return F(hval); } -constant int _7_tmp [[function_constant(201)]]; -constant int _7 = is_function_constant_defined(_7_tmp) ? _7_tmp : -10; -constant int _20 = (_7 + 2); -constant uint _8_tmp [[function_constant(202)]]; -constant uint _8 = is_function_constant_defined(_8_tmp) ? _8_tmp : 100u; -constant uint _25 = (_8 % 5u); -constant int _30 = _7 - (-3) * (_7 / (-3)); -constant int4 _32 = int4(20, 30, _20, _30); -constant int2 _34 = int2(_32.y, _32.x); -constant int _35 = _32.y; -constant float _9_tmp [[function_constant(200)]]; -constant float _9 = is_function_constant_defined(_9_tmp) ? _9_tmp : 3.141590118408203125; -constant float _41 = spvQuantizeToF16(_9); +constant int _13_tmp [[function_constant(201)]]; +constant int _13 = is_function_constant_defined(_13_tmp) ? _13_tmp : -10; +constant int _15 = (_13 + 2); +constant uint _24_tmp [[function_constant(202)]]; +constant uint _24 = is_function_constant_defined(_24_tmp) ? _24_tmp : 100u; +constant uint _26 = (_24 % 5u); +constant int _61 = _13 - (-3) * (_13 / (-3)); +constant int4 _36 = int4(20, 30, _15, _61); +constant int2 _41 = int2(_36.y, _36.x); +constant int _62 = _36.y; +constant float _57_tmp [[function_constant(200)]]; +constant float _57 = is_function_constant_defined(_57_tmp) ? _57_tmp : 3.141590118408203125; +constant float _63 = spvQuantizeToF16(_57); struct main0_out { - int m_4 [[user(locn0)]]; + int m_58 [[user(locn0)]]; float4 gl_Position [[position]]; }; @@ -40,13 +40,13 @@ vertex main0_out main0() { main0_out out = {}; float4 pos = float4(0.0); - pos.y += float(_20); - pos.z += float(_25); - pos += float4(_32); - float2 _59 = pos.xy + float2(_34); - pos = float4(_59.x, _59.y, pos.z, pos.w); + pos.y += float(_15); + pos.z += float(_26); + pos += float4(_36); + float2 _46 = pos.xy + float2(_41); + pos = float4(_46.x, _46.y, pos.z, pos.w); out.gl_Position = pos; - out.m_4 = _35; + out.m_58 = _62; return out; } diff --git a/reference/shaders-msl/vulkan/frag/demote-to-helper-forwarding.asm.vk.nocompat.msl23.frag b/reference/shaders-msl/vulkan/frag/demote-to-helper-forwarding.asm.vk.nocompat.msl23.frag index 274cea2d..05d5eb4a 100644 --- a/reference/shaders-msl/vulkan/frag/demote-to-helper-forwarding.asm.vk.nocompat.msl23.frag +++ b/reference/shaders-msl/vulkan/frag/demote-to-helper-forwarding.asm.vk.nocompat.msl23.frag @@ -13,9 +13,9 @@ fragment main0_out main0() main0_out out = {}; bool gl_HelperInvocation = {}; gl_HelperInvocation = simd_is_helper_thread(); - bool _15 = gl_HelperInvocation; + bool _9 = gl_HelperInvocation; gl_HelperInvocation = true, discard_fragment(); - if (!_15) + if (!_9) { out.FragColor = float4(1.0, 0.0, 0.0, 1.0); } diff --git a/reference/shaders-no-opt/asm/comp/access-chain-dominator-in-loop-body-2.asm.comp b/reference/shaders-no-opt/asm/comp/access-chain-dominator-in-loop-body-2.asm.comp index c27bef6a..13a4bfe2 100644 --- a/reference/shaders-no-opt/asm/comp/access-chain-dominator-in-loop-body-2.asm.comp +++ b/reference/shaders-no-opt/asm/comp/access-chain-dominator-in-loop-body-2.asm.comp @@ -4,21 +4,21 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; layout(binding = 0, std430) buffer SSBO { int values[]; -} _4; +} _6; void main() { - int _17 = 0; + int _51 = 0; for (;;) { - if (_17 < 100) + if (_51 < 100) { - int _24 = _4.values[_17]; - _4.values[_24] = _17; - int _26 = _24 + 1; - int _18 = _4.values[_26]; - _4.values[_17] = _18; - _17 = _18; + int _41 = _6.values[_51]; + _6.values[_41] = _51; + int _47 = _41 + 1; + int _49 = _6.values[_47]; + _6.values[_51] = _49; + _51 = _49; continue; } else diff --git a/reference/shaders-no-opt/asm/comp/access-chain-dominator-in-loop-body.asm.comp b/reference/shaders-no-opt/asm/comp/access-chain-dominator-in-loop-body.asm.comp index 0517ec4d..74803fa8 100644 --- a/reference/shaders-no-opt/asm/comp/access-chain-dominator-in-loop-body.asm.comp +++ b/reference/shaders-no-opt/asm/comp/access-chain-dominator-in-loop-body.asm.comp @@ -4,18 +4,18 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; layout(binding = 0, std430) buffer SSBO { int values[]; -} _4; +} _6; void main() { - int _17 = 0; + int _51 = 0; for (;;) { - if (_17 < 100) + if (_51 < 100) { - int _24 = _4.values[_17]; - _4.values[_24] = _17; - _17 = _4.values[_24 + 1]; + int _41 = _6.values[_51]; + _6.values[_41] = _51; + _51 = _6.values[_41 + 1]; continue; } else diff --git a/reference/shaders-no-opt/asm/comp/aliased-struct-divergent-member-name.asm.comp b/reference/shaders-no-opt/asm/comp/aliased-struct-divergent-member-name.asm.comp index d36f5431..eb62c4df 100644 --- a/reference/shaders-no-opt/asm/comp/aliased-struct-divergent-member-name.asm.comp +++ b/reference/shaders-no-opt/asm/comp/aliased-struct-divergent-member-name.asm.comp @@ -9,17 +9,17 @@ struct T layout(binding = 0, std430) buffer SSBO1 { T foo[]; -} _7; +} _9; layout(binding = 1, std140) buffer SSBO2 { T bar[]; -} _10; +} _13; void main() { T v = T(40.0); - _7.foo[10].c = v.c; - _10.bar[30].c = v.c; + _9.foo[10].c = v.c; + _13.bar[30].c = v.c; } diff --git a/reference/shaders-no-opt/asm/comp/arithmetic-conversion-signs.asm.nocompat.vk.comp.vk b/reference/shaders-no-opt/asm/comp/arithmetic-conversion-signs.asm.nocompat.vk.comp.vk index 5f480728..b35c14d2 100644 --- a/reference/shaders-no-opt/asm/comp/arithmetic-conversion-signs.asm.nocompat.vk.comp.vk +++ b/reference/shaders-no-opt/asm/comp/arithmetic-conversion-signs.asm.nocompat.vk.comp.vk @@ -10,37 +10,37 @@ layout(set = 0, binding = 0, std430) buffer SSBO int16_t s16; uint16_t u16; float f32; -} _4; +} _6; void main() { - int _29 = _4.s32; - uint _30 = _4.u32; - int16_t _31 = _4.s16; - uint16_t _32 = _4.u16; - float _33 = _4.f32; - _4.s32 = int(_31); - _4.u32 = uint(_31); - _4.s32 = int(int16_t(_32)); - _4.u32 = uint(int16_t(_32)); - _4.u32 = uint(uint16_t(_31)); - _4.u32 = uint(_32); - _4.s16 = int16_t(_29); - _4.u16 = uint16_t(_29); - _4.s16 = int16_t(_30); - _4.u16 = uint16_t(_30); - _4.u16 = uint16_t(_29); - _4.u16 = uint16_t(_30); - _4.f32 = float(_31); - _4.f32 = float(int16_t(_32)); - _4.f32 = float(_29); - _4.f32 = float(int(_30)); - _4.f32 = float(uint16_t(_31)); - _4.f32 = float(_32); - _4.f32 = float(uint(_29)); - _4.f32 = float(_30); - _4.s16 = int16_t(_33); - _4.u16 = uint16_t(int16_t(_33)); - _4.u16 = uint16_t(_33); + int _29 = _6.s32; + uint _30 = _6.u32; + int16_t _31 = _6.s16; + uint16_t _32 = _6.u16; + float _33 = _6.f32; + _6.s32 = int(_31); + _6.u32 = uint(_31); + _6.s32 = int(int16_t(_32)); + _6.u32 = uint(int16_t(_32)); + _6.u32 = uint(uint16_t(_31)); + _6.u32 = uint(_32); + _6.s16 = int16_t(_29); + _6.u16 = uint16_t(_29); + _6.s16 = int16_t(_30); + _6.u16 = uint16_t(_30); + _6.u16 = uint16_t(_29); + _6.u16 = uint16_t(_30); + _6.f32 = float(_31); + _6.f32 = float(int16_t(_32)); + _6.f32 = float(_29); + _6.f32 = float(int(_30)); + _6.f32 = float(uint16_t(_31)); + _6.f32 = float(_32); + _6.f32 = float(uint(_29)); + _6.f32 = float(_30); + _6.s16 = int16_t(_33); + _6.u16 = uint16_t(int16_t(_33)); + _6.u16 = uint16_t(_33); } diff --git a/reference/shaders-no-opt/asm/comp/atomic-load-store.asm.comp b/reference/shaders-no-opt/asm/comp/atomic-load-store.asm.comp index 10a54fc8..4c496a58 100644 --- a/reference/shaders-no-opt/asm/comp/atomic-load-store.asm.comp +++ b/reference/shaders-no-opt/asm/comp/atomic-load-store.asm.comp @@ -5,12 +5,12 @@ layout(binding = 0, std430) buffer SSBO { uint a; uint b; -} _5; +} _7; void main() { - uint _20 = atomicAdd(_5.b, 0u); - uint c = _20; - atomicExchange(_5.a, c); + uint _16 = atomicAdd(_7.b, 0u); + uint c = _16; + atomicExchange(_7.a, c); } diff --git a/reference/shaders-no-opt/asm/comp/atomic-result-temporary.asm.comp b/reference/shaders-no-opt/asm/comp/atomic-result-temporary.asm.comp index b51c6c58..1ca73049 100644 --- a/reference/shaders-no-opt/asm/comp/atomic-result-temporary.asm.comp +++ b/reference/shaders-no-opt/asm/comp/atomic-result-temporary.asm.comp @@ -5,14 +5,14 @@ layout(binding = 0, std430) buffer SSBO { uint count; uint data[]; -} _5; +} _7; void main() { - uint _24 = atomicAdd(_5.count, 1u); - if (_24 < 1024u) + uint _19 = atomicAdd(_7.count, 1u); + if (_19 < 1024u) { - _5.data[_24] = gl_GlobalInvocationID.x; + _7.data[_19] = gl_GlobalInvocationID.x; } } diff --git a/reference/shaders-no-opt/asm/comp/basic.spv16.asm.comp b/reference/shaders-no-opt/asm/comp/basic.spv16.asm.comp index 7c237d8a..00929f30 100644 --- a/reference/shaders-no-opt/asm/comp/basic.spv16.asm.comp +++ b/reference/shaders-no-opt/asm/comp/basic.spv16.asm.comp @@ -4,10 +4,10 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; layout(binding = 0, std430) buffer SSBO { float values[]; -} _3; +} _4; void main() { - _3.values[gl_GlobalInvocationID.x] += 2.0; + _4.values[gl_GlobalInvocationID.x] += 2.0; } diff --git a/reference/shaders-no-opt/asm/comp/bitcast-fp16-fp32.asm.vk.comp b/reference/shaders-no-opt/asm/comp/bitcast-fp16-fp32.asm.vk.comp index 66a70f18..ca85cb0c 100644 --- a/reference/shaders-no-opt/asm/comp/bitcast-fp16-fp32.asm.vk.comp +++ b/reference/shaders-no-opt/asm/comp/bitcast-fp16-fp32.asm.vk.comp @@ -14,11 +14,11 @@ layout(binding = 0, std430) buffer SSBO float b; float c; f16vec2 d; -} _4; +} _6; void main() { - _4.b = uintBitsToFloat(packFloat2x16(_4.a)); - _4.d = unpackFloat2x16(floatBitsToUint(_4.c)); + _6.b = uintBitsToFloat(packFloat2x16(_6.a)); + _6.d = unpackFloat2x16(floatBitsToUint(_6.c)); } diff --git a/reference/shaders-no-opt/asm/comp/bitcast-fp16-fp32.asm.vk.comp.vk b/reference/shaders-no-opt/asm/comp/bitcast-fp16-fp32.asm.vk.comp.vk index 09eccf4b..d16f5071 100644 --- a/reference/shaders-no-opt/asm/comp/bitcast-fp16-fp32.asm.vk.comp.vk +++ b/reference/shaders-no-opt/asm/comp/bitcast-fp16-fp32.asm.vk.comp.vk @@ -15,11 +15,11 @@ layout(set = 0, binding = 0, std430) buffer SSBO float b; float c; f16vec2 d; -} _4; +} _6; void main() { - _4.b = uintBitsToFloat(packFloat2x16(_4.a)); - _4.d = unpackFloat2x16(floatBitsToUint(_4.c)); + _6.b = uintBitsToFloat(packFloat2x16(_6.a)); + _6.d = unpackFloat2x16(floatBitsToUint(_6.c)); } diff --git a/reference/shaders-no-opt/asm/comp/bitfield-signed-operations.asm.comp b/reference/shaders-no-opt/asm/comp/bitfield-signed-operations.asm.comp index f535ba7f..570744a3 100644 --- a/reference/shaders-no-opt/asm/comp/bitfield-signed-operations.asm.comp +++ b/reference/shaders-no-opt/asm/comp/bitfield-signed-operations.asm.comp @@ -5,23 +5,23 @@ layout(binding = 0, std430) buffer SSBO { ivec4 ints; uvec4 uints; -} _3; +} _4; void main() { - ivec4 _19 = _3.ints; - uvec4 _20 = _3.uints; - _3.ints = bitCount(_19); - _3.uints = uvec4(bitCount(_19)); - _3.ints = bitCount(_20); - _3.uints = uvec4(bitCount(_20)); - _3.ints = bitfieldReverse(_19); - _3.uints = bitfieldReverse(_20); - _3.ints = bitfieldExtract(_19, 1, int(11u)); - _3.uints = uvec4(bitfieldExtract(ivec4(_20), int(11u), 1)); - _3.ints = ivec4(bitfieldExtract(uvec4(_19), 1, int(11u))); - _3.uints = bitfieldExtract(_20, int(11u), 1); - _3.ints = bitfieldInsert(_19, _19.wzyx, 1, int(11u)); - _3.uints = bitfieldInsert(_20, _20.wzyx, int(11u), 1); + ivec4 _19 = _4.ints; + uvec4 _20 = _4.uints; + _4.ints = bitCount(_19); + _4.uints = uvec4(bitCount(_19)); + _4.ints = bitCount(_20); + _4.uints = uvec4(bitCount(_20)); + _4.ints = bitfieldReverse(_19); + _4.uints = bitfieldReverse(_20); + _4.ints = bitfieldExtract(_19, 1, int(11u)); + _4.uints = uvec4(bitfieldExtract(ivec4(_20), int(11u), 1)); + _4.ints = ivec4(bitfieldExtract(uvec4(_19), 1, int(11u))); + _4.uints = bitfieldExtract(_20, int(11u), 1); + _4.ints = bitfieldInsert(_19, _19.wzyx, 1, int(11u)); + _4.uints = bitfieldInsert(_20, _20.wzyx, int(11u), 1); } diff --git a/reference/shaders-no-opt/asm/comp/bitscan.asm.comp b/reference/shaders-no-opt/asm/comp/bitscan.asm.comp index 31a6234a..eb5010e2 100644 --- a/reference/shaders-no-opt/asm/comp/bitscan.asm.comp +++ b/reference/shaders-no-opt/asm/comp/bitscan.asm.comp @@ -5,23 +5,23 @@ layout(binding = 0, std430) buffer SSBO { uvec4 u; ivec4 i; -} _4; +} _6; void main() { - uvec4 _19 = _4.u; - ivec4 _20 = _4.i; - _4.u = uvec4(findLSB(_19)); - _4.i = findLSB(_19); - _4.u = uvec4(findLSB(_20)); - _4.i = findLSB(_20); - _4.u = uvec4(findMSB(_19)); - _4.i = findMSB(_19); - _4.u = uvec4(findMSB(uvec4(_20))); - _4.i = findMSB(uvec4(_20)); - _4.u = uvec4(findMSB(ivec4(_19))); - _4.i = findMSB(ivec4(_19)); - _4.u = uvec4(findMSB(_20)); - _4.i = findMSB(_20); + uvec4 _19 = _6.u; + ivec4 _20 = _6.i; + _6.u = uvec4(findLSB(_19)); + _6.i = findLSB(_19); + _6.u = uvec4(findLSB(_20)); + _6.i = findLSB(_20); + _6.u = uvec4(findMSB(_19)); + _6.i = findMSB(_19); + _6.u = uvec4(findMSB(uvec4(_20))); + _6.i = findMSB(uvec4(_20)); + _6.u = uvec4(findMSB(ivec4(_19))); + _6.i = findMSB(ivec4(_19)); + _6.u = uvec4(findMSB(_20)); + _6.i = findMSB(_20); } diff --git a/reference/shaders-no-opt/asm/comp/buffer-atomic-nonuniform.vk.nocompat.asm.comp.vk b/reference/shaders-no-opt/asm/comp/buffer-atomic-nonuniform.vk.nocompat.asm.comp.vk index d700d613..0f9a1c7d 100644 --- a/reference/shaders-no-opt/asm/comp/buffer-atomic-nonuniform.vk.nocompat.asm.comp.vk +++ b/reference/shaders-no-opt/asm/comp/buffer-atomic-nonuniform.vk.nocompat.asm.comp.vk @@ -9,7 +9,7 @@ layout(set = 0, binding = 0, std430) buffer SSBO void main() { - uint _24 = gl_GlobalInvocationID.z; - uint _25 = atomicAdd(ssbos[nonuniformEXT(_24)].v, 1u); + uint _18 = gl_GlobalInvocationID.z; + uint _25 = atomicAdd(ssbos[nonuniformEXT(_18)].v, 1u); } diff --git a/reference/shaders-no-opt/asm/comp/buffer-reference-aliased-block-name.nocompat.vk.asm.comp.vk b/reference/shaders-no-opt/asm/comp/buffer-reference-aliased-block-name.nocompat.vk.asm.comp.vk index 12581cc3..77865787 100644 --- a/reference/shaders-no-opt/asm/comp/buffer-reference-aliased-block-name.nocompat.vk.asm.comp.vk +++ b/reference/shaders-no-opt/asm/comp/buffer-reference-aliased-block-name.nocompat.vk.asm.comp.vk @@ -3,19 +3,19 @@ layout(local_size_x = 64, local_size_y = 1, local_size_z = 1) in; layout(buffer_reference) buffer Alias; -layout(buffer_reference) buffer _6; -layout(buffer_reference) buffer _7; +layout(buffer_reference) buffer _8; +layout(buffer_reference) buffer _9; layout(buffer_reference, buffer_reference_align = 16, std430) readonly buffer Alias { vec4 v[]; }; -layout(buffer_reference, buffer_reference_align = 16, std430) restrict buffer _6 +layout(buffer_reference, buffer_reference_align = 16, std430) restrict buffer _8 { vec4 v[]; }; -layout(buffer_reference, buffer_reference_align = 16, std430) coherent writeonly buffer _7 +layout(buffer_reference, buffer_reference_align = 16, std430) coherent writeonly buffer _9 { vec4 v[]; }; @@ -23,8 +23,8 @@ layout(buffer_reference, buffer_reference_align = 16, std430) coherent writeonly layout(push_constant, std430) uniform Registers { Alias ro; - _6 rw; - _7 wo; + _8 rw; + _9 wo; } registers; void main() diff --git a/reference/shaders-no-opt/asm/comp/buffer-reference-pointer-to-pod-in-buffer.asm.nocompat.vk.comp.vk b/reference/shaders-no-opt/asm/comp/buffer-reference-pointer-to-pod-in-buffer.asm.nocompat.vk.comp.vk index 06e620d2..ea958acb 100644 --- a/reference/shaders-no-opt/asm/comp/buffer-reference-pointer-to-pod-in-buffer.asm.nocompat.vk.comp.vk +++ b/reference/shaders-no-opt/asm/comp/buffer-reference-pointer-to-pod-in-buffer.asm.nocompat.vk.comp.vk @@ -10,10 +10,10 @@ layout(buffer_reference, buffer_reference_align = 8) buffer uvec4Pointer layout(push_constant, std430) uniform Push { uvec4Pointer ptr; -} _4; +} _6; void main() { - _4.ptr.value = uvec4(1u, 2u, 3u, 4u); + _6.ptr.value = uvec4(1u, 2u, 3u, 4u); } diff --git a/reference/shaders-no-opt/asm/comp/buffer-reference-synthesized-pointer-2.asm.nocompat.vk.comp.vk b/reference/shaders-no-opt/asm/comp/buffer-reference-synthesized-pointer-2.asm.nocompat.vk.comp.vk index f77142a7..37940a1e 100644 --- a/reference/shaders-no-opt/asm/comp/buffer-reference-synthesized-pointer-2.asm.nocompat.vk.comp.vk +++ b/reference/shaders-no-opt/asm/comp/buffer-reference-synthesized-pointer-2.asm.nocompat.vk.comp.vk @@ -12,14 +12,14 @@ layout(buffer_reference, buffer_reference_align = 4) buffer uintPointer uint value; }; -layout(push_constant, std430) uniform _4_12 +layout(push_constant, std430) uniform _6_13 { uint64_t _m0; -} _12; +} _13; void main() { - uintPointer _3 = uintPointer(_12._m0); - _3.value = 20u; + uintPointer _4 = uintPointer(_13._m0); + _4.value = 20u; } diff --git a/reference/shaders-no-opt/asm/comp/buffer-reference-synthesized-pointer.asm.nocompat.vk.comp.vk b/reference/shaders-no-opt/asm/comp/buffer-reference-synthesized-pointer.asm.nocompat.vk.comp.vk index 6ba488be..4062e70e 100644 --- a/reference/shaders-no-opt/asm/comp/buffer-reference-synthesized-pointer.asm.nocompat.vk.comp.vk +++ b/reference/shaders-no-opt/asm/comp/buffer-reference-synthesized-pointer.asm.nocompat.vk.comp.vk @@ -12,14 +12,14 @@ layout(buffer_reference, buffer_reference_align = 4) buffer uint0_Pointer uint value[]; }; -layout(push_constant, std430) uniform _6_14 +layout(push_constant, std430) uniform _8_15 { uint64_t _m0; -} _14; +} _15; void main() { - uint0_Pointer _5 = uint0_Pointer(_14._m0); - _5.value[10] = 20u; + uint0_Pointer _7 = uint0_Pointer(_15._m0); + _7.value[10] = 20u; } diff --git a/reference/shaders-no-opt/asm/comp/constant-lut-name-aliasing.asm.comp b/reference/shaders-no-opt/asm/comp/constant-lut-name-aliasing.asm.comp index 1f43951a..1b661926 100644 --- a/reference/shaders-no-opt/asm/comp/constant-lut-name-aliasing.asm.comp +++ b/reference/shaders-no-opt/asm/comp/constant-lut-name-aliasing.asm.comp @@ -7,10 +7,10 @@ const int indexable_1[4] = int[](4, 5, 6, 7); layout(binding = 0, std430) buffer SSBO { int values[]; -} _6; +} _8; void main() { - _6.values[gl_GlobalInvocationID.x] = indexable[gl_LocalInvocationID.x] + indexable_1[gl_LocalInvocationID.y]; + _8.values[gl_GlobalInvocationID.x] = indexable[gl_LocalInvocationID.x] + indexable_1[gl_LocalInvocationID.y]; } diff --git a/reference/shaders-no-opt/asm/comp/copy-logical.spv14.asm.comp b/reference/shaders-no-opt/asm/comp/copy-logical.spv14.asm.comp index 28b2d1d0..12ebd3ec 100644 --- a/reference/shaders-no-opt/asm/comp/copy-logical.spv14.asm.comp +++ b/reference/shaders-no-opt/asm/comp/copy-logical.spv14.asm.comp @@ -25,21 +25,21 @@ struct A B1 b1_array[4]; }; -layout(binding = 0, std430) buffer _8_3 +layout(binding = 0, std430) buffer _10_4 { A a_block; C c_block; -} _3; +} _4; void main() { - A _27; - _27.a = _3.c_block.c; - _27.b1.elem1 = _3.c_block.b2.elem2; - _27.b1_array[0].elem1 = _3.c_block.b2_array[0].elem2; - _27.b1_array[1].elem1 = _3.c_block.b2_array[1].elem2; - _27.b1_array[2].elem1 = _3.c_block.b2_array[2].elem2; - _27.b1_array[3].elem1 = _3.c_block.b2_array[3].elem2; - _3.a_block = _27; + A _24; + _24.a = _4.c_block.c; + _24.b1.elem1 = _4.c_block.b2.elem2; + _24.b1_array[0].elem1 = _4.c_block.b2_array[0].elem2; + _24.b1_array[1].elem1 = _4.c_block.b2_array[1].elem2; + _24.b1_array[2].elem1 = _4.c_block.b2_array[2].elem2; + _24.b1_array[3].elem1 = _4.c_block.b2_array[3].elem2; + _4.a_block = _24; } diff --git a/reference/shaders-no-opt/asm/comp/expression-nesting-limits.asm.comp b/reference/shaders-no-opt/asm/comp/expression-nesting-limits.asm.comp index 83a9b83f..73634546 100644 --- a/reference/shaders-no-opt/asm/comp/expression-nesting-limits.asm.comp +++ b/reference/shaders-no-opt/asm/comp/expression-nesting-limits.asm.comp @@ -18,11 +18,11 @@ layout(binding = 2, std430) buffer _4_7 vec4 _88(vec4 _89) { - for (int _91 = 0; _91 < 16; _91++) + for (int _93 = 0; _93 < 16; _93++) { - uint _163 = _6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + _5._m0[_91])))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); - uint _225 = _6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + _163))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); - _7._m0[_91] = _6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + (_6._m0[_91] + _225)))))))))))))); + uint _160 = _6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + _5._m0[_93])))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); + uint _222 = _6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + _160))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))); + _7._m0[_93] = _6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + (_6._m0[_93] + _222)))))))))))))); } return _89; } diff --git a/reference/shaders-no-opt/asm/comp/glsl-signed-operations.asm.comp b/reference/shaders-no-opt/asm/comp/glsl-signed-operations.asm.comp index 35edd4dd..a906c756 100644 --- a/reference/shaders-no-opt/asm/comp/glsl-signed-operations.asm.comp +++ b/reference/shaders-no-opt/asm/comp/glsl-signed-operations.asm.comp @@ -5,43 +5,43 @@ layout(binding = 0, std430) buffer SSBO { ivec4 ints; uvec4 uints; -} _4; +} _6; void main() { - ivec4 _19 = _4.ints; - uvec4 _20 = _4.uints; - _4.ints = abs(_19); - _4.uints = uvec4(abs(_19)); - _4.ints = abs(ivec4(_20)); - _4.uints = uvec4(abs(ivec4(_20))); - _4.ints = sign(_19); - _4.uints = uvec4(sign(_19)); - _4.ints = sign(ivec4(_20)); - _4.uints = uvec4(sign(ivec4(_20))); - _4.ints = findMSB(ivec4(_20)); - _4.uints = uvec4(findMSB(ivec4(_20))); - _4.ints = findMSB(uvec4(_19)); - _4.uints = uvec4(findMSB(uvec4(_19))); - _4.ints = min(_19, _19); - _4.uints = uvec4(min(_19, ivec4(_20))); - _4.ints = min(ivec4(_20), ivec4(_20)); - _4.uints = uvec4(min(ivec4(_20), _19)); - _4.ints = ivec4(min(uvec4(_19), _20)); - _4.uints = min(uvec4(_19), _20); - _4.ints = ivec4(min(_20, uvec4(_19))); - _4.uints = min(_20, uvec4(_19)); - _4.ints = max(_19, _19); - _4.uints = uvec4(max(_19, _19)); - _4.ints = max(ivec4(_20), _19); - _4.uints = uvec4(max(ivec4(_20), _19)); - _4.ints = ivec4(max(uvec4(_19), _20)); - _4.uints = max(uvec4(_19), uvec4(_19)); - _4.ints = ivec4(max(_20, uvec4(_19))); - _4.uints = max(_20, uvec4(_19)); - _4.ints = clamp(ivec4(_20), ivec4(_20), ivec4(_20)); - _4.uints = uvec4(clamp(ivec4(_20), ivec4(_20), ivec4(_20))); - _4.ints = ivec4(clamp(uvec4(_19), uvec4(_19), uvec4(_19))); - _4.uints = clamp(uvec4(_19), uvec4(_19), uvec4(_19)); + ivec4 _19 = _6.ints; + uvec4 _20 = _6.uints; + _6.ints = abs(_19); + _6.uints = uvec4(abs(_19)); + _6.ints = abs(ivec4(_20)); + _6.uints = uvec4(abs(ivec4(_20))); + _6.ints = sign(_19); + _6.uints = uvec4(sign(_19)); + _6.ints = sign(ivec4(_20)); + _6.uints = uvec4(sign(ivec4(_20))); + _6.ints = findMSB(ivec4(_20)); + _6.uints = uvec4(findMSB(ivec4(_20))); + _6.ints = findMSB(uvec4(_19)); + _6.uints = uvec4(findMSB(uvec4(_19))); + _6.ints = min(_19, _19); + _6.uints = uvec4(min(_19, ivec4(_20))); + _6.ints = min(ivec4(_20), ivec4(_20)); + _6.uints = uvec4(min(ivec4(_20), _19)); + _6.ints = ivec4(min(uvec4(_19), _20)); + _6.uints = min(uvec4(_19), _20); + _6.ints = ivec4(min(_20, uvec4(_19))); + _6.uints = min(_20, uvec4(_19)); + _6.ints = max(_19, _19); + _6.uints = uvec4(max(_19, _19)); + _6.ints = max(ivec4(_20), _19); + _6.uints = uvec4(max(ivec4(_20), _19)); + _6.ints = ivec4(max(uvec4(_19), _20)); + _6.uints = max(uvec4(_19), uvec4(_19)); + _6.ints = ivec4(max(_20, uvec4(_19))); + _6.uints = max(_20, uvec4(_19)); + _6.ints = clamp(ivec4(_20), ivec4(_20), ivec4(_20)); + _6.uints = uvec4(clamp(ivec4(_20), ivec4(_20), ivec4(_20))); + _6.ints = ivec4(clamp(uvec4(_19), uvec4(_19), uvec4(_19))); + _6.uints = clamp(uvec4(_19), uvec4(_19), uvec4(_19)); } diff --git a/reference/shaders-no-opt/asm/comp/glsl.std450.frexp-modf-struct.asm.comp b/reference/shaders-no-opt/asm/comp/glsl.std450.frexp-modf-struct.asm.comp index dc0956c3..88bfd0de 100644 --- a/reference/shaders-no-opt/asm/comp/glsl.std450.frexp-modf-struct.asm.comp +++ b/reference/shaders-no-opt/asm/comp/glsl.std450.frexp-modf-struct.asm.comp @@ -1,33 +1,33 @@ #version 450 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; -struct _8 +struct _9 { float _m0; float _m1; }; -struct _15 +struct _16 { float _m0; int _m1; }; -layout(binding = 0, std430) buffer _3_4 +layout(binding = 0, std430) buffer _4_6 { float _m0; int _m1; -} _4; +} _6; void main() { - _8 _23; + _9 _23; _23._m0 = modf(20.0, _23._m1); - _15 _24; + _16 _24; _24._m0 = frexp(40.0, _24._m1); - _4._m0 = _23._m0; - _4._m0 = _23._m1; - _4._m0 = _24._m0; - _4._m1 = _24._m1; + _6._m0 = _23._m0; + _6._m0 = _23._m1; + _6._m0 = _24._m0; + _6._m1 = _24._m1; } diff --git a/reference/shaders-no-opt/asm/comp/image-atomic-nonuniform.vk.nocompat.asm.comp.vk b/reference/shaders-no-opt/asm/comp/image-atomic-nonuniform.vk.nocompat.asm.comp.vk index c6c1ea3e..19dd025e 100644 --- a/reference/shaders-no-opt/asm/comp/image-atomic-nonuniform.vk.nocompat.asm.comp.vk +++ b/reference/shaders-no-opt/asm/comp/image-atomic-nonuniform.vk.nocompat.asm.comp.vk @@ -6,7 +6,7 @@ layout(set = 0, binding = 0, r32ui) uniform uimage2D uImage[]; void main() { - uint _26 = gl_GlobalInvocationID.z; - uint _31 = imageAtomicAdd(uImage[nonuniformEXT(_26)], ivec2(gl_GlobalInvocationID.xy), 1u); + uint _18 = gl_GlobalInvocationID.z; + uint _31 = imageAtomicAdd(uImage[nonuniformEXT(_18)], ivec2(gl_GlobalInvocationID.xy), 1u); } diff --git a/reference/shaders-no-opt/asm/comp/local-size-id-override.vk.asm.comp b/reference/shaders-no-opt/asm/comp/local-size-id-override.vk.asm.comp index 57587ebf..3a4f5db1 100644 --- a/reference/shaders-no-opt/asm/comp/local-size-id-override.vk.asm.comp +++ b/reference/shaders-no-opt/asm/comp/local-size-id-override.vk.asm.comp @@ -9,21 +9,21 @@ #ifndef SPIRV_CROSS_CONSTANT_ID_3 #define SPIRV_CROSS_CONSTANT_ID_3 13u #endif -const uint _4 = SPIRV_CROSS_CONSTANT_ID_3; +const uint _6 = SPIRV_CROSS_CONSTANT_ID_3; #ifndef SPIRV_CROSS_CONSTANT_ID_4 #define SPIRV_CROSS_CONSTANT_ID_4 14u #endif -const uint _5 = SPIRV_CROSS_CONSTANT_ID_4; +const uint _7 = SPIRV_CROSS_CONSTANT_ID_4; layout(local_size_x = 3, local_size_y = SPIRV_CROSS_CONSTANT_ID_1, local_size_z = SPIRV_CROSS_CONSTANT_ID_2) in; layout(binding = 0, std430) buffer SSBO { vec4 values[]; -} _8; +} _10; void main() { - _8.values[gl_GlobalInvocationID.x] += vec4(2.0); + _10.values[gl_GlobalInvocationID.x] += vec4(2.0); } diff --git a/reference/shaders-no-opt/asm/comp/local-size-id-override.vk.asm.comp.vk b/reference/shaders-no-opt/asm/comp/local-size-id-override.vk.asm.comp.vk index 0073fbee..72c491b9 100644 --- a/reference/shaders-no-opt/asm/comp/local-size-id-override.vk.asm.comp.vk +++ b/reference/shaders-no-opt/asm/comp/local-size-id-override.vk.asm.comp.vk @@ -1,16 +1,16 @@ #version 450 layout(local_size_x = 3, local_size_y_id = 1, local_size_z_id = 2) in; -layout(constant_id = 3) const uint _4 = 13u; -layout(constant_id = 4) const uint _5 = 14u; +layout(constant_id = 3) const uint _6 = 13u; +layout(constant_id = 4) const uint _7 = 14u; layout(set = 0, binding = 0, std430) buffer SSBO { vec4 values[]; -} _8; +} _10; void main() { - _8.values[gl_GlobalInvocationID.x] += vec4(2.0); + _10.values[gl_GlobalInvocationID.x] += vec4(2.0); } diff --git a/reference/shaders-no-opt/asm/comp/local-size-id.vk.asm.comp b/reference/shaders-no-opt/asm/comp/local-size-id.vk.asm.comp index 5c2a09d3..ae6c1f39 100644 --- a/reference/shaders-no-opt/asm/comp/local-size-id.vk.asm.comp +++ b/reference/shaders-no-opt/asm/comp/local-size-id.vk.asm.comp @@ -3,29 +3,29 @@ #ifndef SPIRV_CROSS_CONSTANT_ID_1 #define SPIRV_CROSS_CONSTANT_ID_1 11 #endif -const int _10 = SPIRV_CROSS_CONSTANT_ID_1; +const int _12 = SPIRV_CROSS_CONSTANT_ID_1; #ifndef SPIRV_CROSS_CONSTANT_ID_2 #define SPIRV_CROSS_CONSTANT_ID_2 12 #endif -const int _11 = SPIRV_CROSS_CONSTANT_ID_2; +const int _13 = SPIRV_CROSS_CONSTANT_ID_2; #ifndef SPIRV_CROSS_CONSTANT_ID_3 #define SPIRV_CROSS_CONSTANT_ID_3 13 #endif #ifndef SPIRV_CROSS_CONSTANT_ID_4 #define SPIRV_CROSS_CONSTANT_ID_4 14 #endif -const uint _29 = (uint(int(gl_WorkGroupSize.x)) + 3u); -const uvec3 _30 = uvec3(_29, int(gl_WorkGroupSize.y), 2u); +const uint _37 = (uint(int(gl_WorkGroupSize.x)) + 3u); +const uvec3 _38 = uvec3(_37, int(gl_WorkGroupSize.y), 2u); layout(local_size_x = SPIRV_CROSS_CONSTANT_ID_3, local_size_y = SPIRV_CROSS_CONSTANT_ID_4, local_size_z = 2) in; layout(binding = 0, std430) buffer SSBO { vec4 values[]; -} _8; +} _10; void main() { - _8.values[gl_GlobalInvocationID.x] = ((((_8.values[gl_GlobalInvocationID.x] + vec4(2.0)) + vec3(_30).xyzz) * float(int(gl_WorkGroupSize.x))) * float(int(gl_WorkGroupSize.y))) * float(int(2u)); + _10.values[gl_GlobalInvocationID.x] = ((((_10.values[gl_GlobalInvocationID.x] + vec4(2.0)) + vec3(_38).xyzz) * float(int(gl_WorkGroupSize.x))) * float(int(gl_WorkGroupSize.y))) * float(int(2u)); } diff --git a/reference/shaders-no-opt/asm/comp/local-size-id.vk.asm.comp.vk b/reference/shaders-no-opt/asm/comp/local-size-id.vk.asm.comp.vk index b6a78bdf..e4b9b29c 100644 --- a/reference/shaders-no-opt/asm/comp/local-size-id.vk.asm.comp.vk +++ b/reference/shaders-no-opt/asm/comp/local-size-id.vk.asm.comp.vk @@ -1,22 +1,22 @@ #version 450 layout(local_size_x_id = 3, local_size_y_id = 4, local_size_z = 2) in; -layout(constant_id = 1) const int _10 = 11; -layout(constant_id = 2) const int _11 = 12; -const uint _29 = (uint(int(gl_WorkGroupSize.x)) + 3u); -const uvec3 _30 = uvec3(_29, int(gl_WorkGroupSize.y), 2u); +layout(constant_id = 1) const int _12 = 11; +layout(constant_id = 2) const int _13 = 12; +const uint _37 = (uint(int(gl_WorkGroupSize.x)) + 3u); +const uvec3 _38 = uvec3(_37, int(gl_WorkGroupSize.y), 2u); layout(set = 0, binding = 0, std430) buffer SSBO { vec4 values[]; -} _8; +} _10; void main() { - vec3 _38 = vec3(_30); - float _41 = float(int(gl_WorkGroupSize.x)); - float _42 = float(int(gl_WorkGroupSize.y)); - float _43 = float(int(2u)); - _8.values[gl_GlobalInvocationID.x] = ((((_8.values[gl_GlobalInvocationID.x] + vec4(2.0)) + _38.xyzz) * _41) * _42) * _43; + vec3 _39 = vec3(_38); + float _42 = float(int(gl_WorkGroupSize.x)); + float _43 = float(int(gl_WorkGroupSize.y)); + float _44 = float(int(2u)); + _10.values[gl_GlobalInvocationID.x] = ((((_10.values[gl_GlobalInvocationID.x] + vec4(2.0)) + _39.xyzz) * _42) * _43) * _44; } diff --git a/reference/shaders-no-opt/asm/comp/loop-variable-early-read-with-initializer.asm.comp b/reference/shaders-no-opt/asm/comp/loop-variable-early-read-with-initializer.asm.comp index c34852f7..ef1984b4 100644 --- a/reference/shaders-no-opt/asm/comp/loop-variable-early-read-with-initializer.asm.comp +++ b/reference/shaders-no-opt/asm/comp/loop-variable-early-read-with-initializer.asm.comp @@ -1,94 +1,94 @@ #version 450 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; -layout(binding = 4, std430) buffer _2_12 +layout(binding = 4, std430) buffer _1_31 { uint _m0[1]; -} _12; +} _31; -layout(binding = 1, std430) buffer _2_9 +layout(binding = 1, std430) buffer _1_28 { uint _m0[1]; -} _9; +} _28; -layout(binding = 2, std430) buffer _2_10 +layout(binding = 2, std430) buffer _1_29 { uint _m0[1]; -} _10; +} _29; -layout(binding = 3, std430) buffer _2_11 +layout(binding = 3, std430) buffer _1_30 { uint _m0[1]; -} _11; +} _30; -layout(binding = 0, std430) buffer _4_8 +layout(binding = 0, std430) buffer _4_27 { uint _m0[2]; -} _8; +} _27; -layout(binding = 5, std430) buffer _6_13 +layout(binding = 5, std430) buffer _6_32 { uint _m0[11]; -} _13; +} _32; void main() { - uint _43 = 0u; - uint _44 = 0u; - uint _45 = 0u; - uint _46 = 0u; - uint _47 = 0u; - _13._m0[0u] = 8u; - uint _50 = 0u + 1u; - uint _42 = _50; + uint _55 = 0u; + uint _56 = 0u; + uint _57 = 0u; + uint _58 = 0u; + uint _59 = 0u; + _32._m0[0u] = 8u; + uint _62 = 0u + 1u; + uint _54 = _62; for (;;) { - _13._m0[_42] = 9u; - _42++; - uint _55 = _43; - _43 = _55 + 1u; - if (_8._m0[_55] == 1u) + _32._m0[_54] = 9u; + _54++; + uint _66 = _55; + _55 = _66 + 1u; + if (_27._m0[_66] == 1u) { - _13._m0[_42] = 12u; - _42++; + _32._m0[_54] = 12u; + _54++; return; } else { - _13._m0[_42] = 13u; - _42++; - uint _70 = _44; - _44 = _70 + 1u; - if (_9._m0[_70] == 1u) + _32._m0[_54] = 13u; + _54++; + uint _77 = _56; + _56 = _77 + 1u; + if (_28._m0[_77] == 1u) { - _13._m0[_42] = 11u; - _42++; - _13._m0[_42] = 14u; - _42++; - _45++; + _32._m0[_54] = 11u; + _54++; + _32._m0[_54] = 14u; + _54++; + _57++; do { - _13._m0[_42] = 16u; - _42++; + _32._m0[_54] = 16u; + _54++; break; } while(false); - _13._m0[_42] = 15u; - _42++; - uint _94 = _46; - _46 = _94 + 1u; - if (_11._m0[_94] == 1u) + _32._m0[_54] = 15u; + _54++; + uint _98 = _58; + _58 = _98 + 1u; + if (_30._m0[_98] == 1u) { } else { - _13._m0[_42] = 19u; - _42++; + _32._m0[_54] = 19u; + _54++; } - _13._m0[_42] = 17u; - _42++; - uint _108 = _47; - _47 = _108 + 1u; - if (_12._m0[_108] == 1u) + _32._m0[_54] = 17u; + _54++; + uint _109 = _59; + _59 = _109 + 1u; + if (_31._m0[_109] == 1u) { continue; } diff --git a/reference/shaders-no-opt/asm/comp/loop-variable-early-read-with-undef.asm.comp b/reference/shaders-no-opt/asm/comp/loop-variable-early-read-with-undef.asm.comp index 08f3b44e..140edd79 100644 --- a/reference/shaders-no-opt/asm/comp/loop-variable-early-read-with-undef.asm.comp +++ b/reference/shaders-no-opt/asm/comp/loop-variable-early-read-with-undef.asm.comp @@ -1,95 +1,95 @@ #version 450 layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; -layout(binding = 4, std430) buffer _2_12 +layout(binding = 4, std430) buffer _1_31 { uint _m0[1]; -} _12; +} _31; -layout(binding = 1, std430) buffer _2_9 +layout(binding = 1, std430) buffer _1_28 { uint _m0[1]; -} _9; +} _28; -layout(binding = 2, std430) buffer _2_10 +layout(binding = 2, std430) buffer _1_29 { uint _m0[1]; -} _10; +} _29; -layout(binding = 3, std430) buffer _2_11 +layout(binding = 3, std430) buffer _1_30 { uint _m0[1]; -} _11; +} _30; -layout(binding = 0, std430) buffer _4_8 +layout(binding = 0, std430) buffer _4_27 { uint _m0[2]; -} _8; +} _27; -layout(binding = 5, std430) buffer _6_13 +layout(binding = 5, std430) buffer _6_32 { uint _m0[11]; -} _13; +} _32; void main() { - uint _43 = 0u; - uint _44 = 0u; - uint _45 = 0u; - uint _46 = 0u; - uint _47 = 0u; + uint _55 = 0u; + uint _56 = 0u; + uint _57 = 0u; + uint _58 = 0u; + uint _59 = 0u; uint _115; - _13._m0[_115] = 8u; - uint _50 = _115 + 1u; - uint _42 = _50; + _32._m0[_115] = 8u; + uint _62 = _115 + 1u; + uint _54 = _62; for (;;) { - _13._m0[_42] = 9u; - _42++; - uint _55 = _43; - _43 = _55 + 1u; - if (_8._m0[_55] == 1u) + _32._m0[_54] = 9u; + _54++; + uint _66 = _55; + _55 = _66 + 1u; + if (_27._m0[_66] == 1u) { - _13._m0[_42] = 12u; - _42++; + _32._m0[_54] = 12u; + _54++; return; } else { - _13._m0[_42] = 13u; - _42++; - uint _70 = _44; - _44 = _70 + 1u; - if (_9._m0[_70] == 1u) + _32._m0[_54] = 13u; + _54++; + uint _77 = _56; + _56 = _77 + 1u; + if (_28._m0[_77] == 1u) { - _13._m0[_42] = 11u; - _42++; - _13._m0[_42] = 14u; - _42++; - _45++; + _32._m0[_54] = 11u; + _54++; + _32._m0[_54] = 14u; + _54++; + _57++; do { - _13._m0[_42] = 16u; - _42++; + _32._m0[_54] = 16u; + _54++; break; } while(false); - _13._m0[_42] = 15u; - _42++; - uint _94 = _46; - _46 = _94 + 1u; - if (_11._m0[_94] == 1u) + _32._m0[_54] = 15u; + _54++; + uint _98 = _58; + _58 = _98 + 1u; + if (_30._m0[_98] == 1u) { } else { - _13._m0[_42] = 19u; - _42++; + _32._m0[_54] = 19u; + _54++; } - _13._m0[_42] = 17u; - _42++; - uint _108 = _47; - _47 = _108 + 1u; - if (_12._m0[_108] == 1u) + _32._m0[_54] = 17u; + _54++; + uint _109 = _59; + _59 = _109 + 1u; + if (_31._m0[_109] == 1u) { continue; } diff --git a/reference/shaders-no-opt/asm/comp/multi-break-switch-out-of-loop.asm.comp b/reference/shaders-no-opt/asm/comp/multi-break-switch-out-of-loop.asm.comp index 7de95ae6..58b2b7a5 100644 --- a/reference/shaders-no-opt/asm/comp/multi-break-switch-out-of-loop.asm.comp +++ b/reference/shaders-no-opt/asm/comp/multi-break-switch-out-of-loop.asm.comp @@ -4,45 +4,45 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; layout(binding = 0, std140) uniform UBO { int v; -} _6; +} _8; void main() { uint count = 0u; for (int i = 0; i < 4; i++) { - bool _31_ladder_break = false; + bool _15_ladder_break = false; do { - bool _33_ladder_break = false; + bool _23_ladder_break = false; do { - bool _35_ladder_break = false; + bool _25_ladder_break = false; do { - if (_6.v == 20) + if (_8.v == 20) { - _35_ladder_break = true; - _33_ladder_break = true; - _31_ladder_break = true; + _25_ladder_break = true; + _23_ladder_break = true; + _15_ladder_break = true; break; } break; } while(false); - if (_35_ladder_break) + if (_25_ladder_break) { break; } break; } while(false); - if (_33_ladder_break) + if (_23_ladder_break) { break; } count++; break; } while(false); - if (_31_ladder_break) + if (_15_ladder_break) { break; } diff --git a/reference/shaders-no-opt/asm/comp/nonuniform-bracket-handling.vk.nocompat.asm.comp.vk b/reference/shaders-no-opt/asm/comp/nonuniform-bracket-handling.vk.nocompat.asm.comp.vk index 9b7de062..bd7dcf0e 100644 --- a/reference/shaders-no-opt/asm/comp/nonuniform-bracket-handling.vk.nocompat.asm.comp.vk +++ b/reference/shaders-no-opt/asm/comp/nonuniform-bracket-handling.vk.nocompat.asm.comp.vk @@ -7,7 +7,7 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; layout(set = 0, binding = 0, std430) restrict readonly buffer SSBO_Offsets { uvec2 _m0[]; -} _7; +} _13; layout(push_constant, std430) uniform RootConstants { @@ -21,35 +21,35 @@ layout(push_constant, std430) uniform RootConstants uint _m7; } registers; -layout(set = 1, binding = 0) uniform samplerBuffer _8[]; -layout(set = 4, binding = 0, r32f) uniform imageBuffer _9[]; -layout(set = 4, binding = 0, r32ui) uniform uimageBuffer _10[]; +layout(set = 1, binding = 0) uniform samplerBuffer _18[]; +layout(set = 4, binding = 0, r32f) uniform imageBuffer _22[]; +layout(set = 4, binding = 0, r32ui) uniform uimageBuffer _26[]; void main() { - uint _61 = registers._m4 + 2u; - uint _64 = subgroupBroadcastFirst(_61); - uint _71 = subgroupBroadcastFirst(registers._m4); - uint _76 = registers._m1 + 1u; - uint _79 = subgroupBroadcastFirst(_76); - uint _88 = gl_GlobalInvocationID.x + 4u; - uint _99 = gl_GlobalInvocationID.x + 1024u; - imageStore(_9[registers._m4], int((_99 < _7._m0[_71].y) ? (_99 + _7._m0[_71].x) : 4294967295u), vec4(imageLoad(_9[registers._m4], int((_88 < _7._m0[_71].y) ? (_88 + _7._m0[_71].x) : 4294967295u)))); - uint _106 = gl_GlobalInvocationID.x + 2u; - uint _117 = gl_GlobalInvocationID.x + 2048u; - imageStore(_9[registers._m4], int((_117 < _7._m0[_71].y) ? (_117 + _7._m0[_71].x) : 4294967295u), vec4(texelFetch(_8[_76], int((_106 < _7._m0[_79].y) ? (_106 + _7._m0[_79].x) : 4294967295u)))); - uint _130 = imageAtomicAdd(_10[_61], int((gl_GlobalInvocationID.x < _7._m0[_64].y) ? (gl_GlobalInvocationID.x + _7._m0[_64].x) : 4294967295u), 40u); - uint _137 = imageAtomicCompSwap(_10[_61], int((gl_GlobalInvocationID.y < _7._m0[_64].y) ? (gl_GlobalInvocationID.y + _7._m0[_64].x) : 4294967295u), 40u, 50u); - imageStore(_9[registers._m4], int((0u < _7._m0[_71].y) ? (0u + _7._m0[_71].x) : 4294967295u), vec4(float(_7._m0[_71].y))); - imageStore(_9[registers._m4], int((1u < _7._m0[_71].y) ? (1u + _7._m0[_71].x) : 4294967295u), vec4(float(_7._m0[_79].y))); - uint _11 = registers._m4 + (gl_GlobalInvocationID.z + 0u); - imageStore(_9[nonuniformEXT(_11)], int((_99 < _7._m0[_11].y) ? (_99 + _7._m0[_11].x) : 4294967295u), vec4(imageLoad(_9[nonuniformEXT(_11)], int((_88 < _7._m0[_11].y) ? (_88 + _7._m0[_11].x) : 4294967295u)))); - uint _13 = registers._m1 + (gl_GlobalInvocationID.z + 0u); - imageStore(_9[nonuniformEXT(_11)], int((_117 < _7._m0[_11].y) ? (_117 + _7._m0[_11].x) : 4294967295u), vec4(texelFetch(_8[nonuniformEXT(_13)], int((_88 < _7._m0[_13].y) ? (_88 + _7._m0[_13].x) : 4294967295u)))); - uint _15 = registers._m4 + (gl_GlobalInvocationID.z + 0u); - uint _209 = imageAtomicAdd(_10[nonuniformEXT(_15)], int((gl_GlobalInvocationID.y < _7._m0[_15].y) ? (gl_GlobalInvocationID.y + _7._m0[_15].x) : 4294967295u), 40u); - uint _215 = imageAtomicCompSwap(_10[nonuniformEXT(_15)], int((gl_GlobalInvocationID.y < _7._m0[_15].y) ? (gl_GlobalInvocationID.y + _7._m0[_15].x) : 4294967295u), 40u, 70u); - imageStore(_9[registers._m4], int((2u < _7._m0[_71].y) ? (2u + _7._m0[_71].x) : 4294967295u), vec4(float(_7._m0[_11].y))); - imageStore(_9[registers._m4], int((3u < _7._m0[_71].y) ? (3u + _7._m0[_71].x) : 4294967295u), vec4(float(_7._m0[_13].y))); + uint _33 = registers._m4 + 2u; + uint _36 = subgroupBroadcastFirst(_33); + uint _47 = subgroupBroadcastFirst(registers._m4); + uint _55 = registers._m1 + 1u; + uint _57 = subgroupBroadcastFirst(_55); + uint _70 = gl_GlobalInvocationID.x + 4u; + uint _84 = gl_GlobalInvocationID.x + 1024u; + imageStore(_22[registers._m4], int((_84 < _13._m0[_47].y) ? (_84 + _13._m0[_47].x) : 4294967295u), vec4(imageLoad(_22[registers._m4], int((_70 < _13._m0[_47].y) ? (_70 + _13._m0[_47].x) : 4294967295u)))); + uint _92 = gl_GlobalInvocationID.x + 2u; + uint _103 = gl_GlobalInvocationID.x + 2048u; + imageStore(_22[registers._m4], int((_103 < _13._m0[_47].y) ? (_103 + _13._m0[_47].x) : 4294967295u), vec4(texelFetch(_18[_55], int((_92 < _13._m0[_57].y) ? (_92 + _13._m0[_57].x) : 4294967295u)))); + uint _118 = imageAtomicAdd(_26[_33], int((gl_GlobalInvocationID.x < _13._m0[_36].y) ? (gl_GlobalInvocationID.x + _13._m0[_36].x) : 4294967295u), 40u); + uint _126 = imageAtomicCompSwap(_26[_33], int((gl_GlobalInvocationID.y < _13._m0[_36].y) ? (gl_GlobalInvocationID.y + _13._m0[_36].x) : 4294967295u), 40u, 50u); + imageStore(_22[registers._m4], int((0u < _13._m0[_47].y) ? (0u + _13._m0[_47].x) : 4294967295u), vec4(float(_13._m0[_47].y))); + imageStore(_22[registers._m4], int((1u < _13._m0[_47].y) ? (1u + _13._m0[_47].x) : 4294967295u), vec4(float(_13._m0[_57].y))); + uint _148 = registers._m4 + (gl_GlobalInvocationID.z + 0u); + imageStore(_22[nonuniformEXT(_148)], int((_84 < _13._m0[_148].y) ? (_84 + _13._m0[_148].x) : 4294967295u), vec4(imageLoad(_22[nonuniformEXT(_148)], int((_70 < _13._m0[_148].y) ? (_70 + _13._m0[_148].x) : 4294967295u)))); + uint _172 = registers._m1 + (gl_GlobalInvocationID.z + 0u); + imageStore(_22[nonuniformEXT(_148)], int((_103 < _13._m0[_148].y) ? (_103 + _13._m0[_148].x) : 4294967295u), vec4(texelFetch(_18[nonuniformEXT(_172)], int((_70 < _13._m0[_172].y) ? (_70 + _13._m0[_172].x) : 4294967295u)))); + uint _196 = registers._m4 + (gl_GlobalInvocationID.z + 0u); + uint _206 = imageAtomicAdd(_26[nonuniformEXT(_196)], int((gl_GlobalInvocationID.y < _13._m0[_196].y) ? (gl_GlobalInvocationID.y + _13._m0[_196].x) : 4294967295u), 40u); + uint _213 = imageAtomicCompSwap(_26[nonuniformEXT(_196)], int((gl_GlobalInvocationID.y < _13._m0[_196].y) ? (gl_GlobalInvocationID.y + _13._m0[_196].x) : 4294967295u), 40u, 70u); + imageStore(_22[registers._m4], int((2u < _13._m0[_47].y) ? (2u + _13._m0[_47].x) : 4294967295u), vec4(float(_13._m0[_148].y))); + imageStore(_22[registers._m4], int((3u < _13._m0[_47].y) ? (3u + _13._m0[_47].x) : 4294967295u), vec4(float(_13._m0[_172].y))); } diff --git a/reference/shaders-no-opt/asm/comp/ray-query-force-temporary-rtas.spv14.asm.vk.nocompat.comp.vk b/reference/shaders-no-opt/asm/comp/ray-query-force-temporary-rtas.spv14.asm.vk.nocompat.comp.vk index fa46c715..7fa55534 100644 --- a/reference/shaders-no-opt/asm/comp/ray-query-force-temporary-rtas.spv14.asm.vk.nocompat.comp.vk +++ b/reference/shaders-no-opt/asm/comp/ray-query-force-temporary-rtas.spv14.asm.vk.nocompat.comp.vk @@ -6,23 +6,23 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; layout(set = 0, binding = 0, std430) readonly buffer Buf { uvec2 vas[1024]; -} _3; +} _4; layout(push_constant, std430) uniform Registers { uint index; -} _4; +} _10; rayQueryEXT rq; void main() { - uvec2 _41; + uvec2 _37; do { - uvec2 va = _3.vas[_4.index]; - _41 = _3.vas[_4.index]; + uvec2 va = _4.vas[_10.index]; + _37 = _4.vas[_10.index]; } while (false); - rayQueryInitializeEXT(rq, accelerationStructureEXT(_41), 0u, 0u, vec3(0.0), 0.0, vec3(0.0), 0.0); + rayQueryInitializeEXT(rq, accelerationStructureEXT(_37), 0u, 0u, vec3(0.0), 0.0, vec3(0.0), 0.0); } diff --git a/reference/shaders-no-opt/asm/comp/spec-constant-name-aliasing.vk.asm.comp b/reference/shaders-no-opt/asm/comp/spec-constant-name-aliasing.vk.asm.comp index e7b9dbf3..07aa4e5b 100644 --- a/reference/shaders-no-opt/asm/comp/spec-constant-name-aliasing.vk.asm.comp +++ b/reference/shaders-no-opt/asm/comp/spec-constant-name-aliasing.vk.asm.comp @@ -35,10 +35,10 @@ const int A_11 = (A_10 + A_5); layout(binding = 0, std430) buffer SSBO { int values[]; -} _5; +} _7; void main() { - _5.values[gl_GlobalInvocationID.x] = A_11; + _7.values[gl_GlobalInvocationID.x] = A_11; } diff --git a/reference/shaders-no-opt/asm/comp/spec-constant-name-aliasing.vk.asm.comp.vk b/reference/shaders-no-opt/asm/comp/spec-constant-name-aliasing.vk.asm.comp.vk index c31d0787..9e5fa2fe 100644 --- a/reference/shaders-no-opt/asm/comp/spec-constant-name-aliasing.vk.asm.comp.vk +++ b/reference/shaders-no-opt/asm/comp/spec-constant-name-aliasing.vk.asm.comp.vk @@ -17,10 +17,10 @@ const int A_11 = (A_10 + A_5); layout(set = 0, binding = 0, std430) buffer SSBO { int values[]; -} _5; +} _7; void main() { - _5.values[gl_GlobalInvocationID.x] = A_11; + _7.values[gl_GlobalInvocationID.x] = A_11; } diff --git a/reference/shaders-no-opt/asm/comp/spec-constant-op-convert-sign.asm.comp b/reference/shaders-no-opt/asm/comp/spec-constant-op-convert-sign.asm.comp index 50ca0fbd..fd0ff5b3 100644 --- a/reference/shaders-no-opt/asm/comp/spec-constant-op-convert-sign.asm.comp +++ b/reference/shaders-no-opt/asm/comp/spec-constant-op-convert-sign.asm.comp @@ -20,20 +20,20 @@ const int64_t ConstantInt64_1 = int64_t(ConstantInt); const int64_t ConstantInt64_2 = int64_t(int(ConstantUint)); const uint64_t ConstantUint64_1 = uint64_t(ConstantInt); const uint64_t ConstantUint64_2 = uint64_t(int(ConstantUint)); -const int64_t _20 = (ConstantInt64_1 + ConstantInt64_2); -const uint64_t _21 = (ConstantUint64_1 + ConstantUint64_2); -const int _22 = int(_20); -const uint _23 = uint(_21); +const int64_t _21 = (ConstantInt64_1 + ConstantInt64_2); +const uint64_t _23 = (ConstantUint64_1 + ConstantUint64_2); +const int _24 = int(_21); +const uint _25 = uint(_23); layout(binding = 0, std430) buffer SSBO { int s64; uint u64; -} _4; +} _6; void main() { - _4.s64 = _22; - _4.u64 = _23; + _6.s64 = _24; + _6.u64 = _25; } diff --git a/reference/shaders-no-opt/asm/comp/storage-buffer-basic.asm.comp b/reference/shaders-no-opt/asm/comp/storage-buffer-basic.asm.comp index 482cfd8a..fcbd8504 100644 --- a/reference/shaders-no-opt/asm/comp/storage-buffer-basic.asm.comp +++ b/reference/shaders-no-opt/asm/comp/storage-buffer-basic.asm.comp @@ -9,20 +9,20 @@ layout(local_size_x = SPIRV_CROSS_CONSTANT_ID_0, local_size_y = 2, local_size_z = SPIRV_CROSS_CONSTANT_ID_2) in; -layout(binding = 0, std430) buffer _6_8 +layout(binding = 0, std430) buffer _3_20 { float _m0[]; -} _8; +} _20; -layout(binding = 1, std430) buffer _6_9 +layout(binding = 1, std430) buffer _3_21 { float _m0[]; -} _9; +} _21; -uvec3 _22 = gl_WorkGroupSize; +uvec3 _19 = gl_WorkGroupSize; void main() { - _8._m0[gl_WorkGroupID.x] = _9._m0[gl_WorkGroupID.x] + _8._m0[gl_WorkGroupID.x]; + _20._m0[gl_WorkGroupID.x] = _21._m0[gl_WorkGroupID.x] + _20._m0[gl_WorkGroupID.x]; } diff --git a/reference/shaders-no-opt/asm/comp/temorary-access-terminator.vk.nocompat.asm.comp.vk b/reference/shaders-no-opt/asm/comp/temorary-access-terminator.vk.nocompat.asm.comp.vk index 22834fa8..63fa0e65 100644 --- a/reference/shaders-no-opt/asm/comp/temorary-access-terminator.vk.nocompat.asm.comp.vk +++ b/reference/shaders-no-opt/asm/comp/temorary-access-terminator.vk.nocompat.asm.comp.vk @@ -2,17 +2,17 @@ #extension GL_KHR_shader_subgroup_ballot : require layout(local_size_x = 64, local_size_y = 1, local_size_z = 1) in; -layout(set = 0, binding = 0) uniform usamplerBuffer _4; -layout(set = 0, binding = 0, r32ui) uniform writeonly uimageBuffer _5; +layout(set = 0, binding = 0) uniform usamplerBuffer _8; +layout(set = 0, binding = 0, r32ui) uniform writeonly uimageBuffer _11; -uvec4 WaveMatch(uint _45) +uvec4 WaveMatch(uint _25) { - uvec4 _52; + uvec4 _35; for (;;) { - bool _51 = _45 == subgroupBroadcastFirst(_45); - _52 = subgroupBallot(_51); - if (_51) + bool _34 = _25 == subgroupBroadcastFirst(_25); + _35 = subgroupBallot(_34); + if (_34) { break; } @@ -21,16 +21,16 @@ uvec4 WaveMatch(uint _45) continue; } } - return _52; + return _35; } void main() { - uvec4 _32 = WaveMatch(texelFetch(_4, int(gl_GlobalInvocationID.x)).x); - uint _37 = gl_GlobalInvocationID.x * 4u; - imageStore(_5, int(_37), uvec4(_32.x)); - imageStore(_5, int(_37 + 1u), uvec4(_32.y)); - imageStore(_5, int(_37 + 2u), uvec4(_32.z)); - imageStore(_5, int(_37 + 3u), uvec4(_32.w)); + uvec4 _37 = WaveMatch(texelFetch(_8, int(gl_GlobalInvocationID.x)).x); + uint _42 = gl_GlobalInvocationID.x * 4u; + imageStore(_11, int(_42), uvec4(_37.x)); + imageStore(_11, int(_42 + 1u), uvec4(_37.y)); + imageStore(_11, int(_42 + 2u), uvec4(_37.z)); + imageStore(_11, int(_42 + 3u), uvec4(_37.w)); } diff --git a/reference/shaders-no-opt/asm/degenerate-selection-constructs.asm.frag b/reference/shaders-no-opt/asm/degenerate-selection-constructs.asm.frag index eb1cf0ca..a15a50ba 100644 --- a/reference/shaders-no-opt/asm/degenerate-selection-constructs.asm.frag +++ b/reference/shaders-no-opt/asm/degenerate-selection-constructs.asm.frag @@ -5,44 +5,44 @@ precision highp int; layout(binding = 1, std140) uniform buf1 { highp vec2 resolution; -} _9; +} _12; layout(binding = 0, std140) uniform buf0 { highp vec2 injectionSwitch; -} _13; +} _17; layout(location = 0) out highp vec4 _GLF_color; bool checkSwap(highp float a, highp float b) { - bool _153 = gl_FragCoord.y < (_9.resolution.y / 2.0); - highp float _160; - if (_153) + bool _33 = gl_FragCoord.y < (_12.resolution.y / 2.0); + highp float _38; + if (_33) { - _160 = a; + _38 = a; } else { - highp float _159 = 0.0; - _160 = _159; + highp float _355 = 0.0; + _38 = _355; } - bool _147; + bool _35; do { - highp float _168; - if (_153) + highp float _39; + if (_33) { - _168 = b; + _39 = b; } else { - highp float _167 = 0.0; - _168 = _167; + highp float _360 = 0.0; + _39 = _360; } - if (_153) + if (_33) { - _147 = _160 > _168; + _35 = _38 > _39; } if (true) { @@ -53,31 +53,31 @@ bool checkSwap(highp float a, highp float b) break; } } while(false); - highp float _180; - if (_153) + highp float _42; + if (_33) { - highp float _179 = 0.0; - _180 = _179; + highp float _367 = 0.0; + _42 = _367; } else { - _180 = a; + _42 = a; } - highp float _186; - if (_153) + highp float _43; + if (_33) { - highp float _185 = 0.0; - _186 = _185; + highp float _372 = 0.0; + _43 = _372; } else { - _186 = b; + _43 = b; } - if (!_153) + if (!_33) { - _147 = _180 < _186; + _35 = _42 < _43; } - return _147; + return _35; } void main() @@ -85,7 +85,7 @@ void main() highp float data[10]; for (int i = 0; i < 10; i++) { - data[i] = float(10 - i) * _13.injectionSwitch.y; + data[i] = float(10 - i) * _17.injectionSwitch.y; } for (int i_1 = 0; i_1 < 9; i_1++) { @@ -106,7 +106,7 @@ void main() } } } - if (gl_FragCoord.x < (_9.resolution.x / 2.0)) + if (gl_FragCoord.x < (_12.resolution.x / 2.0)) { _GLF_color = vec4(data[0] / 10.0, data[5] / 10.0, data[9] / 10.0, 1.0); } diff --git a/reference/shaders-no-opt/asm/frag/composite-insert-hoisted-temporaries-1.asm.frag b/reference/shaders-no-opt/asm/frag/composite-insert-hoisted-temporaries-1.asm.frag index f01a3282..007a8e04 100644 --- a/reference/shaders-no-opt/asm/frag/composite-insert-hoisted-temporaries-1.asm.frag +++ b/reference/shaders-no-opt/asm/frag/composite-insert-hoisted-temporaries-1.asm.frag @@ -3,25 +3,25 @@ layout(binding = 0, std430) readonly buffer SSBO { float values0[]; -} _5; +} _7; layout(binding = 1, std430) readonly buffer SSBO1 { float values1[]; -} _7; +} _9; layout(location = 0) out vec2 FragColor; void main() { - vec2 _27; - _27 = vec2(0.0); - vec2 _39; - vec2 _40; - vec2 _41; - for (int _30 = 0; _30 < 16; _39 = _27 * _27, _40 = _39, _40.x = _5.values0[_30], _41 = _40, _41.y = _7.values1[_30], _27 += _41, _30++) + vec2 _61; + _61 = vec2(0.0); + vec2 _34; + vec2 _35; + vec2 _36; + for (int _60 = 0; _60 < 16; _34 = _61 * _61, _35 = _34, _35.x = _7.values0[_60], _36 = _35, _36.y = _9.values1[_60], _61 += _36, _60++) { } - FragColor = _27; + FragColor = _61; } diff --git a/reference/shaders-no-opt/asm/frag/composite-insert-hoisted-temporaries-2.asm.frag b/reference/shaders-no-opt/asm/frag/composite-insert-hoisted-temporaries-2.asm.frag index 37b66f8c..8a994333 100644 --- a/reference/shaders-no-opt/asm/frag/composite-insert-hoisted-temporaries-2.asm.frag +++ b/reference/shaders-no-opt/asm/frag/composite-insert-hoisted-temporaries-2.asm.frag @@ -3,27 +3,27 @@ layout(binding = 0, std430) readonly buffer SSBO { float values0[]; -} _5; +} _7; layout(binding = 1, std430) readonly buffer SSBO1 { float values1[]; -} _7; +} _9; layout(location = 0) out vec2 FragColor; void main() { - vec2 _27; - _27 = vec2(0.0); - vec2 _42; - for (int _30 = 0; _30 < 16; _27 += _42, _30++) + vec2 _61; + _61 = vec2(0.0); + vec2 _37; + for (int _60 = 0; _60 < 16; _61 += _37, _60++) { - vec2 _40 = _27 * _27; - _40.x = _5.values0[_30]; - _42 = _40; - _42.y = _7.values1[_30]; + vec2 _35 = _61 * _61; + _35.x = _7.values0[_60]; + _37 = _35; + _37.y = _9.values1[_60]; } - FragColor = _27; + FragColor = _61; } diff --git a/reference/shaders-no-opt/asm/frag/composite-insert-inheritance.asm.frag b/reference/shaders-no-opt/asm/frag/composite-insert-inheritance.asm.frag index 11c1f4ca..c7648b95 100644 --- a/reference/shaders-no-opt/asm/frag/composite-insert-inheritance.asm.frag +++ b/reference/shaders-no-opt/asm/frag/composite-insert-inheritance.asm.frag @@ -2,7 +2,7 @@ precision mediump float; precision highp int; -vec4 _32; +vec4 _33; layout(location = 0) in vec4 vInput; layout(location = 0) out vec4 FragColor; @@ -16,21 +16,21 @@ void main() _38.z = 3.0; _38.w = 4.0; FragColor = _38; - vec4 _6 = _37; - _6.x = 1.0; - _6.y = 2.0; - _6.z = 3.0; - _6.w = 4.0; - FragColor = _6; + vec4 _8 = _37; + _8.x = 1.0; + _8.y = 2.0; + _8.z = 3.0; + _8.w = 4.0; + FragColor = _8; highp vec4 _42 = _37; _42.x = 1.0; - vec4 _10 = _42; - _10.y = 2.0; - highp vec4 _43 = _10; + vec4 _12 = _42; + _12.y = 2.0; + highp vec4 _43 = _12; _43.z = 3.0; - vec4 _11 = _43; - _11.w = 4.0; - FragColor = _11; + vec4 _13 = _43; + _13.w = 4.0; + FragColor = _13; highp vec4 _44 = _37; _44.x = 1.0; highp vec4 _45 = _44; diff --git a/reference/shaders-no-opt/asm/frag/demote-impure-function-call.vk.nocompat.asm.frag.vk b/reference/shaders-no-opt/asm/frag/demote-impure-function-call.vk.nocompat.asm.frag.vk index adde5fcb..271a739f 100644 --- a/reference/shaders-no-opt/asm/frag/demote-impure-function-call.vk.nocompat.asm.frag.vk +++ b/reference/shaders-no-opt/asm/frag/demote-impure-function-call.vk.nocompat.asm.frag.vk @@ -16,7 +16,7 @@ vec4 foobar(int a) void main() { int param = vA; - vec4 _25 = foobar(param); + vec4 _30 = foobar(param); FragColor = vec4(10.0); } diff --git a/reference/shaders-no-opt/asm/frag/discard-impure-function-call.asm.frag b/reference/shaders-no-opt/asm/frag/discard-impure-function-call.asm.frag index 0fe71f64..589e634c 100644 --- a/reference/shaders-no-opt/asm/frag/discard-impure-function-call.asm.frag +++ b/reference/shaders-no-opt/asm/frag/discard-impure-function-call.asm.frag @@ -15,7 +15,7 @@ vec4 foobar(int a) void main() { int param = vA; - vec4 _25 = foobar(param); + vec4 _31 = foobar(param); FragColor = vec4(10.0); } diff --git a/reference/shaders-no-opt/asm/frag/do-while-continue-phi.asm.invalid.frag b/reference/shaders-no-opt/asm/frag/do-while-continue-phi.asm.invalid.frag index 2024c302..f2b8e1bf 100644 --- a/reference/shaders-no-opt/asm/frag/do-while-continue-phi.asm.invalid.frag +++ b/reference/shaders-no-opt/asm/frag/do-while-continue-phi.asm.invalid.frag @@ -8,12 +8,12 @@ void main() { for (;;) { - bool _32; + bool _41; for (;;) { if (gl_FragCoord.x != gl_FragCoord.x) { - _32 = true; + _41 = true; break; } if (false) @@ -22,11 +22,11 @@ void main() } else { - _32 = false; + _41 = false; break; } } - if (_32) + if (_41) { break; } diff --git a/reference/shaders-no-opt/asm/frag/empty-struct-in-struct.asm.frag b/reference/shaders-no-opt/asm/frag/empty-struct-in-struct.asm.frag index 0d3958b5..d9c39677 100644 --- a/reference/shaders-no-opt/asm/frag/empty-struct-in-struct.asm.frag +++ b/reference/shaders-no-opt/asm/frag/empty-struct-in-struct.asm.frag @@ -22,10 +22,10 @@ float GetValue_1(EmptyStruct2Test self) void main() { - EmptyStructTest _25 = EmptyStructTest(0); + EmptyStructTest _27 = EmptyStructTest(0); EmptyStruct2Test emptyStruct; float value = GetValue(emptyStruct); - value = GetValue_1(EmptyStruct2Test(_25)); + value = GetValue_1(EmptyStruct2Test(_27)); value = GetValue_1(EmptyStruct2Test(EmptyStructTest(0))); } 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 index 16c7dc36..46f71b16 100644 --- 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 @@ -2,10 +2,10 @@ void main() { - int _13; - for (int _12 = 0; !(_12 == 16); _12 = _13) + int _12; + for (int _10 = 0; !(_10 == 16); _10 = _12) { - _13 = _12 + 1; + _12 = _10 + 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 index b4c06318..8507ba35 100644 --- 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 @@ -2,10 +2,10 @@ void main() { - int _13; - for (int _12 = 0; _12 != 16; _12 = _13) + int _12; + for (int _10 = 0; _10 != 16; _10 = _12) { - _13 = _12 + 1; + _12 = _10 + 1; } } diff --git a/reference/shaders-no-opt/asm/frag/for-loop-inverted-test.asm.frag b/reference/shaders-no-opt/asm/frag/for-loop-inverted-test.asm.frag index 16c7dc36..46f71b16 100644 --- a/reference/shaders-no-opt/asm/frag/for-loop-inverted-test.asm.frag +++ b/reference/shaders-no-opt/asm/frag/for-loop-inverted-test.asm.frag @@ -2,10 +2,10 @@ void main() { - int _13; - for (int _12 = 0; !(_12 == 16); _12 = _13) + int _12; + for (int _10 = 0; !(_10 == 16); _10 = _12) { - _13 = _12 + 1; + _12 = _10 + 1; } } diff --git a/reference/shaders-no-opt/asm/frag/inliner-dominator-inside-loop.asm.frag b/reference/shaders-no-opt/asm/frag/inliner-dominator-inside-loop.asm.frag index 874bc6de..4eb65b0f 100644 --- a/reference/shaders-no-opt/asm/frag/inliner-dominator-inside-loop.asm.frag +++ b/reference/shaders-no-opt/asm/frag/inliner-dominator-inside-loop.asm.frag @@ -61,19 +61,19 @@ struct Params vec4 LqmatFarTilingFactor; }; -VertexOutput _121; -SurfaceInput _122; -vec2 _123; -vec4 _124; -Surface _125; -vec4 _192; -vec4 _219; -vec4 _297; +VertexOutput _1509; +SurfaceInput _1510; +vec2 _1511; +vec4 _1512; +Surface _1531; +vec4 _1157; +vec4 _1203; +vec4 _1284; layout(binding = 0, std140) uniform CB0 { Globals CB0; -} _19; +} _24; uniform sampler2D SPIRV_Cross_CombinedDiffuseMapTextureDiffuseMapSampler; uniform sampler2D SPIRV_Cross_CombinedNormalMapTextureNormalMapSampler; @@ -97,117 +97,117 @@ layout(location = 0) out vec4 _entryPointOutput; void main() { - VertexOutput _128; - _128.HPosition = gl_FragCoord; - _128.Uv_EdgeDistance1 = IN_Uv_EdgeDistance1; - _128.UvStuds_EdgeDistance2 = IN_UvStuds_EdgeDistance2; - _128.Color = IN_Color; - _128.LightPosition_Fog = IN_LightPosition_Fog; - _128.View_Depth = IN_View_Depth; - _128.Normal_SpecPower = IN_Normal_SpecPower; - _128.Tangent = IN_Tangent; - _128.PosLightSpace_Reflectance = IN_PosLightSpace_Reflectance; - _128.studIndex = IN_studIndex; - SurfaceInput _147; - _147.Color = IN_Color; - _147.Uv = IN_Uv_EdgeDistance1.xy; - _147.UvStuds = IN_UvStuds_EdgeDistance2.xy; - _147.UvStuds.y = (fract(_147.UvStuds.y) + IN_studIndex) * 0.25; - float _160 = clamp(1.0 - (_128.View_Depth.w * 0.00333332992158830165863037109375), 0.0, 1.0); - float _163 = _128.View_Depth.w * _19.CB0.RefractionBias_FadeDistance_GlowFactor.y; - float _165 = clamp(1.0 - _163, 0.0, 1.0); - vec2 _166 = IN_Uv_EdgeDistance1.xy * 1.0; - bool _173; - vec4 _193; + VertexOutput _1378; + _1378.HPosition = gl_FragCoord; + _1378.Uv_EdgeDistance1 = IN_Uv_EdgeDistance1; + _1378.UvStuds_EdgeDistance2 = IN_UvStuds_EdgeDistance2; + _1378.Color = IN_Color; + _1378.LightPosition_Fog = IN_LightPosition_Fog; + _1378.View_Depth = IN_View_Depth; + _1378.Normal_SpecPower = IN_Normal_SpecPower; + _1378.Tangent = IN_Tangent; + _1378.PosLightSpace_Reflectance = IN_PosLightSpace_Reflectance; + _1378.studIndex = IN_studIndex; + SurfaceInput _1400; + _1400.Color = IN_Color; + _1400.Uv = IN_Uv_EdgeDistance1.xy; + _1400.UvStuds = IN_UvStuds_EdgeDistance2.xy; + _1400.UvStuds.y = (fract(_1400.UvStuds.y) + IN_studIndex) * 0.25; + float _987 = clamp(1.0 - (_1378.View_Depth.w * 0.00333332992158830165863037109375), 0.0, 1.0); + float _978 = _1378.View_Depth.w * _24.CB0.RefractionBias_FadeDistance_GlowFactor.y; + float _990 = clamp(1.0 - _978, 0.0, 1.0); + vec2 _1024 = IN_Uv_EdgeDistance1.xy * 1.0; + bool _1124; + vec4 _1517; for (;;) { - _173 = 0.0 == 0.0; - if (_173) + _1124 = 0.0 == 0.0; + if (_1124) { - _193 = texture(SPIRV_Cross_CombinedDiffuseMapTextureDiffuseMapSampler, _166); + _1517 = texture(SPIRV_Cross_CombinedDiffuseMapTextureDiffuseMapSampler, _1024); break; } else { - float _180 = 1.0 / (1.0 - 0.0); - _193 = mix(texture(SPIRV_Cross_CombinedDiffuseMapTextureDiffuseMapSampler, _166 * 0.25), texture(SPIRV_Cross_CombinedDiffuseMapTextureDiffuseMapSampler, _166), vec4(clamp((_160 * _180) - (0.0 * _180), 0.0, 1.0))); + float _1135 = 1.0 / (1.0 - 0.0); + _1517 = mix(texture(SPIRV_Cross_CombinedDiffuseMapTextureDiffuseMapSampler, _1024 * 0.25), texture(SPIRV_Cross_CombinedDiffuseMapTextureDiffuseMapSampler, _1024), vec4(clamp((_987 * _1135) - (0.0 * _1135), 0.0, 1.0))); break; } - _193 = _192; + _1517 = _1157; break; } - vec4 _220; + vec4 _1523; for (;;) { - if (_173) + if (_1124) { - _220 = texture(SPIRV_Cross_CombinedNormalMapTextureNormalMapSampler, _166); + _1523 = texture(SPIRV_Cross_CombinedNormalMapTextureNormalMapSampler, _1024); break; } else { - float _207 = 1.0 / (1.0 - 0.0); - _220 = mix(texture(SPIRV_Cross_CombinedNormalMapTextureNormalMapSampler, _166 * 0.25), texture(SPIRV_Cross_CombinedNormalMapTextureNormalMapSampler, _166), vec4(clamp((_165 * _207) - (0.0 * _207), 0.0, 1.0))); + float _1181 = 1.0 / (1.0 - 0.0); + _1523 = mix(texture(SPIRV_Cross_CombinedNormalMapTextureNormalMapSampler, _1024 * 0.25), texture(SPIRV_Cross_CombinedNormalMapTextureNormalMapSampler, _1024), vec4(clamp((_990 * _1181) - (0.0 * _1181), 0.0, 1.0))); break; } - _220 = _219; + _1523 = _1203; break; } - vec2 _223 = vec2(1.0); - vec2 _224 = (_220.wy * 2.0) - _223; - vec3 _232 = vec3(_224, sqrt(clamp(1.0 + dot(-_224, _224), 0.0, 1.0))); - vec4 _237 = texture(SPIRV_Cross_CombinedNormalDetailMapTextureNormalDetailMapSampler, _166 * 0.0); - vec2 _240 = (_237.wy * 2.0) - _223; - vec2 _252 = _232.xy + (vec3(_240, sqrt(clamp(1.0 + dot(-_240, _240), 0.0, 1.0))).xy * 0.0); - vec3 _253 = vec3(_252.x, _252.y, _232.z); - vec2 _255 = _253.xy * _165; - vec3 _256 = vec3(_255.x, _255.y, _253.z); - vec4 _268 = texture(SPIRV_Cross_CombinedStudsMapTextureStudsMapSampler, _147.UvStuds); - vec3 _271 = ((IN_Color.xyz * (_193 * 1.0).xyz) * (1.0 + (_256.x * 0.300000011920928955078125))) * (_268.x * 2.0); - vec4 _298; + vec2 _1212 = vec2(1.0); + vec2 _1213 = (_1523.wy * 2.0) - _1212; + vec3 _1224 = vec3(_1213, sqrt(clamp(1.0 + dot(-_1213, _1213), 0.0, 1.0))); + vec4 _1047 = texture(SPIRV_Cross_CombinedNormalDetailMapTextureNormalDetailMapSampler, _1024 * 0.0); + vec2 _1231 = (_1047.wy * 2.0) - _1212; + vec2 _1054 = _1224.xy + (vec3(_1231, sqrt(clamp(1.0 + dot(-_1231, _1231), 0.0, 1.0))).xy * 0.0); + vec3 _1056 = vec3(_1054.x, _1054.y, _1224.z); + vec2 _1060 = _1056.xy * _990; + vec3 _1062 = vec3(_1060.x, _1060.y, _1056.z); + vec4 _1080 = texture(SPIRV_Cross_CombinedStudsMapTextureStudsMapSampler, _1400.UvStuds); + vec3 _1085 = ((IN_Color.xyz * (_1517 * 1.0).xyz) * (1.0 + (_1062.x * 0.300000011920928955078125))) * (_1080.x * 2.0); + vec4 _1530; for (;;) { if (0.75 == 0.0) { - _298 = texture(SPIRV_Cross_CombinedSpecularMapTextureSpecularMapSampler, _166); + _1530 = texture(SPIRV_Cross_CombinedSpecularMapTextureSpecularMapSampler, _1024); break; } else { - float _285 = 1.0 / (1.0 - 0.75); - _298 = mix(texture(SPIRV_Cross_CombinedSpecularMapTextureSpecularMapSampler, _166 * 0.25), texture(SPIRV_Cross_CombinedSpecularMapTextureSpecularMapSampler, _166), vec4(clamp((_165 * _285) - (0.75 * _285), 0.0, 1.0))); + float _1262 = 1.0 / (1.0 - 0.75); + _1530 = mix(texture(SPIRV_Cross_CombinedSpecularMapTextureSpecularMapSampler, _1024 * 0.25), texture(SPIRV_Cross_CombinedSpecularMapTextureSpecularMapSampler, _1024), vec4(clamp((_990 * _1262) - (0.75 * _1262), 0.0, 1.0))); break; } - _298 = _297; + _1530 = _1284; break; } - vec2 _303 = mix(vec2(0.800000011920928955078125, 120.0), (_298.xy * vec2(2.0, 256.0)) + vec2(0.0, 0.00999999977648258209228515625), vec2(_165)); - Surface _304; - _304.albedo = _271; - _304.normal = _256; - float _306 = _303.x; - _304.specular = _306; - float _308 = _303.y; - _304.gloss = _308; - float _312 = (_298.xy.y * _165) * 0.0; - _304.reflectance = _312; - vec4 _318 = vec4(_271, _128.Color.w); - vec3 _329 = normalize(((IN_Tangent * _304.normal.x) + (cross(IN_Normal_SpecPower.xyz, IN_Tangent) * _304.normal.y)) + (IN_Normal_SpecPower.xyz * _304.normal.z)); - vec3 _332 = -_19.CB0.Lamp0Dir; - float _333 = dot(_329, _332); - float _357 = clamp(dot(step(_19.CB0.LightConfig3.xyz, abs(IN_LightPosition_Fog.xyz - _19.CB0.LightConfig2.xyz)), vec3(1.0)), 0.0, 1.0); - vec4 _368 = mix(texture(SPIRV_Cross_CombinedLightMapTextureLightMapSampler, IN_LightPosition_Fog.xyz.yzx - (IN_LightPosition_Fog.xyz.yzx * _357)), _19.CB0.LightBorder, vec4(_357)); - vec2 _376 = texture(SPIRV_Cross_CombinedShadowMapTextureShadowMapSampler, IN_PosLightSpace_Reflectance.xyz.xy).xy; - float _392 = (1.0 - (((step(_376.x, IN_PosLightSpace_Reflectance.xyz.z) * clamp(9.0 - (20.0 * abs(IN_PosLightSpace_Reflectance.xyz.z - 0.5)), 0.0, 1.0)) * _376.y) * _19.CB0.OutlineBrightness_ShadowInfo.w)) * _368.w; - vec3 _403 = mix(_318.xyz, texture(SPIRV_Cross_CombinedEnvironmentMapTextureEnvironmentMapSampler, reflect(-IN_View_Depth.xyz, _329)).xyz, vec3(_312)); - vec3 _422 = (((_19.CB0.AmbientColor + (((_19.CB0.Lamp0Color * clamp(_333, 0.0, 1.0)) + (_19.CB0.Lamp1Color * max(-_333, 0.0))) * _392)) + _368.xyz) * vec4(_403.x, _403.y, _403.z, _318.w).xyz) + (_19.CB0.Lamp0Color * (((step(0.0, _333) * _306) * _392) * pow(clamp(dot(_329, normalize(_332 + normalize(IN_View_Depth.xyz))), 0.0, 1.0), _308))); - vec4 _423 = vec4(_422.x, _422.y, _422.z, _124.w); - _423.w = vec4(_403.x, _403.y, _403.z, _318.w).w; - vec2 _435 = min(IN_Uv_EdgeDistance1.wz, IN_UvStuds_EdgeDistance2.wz); - float _439 = min(_435.x, _435.y) / _163; - vec3 _445 = _423.xyz * clamp((clamp((_163 * _19.CB0.OutlineBrightness_ShadowInfo.x) + _19.CB0.OutlineBrightness_ShadowInfo.y, 0.0, 1.0) * (1.5 - _439)) + _439, 0.0, 1.0); - vec4 _446 = vec4(_445.x, _445.y, _445.z, _423.w); - vec3 _453 = mix(_19.CB0.FogColor, _446.xyz, vec3(clamp(_128.LightPosition_Fog.w, 0.0, 1.0))); - _entryPointOutput = vec4(_453.x, _453.y, _453.z, _446.w); + vec2 _1098 = mix(vec2(0.800000011920928955078125, 120.0), (_1530.xy * vec2(2.0, 256.0)) + vec2(0.0, 0.00999999977648258209228515625), vec2(_990)); + Surface _1438; + _1438.albedo = _1085; + _1438.normal = _1062; + float _1442 = _1098.x; + _1438.specular = _1442; + float _1446 = _1098.y; + _1438.gloss = _1446; + float _1113 = (_1530.xy.y * _990) * 0.0; + _1438.reflectance = _1113; + vec4 _767 = vec4(_1085, _1378.Color.w); + vec3 _791 = normalize(((IN_Tangent * _1438.normal.x) + (cross(IN_Normal_SpecPower.xyz, IN_Tangent) * _1438.normal.y)) + (IN_Normal_SpecPower.xyz * _1438.normal.z)); + vec3 _795 = -_24.CB0.Lamp0Dir; + float _796 = dot(_791, _795); + float _1328 = clamp(dot(step(_24.CB0.LightConfig3.xyz, abs(IN_LightPosition_Fog.xyz - _24.CB0.LightConfig2.xyz)), vec3(1.0)), 0.0, 1.0); + vec4 _1325 = mix(texture(SPIRV_Cross_CombinedLightMapTextureLightMapSampler, IN_LightPosition_Fog.xyz.yzx - (IN_LightPosition_Fog.xyz.yzx * _1328)), _24.CB0.LightBorder, vec4(_1328)); + vec2 _1341 = texture(SPIRV_Cross_CombinedShadowMapTextureShadowMapSampler, IN_PosLightSpace_Reflectance.xyz.xy).xy; + float _1356 = (1.0 - (((step(_1341.x, IN_PosLightSpace_Reflectance.xyz.z) * clamp(9.0 - (20.0 * abs(IN_PosLightSpace_Reflectance.xyz.z - 0.5)), 0.0, 1.0)) * _1341.y) * _24.CB0.OutlineBrightness_ShadowInfo.w)) * _1325.w; + vec3 _846 = mix(_767.xyz, texture(SPIRV_Cross_CombinedEnvironmentMapTextureEnvironmentMapSampler, reflect(-IN_View_Depth.xyz, _791)).xyz, vec3(_1113)); + vec3 _884 = (((_24.CB0.AmbientColor + (((_24.CB0.Lamp0Color * clamp(_796, 0.0, 1.0)) + (_24.CB0.Lamp1Color * max(-_796, 0.0))) * _1356)) + _1325.xyz) * vec4(_846.x, _846.y, _846.z, _767.w).xyz) + (_24.CB0.Lamp0Color * (((step(0.0, _796) * _1442) * _1356) * pow(clamp(dot(_791, normalize(_795 + normalize(IN_View_Depth.xyz))), 0.0, 1.0), _1446))); + vec4 _886 = vec4(_884.x, _884.y, _884.z, _1512.w); + _886.w = vec4(_846.x, _846.y, _846.z, _767.w).w; + vec2 _909 = min(IN_Uv_EdgeDistance1.wz, IN_UvStuds_EdgeDistance2.wz); + float _916 = min(_909.x, _909.y) / _978; + vec3 _926 = _886.xyz * clamp((clamp((_978 * _24.CB0.OutlineBrightness_ShadowInfo.x) + _24.CB0.OutlineBrightness_ShadowInfo.y, 0.0, 1.0) * (1.5 - _916)) + _916, 0.0, 1.0); + vec4 _928 = vec4(_926.x, _926.y, _926.z, _886.w); + vec3 _938 = mix(_24.CB0.FogColor, _928.xyz, vec3(clamp(_1378.LightPosition_Fog.w, 0.0, 1.0))); + _entryPointOutput = vec4(_938.x, _938.y, _938.z, _928.w); } diff --git a/reference/shaders-no-opt/asm/frag/late-expression-invalidation-2.asm.frag b/reference/shaders-no-opt/asm/frag/late-expression-invalidation-2.asm.frag index ed853d01..c2f53d9c 100644 --- a/reference/shaders-no-opt/asm/frag/late-expression-invalidation-2.asm.frag +++ b/reference/shaders-no-opt/asm/frag/late-expression-invalidation-2.asm.frag @@ -17,17 +17,17 @@ precision highp int; layout(binding = 0, std140) uniform buf0 { highp vec2 resolution; -} _7; +} _9; layout(location = 0) out highp vec4 _GLF_color; int map[256]; -highp mat2x4 _60 = mat2x4(vec4(0.0), vec4(0.0)); +highp mat2x4 _558 = mat2x4(vec4(0.0), vec4(0.0)); void main() { - int _65 = 256 - 14; - int _68 = -_65; - highp vec2 pos = gl_FragCoord.xy / _7.resolution; + int _564 = 256 - 14; + int _566 = -_564; + highp vec2 pos = gl_FragCoord.xy / _9.resolution; ivec2 ipos = ivec2(int(pos.x * 16.0), int(pos.y * 16.0)); int i = 0; for (; i < 256; i++) @@ -41,60 +41,60 @@ void main() { v++; int directions = 0; - bool _98 = p.x > 0; - bool _111; - if (_98) + bool _77 = p.x > 0; + bool _92; + if (_77) { - _111 = map[(p.x - 2) + (p.y * 16)] == 0; + _92 = map[(p.x - 2) + (p.y * 16)] == 0; } else { - _111 = _98; + _92 = _77; } - if (_111) + if (_92) { directions++; } - bool _118 = p.y > 0; - bool _131; - if (_118) + bool _99 = p.y > 0; + bool _112; + if (_99) { - _131 = map[p.x + ((p.y - 2) * 16)] == 0; + _112 = map[p.x + ((p.y - 2) * 16)] == 0; } else { - _131 = _118; + _112 = _99; } - if (_131) + if (_112) { directions++; } - bool _138 = p.x < 14; - bool _151; - if (_138) + bool _120 = p.x < 14; + bool _133; + if (_120) { - _151 = map[(p.x + 2) + (p.y * 16)] == 0; + _133 = map[(p.x + 2) + (p.y * 16)] == 0; } else { - _151 = _138; + _133 = _120; } - if (_151) + if (_133) { directions++; } - int _156 = 256 - _68; - bool _159 = p.y < 14; - bool _172; - if (_159) + int _594 = 256 - _566; + bool _140 = p.y < 14; + bool _153; + if (_140) { - _172 = map[p.x + ((p.y + 2) * 16)] == 0; + _153 = map[p.x + ((p.y + 2) * 16)] == 0; } else { - _172 = _159; + _153 = _140; } - if (_172) + if (_153) { directions++; } @@ -104,15 +104,15 @@ void main() i = 0; for (;;) { - int _186 = i; - if (_186 < 8) + int _168 = i; + if (_168 < 8) { int j = 0; - _60 = mat2x4(vec4(0.0), vec4(0.0)); + _558 = mat2x4(vec4(0.0), vec4(0.0)); if (false) { - int _216 = i; - i = _216 + 1; + int _198 = i; + i = _198 + 1; continue; } else @@ -127,8 +127,8 @@ void main() canwalk = true; } } - int _216 = i; - i = _216 + 1; + int _198 = i; + i = _198 + 1; continue; } } @@ -143,26 +143,26 @@ void main() { int d = v % directions; v += directions; - bool _232 = d >= 0; - bool _238; - if (_232) + bool _216 = d >= 0; + bool _222; + if (_216) { - _238 = p.x > 0; + _222 = p.x > 0; } else { - _238 = _232; + _222 = _216; } - bool _251; - if (_238) + bool _235; + if (_222) { - _251 = map[(p.x - 2) + (p.y * 16)] == 0; + _235 = map[(p.x - 2) + (p.y * 16)] == 0; } else { - _251 = _238; + _235 = _222; } - if (_251) + if (_235) { d--; map[p.x + (p.y * 16)] = 1; @@ -170,26 +170,26 @@ void main() map[(p.x - 2) + (p.y * 16)] = 1; p.x -= 2; } - bool _284 = d >= 0; - bool _290; - if (_284) + bool _268 = d >= 0; + bool _274; + if (_268) { - _290 = p.y > 0; + _274 = p.y > 0; } else { - _290 = _284; + _274 = _268; } - bool _303; - if (_290) + bool _287; + if (_274) { - _303 = map[p.x + ((p.y - 2) * 16)] == 0; + _287 = map[p.x + ((p.y - 2) * 16)] == 0; } else { - _303 = _290; + _287 = _274; } - if (_303) + if (_287) { d--; map[p.x + (p.y * 16)] = 1; @@ -197,26 +197,26 @@ void main() map[p.x + ((p.y - 2) * 16)] = 1; p.y -= 2; } - bool _336 = d >= 0; - bool _342; - if (_336) + bool _320 = d >= 0; + bool _326; + if (_320) { - _342 = p.x < 14; + _326 = p.x < 14; } else { - _342 = _336; + _326 = _320; } - bool _355; - if (_342) + bool _339; + if (_326) { - _355 = map[(p.x + 2) + (p.y * 16)] == 0; + _339 = map[(p.x + 2) + (p.y * 16)] == 0; } else { - _355 = _342; + _339 = _326; } - if (_355) + if (_339) { d--; map[p.x + (p.y * 16)] = 1; @@ -224,26 +224,26 @@ void main() map[(p.x + 2) + (p.y * 16)] = 1; p.x += 2; } - bool _388 = d >= 0; - bool _394; - if (_388) + bool _372 = d >= 0; + bool _378; + if (_372) { - _394 = p.y < 14; + _378 = p.y < 14; } else { - _394 = _388; + _378 = _372; } - bool _407; - if (_394) + bool _391; + if (_378) { - _407 = map[p.x + ((p.y + 2) * 16)] == 0; + _391 = map[p.x + ((p.y + 2) * 16)] == 0; } else { - _407 = _394; + _391 = _378; } - if (_407) + if (_391) { d--; map[p.x + (p.y * 16)] = 1; diff --git a/reference/shaders-no-opt/asm/frag/ldexp-uint-exponent.asm.frag b/reference/shaders-no-opt/asm/frag/ldexp-uint-exponent.asm.frag index 4ce9b253..02955da3 100644 --- a/reference/shaders-no-opt/asm/frag/ldexp-uint-exponent.asm.frag +++ b/reference/shaders-no-opt/asm/frag/ldexp-uint-exponent.asm.frag @@ -6,8 +6,8 @@ layout(location = 0) out highp vec4 _GLF_color; void main() { - mediump uvec4 _4 = uvec4(bitCount(uvec4(1u))); - uvec4 hp_copy_4 = _4; - _GLF_color = ldexp(vec4(1.0), ivec4(hp_copy_4)); + mediump uvec4 _18 = uvec4(bitCount(uvec4(1u))); + uvec4 hp_copy_18 = _18; + _GLF_color = ldexp(vec4(1.0), ivec4(hp_copy_18)); } diff --git a/reference/shaders-no-opt/asm/frag/nonuniform-bracket-handling-2.vk.nocompat.asm.frag.vk b/reference/shaders-no-opt/asm/frag/nonuniform-bracket-handling-2.vk.nocompat.asm.frag.vk index d2f96467..83ae5767 100644 --- a/reference/shaders-no-opt/asm/frag/nonuniform-bracket-handling-2.vk.nocompat.asm.frag.vk +++ b/reference/shaders-no-opt/asm/frag/nonuniform-bracket-handling-2.vk.nocompat.asm.frag.vk @@ -4,7 +4,7 @@ layout(set = 0, binding = 0, std430) readonly buffer SSBO { uint indices[]; -} _8; +} _12; layout(set = 0, binding = 0) uniform sampler2D uSamplers[]; layout(set = 1, binding = 0) uniform sampler2D uSampler; @@ -14,7 +14,7 @@ layout(location = 0) in vec2 vUV; void main() { - FragColor = textureLod(uSamplers[nonuniformEXT(_8.indices[10])], vUV, 0.0); - FragColor += textureLod(uSampler, vUV, float(_8.indices[int(gl_FragCoord.y)])); + FragColor = textureLod(uSamplers[nonuniformEXT(_12.indices[10])], vUV, 0.0); + FragColor += textureLod(uSampler, vUV, float(_12.indices[int(gl_FragCoord.y)])); } diff --git a/reference/shaders-no-opt/asm/frag/nonuniform-qualifier-propagation.vk.nocompat.asm.frag.vk b/reference/shaders-no-opt/asm/frag/nonuniform-qualifier-propagation.vk.nocompat.asm.frag.vk index 289f576f..b71befdc 100644 --- a/reference/shaders-no-opt/asm/frag/nonuniform-qualifier-propagation.vk.nocompat.asm.frag.vk +++ b/reference/shaders-no-opt/asm/frag/nonuniform-qualifier-propagation.vk.nocompat.asm.frag.vk @@ -22,16 +22,16 @@ layout(location = 1) in vec2 vUV; void main() { int i = vIndex; - int _59 = i + 10; - int _64 = i + 40; - FragColor = texture(nonuniformEXT(sampler2D(uSamplers[_59], uSamps[_64])), vUV); - int _71 = i + 10; - FragColor = texture(uCombinedSamplers[nonuniformEXT(_71)], vUV); - int _77 = i + 20; - int _80 = i + 40; - FragColor += ubos[nonuniformEXT(_77)].v[_80]; - int _87 = i + 50; - int _90 = i + 60; - FragColor += ssbos[nonuniformEXT(_87)].v[_90]; + int _23 = i + 10; + int _34 = i + 40; + FragColor = texture(nonuniformEXT(sampler2D(uSamplers[_23], uSamps[_34])), vUV); + int _50 = i + 10; + FragColor = texture(uCombinedSamplers[nonuniformEXT(_50)], vUV); + int _66 = i + 20; + int _70 = i + 40; + FragColor += ubos[nonuniformEXT(_66)].v[_70]; + int _84 = i + 50; + int _88 = i + 60; + FragColor += ssbos[nonuniformEXT(_84)].v[_88]; } diff --git a/reference/shaders-no-opt/asm/frag/nonuniform-ssbo.nocompat.vk.asm.frag.vk b/reference/shaders-no-opt/asm/frag/nonuniform-ssbo.nocompat.vk.asm.frag.vk index 2d98ec5f..946481ea 100644 --- a/reference/shaders-no-opt/asm/frag/nonuniform-ssbo.nocompat.vk.asm.frag.vk +++ b/reference/shaders-no-opt/asm/frag/nonuniform-ssbo.nocompat.vk.asm.frag.vk @@ -13,12 +13,12 @@ layout(location = 0) out vec4 FragColor; void main() { int i = vIndex; - int _42 = i + 60; - int _45 = i + 70; - ssbos[nonuniformEXT(_42)].v[_45] = vec4(20.0); - int _48 = i + 100; - uint _49 = atomicAdd(ssbos[nonuniformEXT(_48)].counter, 100u); - int _51 = i; - FragColor.z += float(int(uint(ssbos[nonuniformEXT(_51)].v.length()))); + int _23 = i + 60; + int _28 = i + 70; + ssbos[nonuniformEXT(_23)].v[_28] = vec4(20.0); + int _36 = i + 100; + uint _43 = atomicAdd(ssbos[nonuniformEXT(_36)].counter, 100u); + int _47 = i; + FragColor.z += float(int(uint(ssbos[nonuniformEXT(_47)].v.length()))); } diff --git a/reference/shaders-no-opt/asm/frag/only-initializer-frag-depth.asm.frag b/reference/shaders-no-opt/asm/frag/only-initializer-frag-depth.asm.frag index 1041f711..73f77e0f 100644 --- a/reference/shaders-no-opt/asm/frag/only-initializer-frag-depth.asm.frag +++ b/reference/shaders-no-opt/asm/frag/only-initializer-frag-depth.asm.frag @@ -1,8 +1,8 @@ #version 450 -const float _3_init = 0.5; +const float _4_init = 0.5; void main() { - gl_FragDepth = _3_init; + gl_FragDepth = _4_init; } diff --git a/reference/shaders-no-opt/asm/frag/phi-alternative-precision.asm..vk.nocompat.frag.vk b/reference/shaders-no-opt/asm/frag/phi-alternative-precision.asm..vk.nocompat.frag.vk index ae9a8d69..3e1a5b04 100644 --- a/reference/shaders-no-opt/asm/frag/phi-alternative-precision.asm..vk.nocompat.frag.vk +++ b/reference/shaders-no-opt/asm/frag/phi-alternative-precision.asm..vk.nocompat.frag.vk @@ -5,25 +5,25 @@ layout(location = 0) out float FragColor; void main() { - float hp_copy_7; - mediump float _7; - int _22; - _22 = 0; - _7 = 0.0; + float hp_copy_39; + mediump float _39; + int _40; + _40 = 0; + _39 = 0.0; for (;;) { - hp_copy_7 = _7; - int _23 = _22 + 1; - if (_23 < 4) + hp_copy_39 = _39; + int _27 = _40 + 1; + if (_27 < 4) { - _22 = _23; - _7 = fma(_7, b, b); + _40 = _27; + _39 = fma(_39, b, b); } else { break; } } - FragColor = hp_copy_7 * 4.0; + FragColor = hp_copy_39 * 4.0; } diff --git a/reference/shaders-no-opt/asm/frag/phi.zero-initialize.asm.frag b/reference/shaders-no-opt/asm/frag/phi.zero-initialize.asm.frag index 59bac994..483b8acd 100644 --- a/reference/shaders-no-opt/asm/frag/phi.zero-initialize.asm.frag +++ b/reference/shaders-no-opt/asm/frag/phi.zero-initialize.asm.frag @@ -16,14 +16,14 @@ layout(location = 0) out vec4 FragColor; void main() { - int _39 = 0; + int _27 = 0; if (vColor.x > 10.0) { - _39 = 10; + _27 = 10; } else { - _39 = 20; + _27 = 20; } FragColor = vColor; } diff --git a/reference/shaders-no-opt/asm/frag/pixel-interlock-callstack.asm.frag b/reference/shaders-no-opt/asm/frag/pixel-interlock-callstack.asm.frag index 7ba3fd55..4380e7c7 100644 --- a/reference/shaders-no-opt/asm/frag/pixel-interlock-callstack.asm.frag +++ b/reference/shaders-no-opt/asm/frag/pixel-interlock-callstack.asm.frag @@ -17,23 +17,23 @@ layout(pixel_interlock_ordered) in; layout(binding = 1, std430) buffer SSBO1 { uint values1[]; -} _7; +} _11; layout(binding = 0, std430) buffer SSBO0 { uint values0[]; -} _9; +} _13; void callee2() { - int _31 = int(gl_FragCoord.x); - _7.values1[_31]++; + int _25 = int(gl_FragCoord.x); + _11.values1[_25]++; } void callee() { - int _39 = int(gl_FragCoord.x); - _9.values0[_39]++; + int _38 = int(gl_FragCoord.x); + _13.values0[_38]++; callee2(); } diff --git a/reference/shaders-no-opt/asm/frag/pixel-interlock-control-flow.asm.frag b/reference/shaders-no-opt/asm/frag/pixel-interlock-control-flow.asm.frag index 3575e02c..23a524e4 100644 --- a/reference/shaders-no-opt/asm/frag/pixel-interlock-control-flow.asm.frag +++ b/reference/shaders-no-opt/asm/frag/pixel-interlock-control-flow.asm.frag @@ -17,43 +17,43 @@ layout(pixel_interlock_ordered) in; layout(binding = 1, std430) buffer SSBO1 { uint values1[]; -} _7; +} _11; -layout(binding = 2, std430) buffer _12_13 +layout(binding = 2, std430) buffer _16_17 { uint _m0[]; -} _13; +} _17; layout(binding = 0, std430) buffer SSBO0 { uint values0[]; -} _9; +} _13; void callee2() { - int _44 = int(gl_FragCoord.x); - _7.values1[_44]++; + int _25 = int(gl_FragCoord.x); + _11.values1[_25]++; } void callee() { - int _52 = int(gl_FragCoord.x); - _9.values0[_52]++; + int _38 = int(gl_FragCoord.x); + _13.values0[_38]++; callee2(); if (true) { } } -void _35() +void _52() { - _13._m0[int(gl_FragCoord.x)] = 4u; + _17._m0[int(gl_FragCoord.x)] = 4u; } void spvMainInterlockedBody() { callee(); - _35(); + _52(); } void main() diff --git a/reference/shaders-no-opt/asm/frag/pixel-interlock-split-functions.asm.frag b/reference/shaders-no-opt/asm/frag/pixel-interlock-split-functions.asm.frag index 806eedf9..868cb1de 100644 --- a/reference/shaders-no-opt/asm/frag/pixel-interlock-split-functions.asm.frag +++ b/reference/shaders-no-opt/asm/frag/pixel-interlock-split-functions.asm.frag @@ -17,39 +17,39 @@ layout(pixel_interlock_ordered) in; layout(binding = 1, std430) buffer SSBO1 { uint values1[]; -} _7; +} _11; layout(binding = 0, std430) buffer SSBO0 { uint values0[]; -} _9; +} _13; void callee2() { - int _37 = int(gl_FragCoord.x); - _7.values1[_37]++; + int _25 = int(gl_FragCoord.x); + _11.values1[_25]++; } void callee() { - int _45 = int(gl_FragCoord.x); - _9.values0[_45]++; + int _38 = int(gl_FragCoord.x); + _13.values0[_38]++; callee2(); } -void _29() +void _46() { } -void _31() +void _48() { } void spvMainInterlockedBody() { callee(); - _29(); - _31(); + _46(); + _48(); } void main() diff --git a/reference/shaders-no-opt/asm/frag/relaxed-precision-inheritance-rules-hoisted-temporaries.asm.frag b/reference/shaders-no-opt/asm/frag/relaxed-precision-inheritance-rules-hoisted-temporaries.asm.frag index 6078efae..f2dd619f 100644 --- a/reference/shaders-no-opt/asm/frag/relaxed-precision-inheritance-rules-hoisted-temporaries.asm.frag +++ b/reference/shaders-no-opt/asm/frag/relaxed-precision-inheritance-rules-hoisted-temporaries.asm.frag @@ -10,11 +10,11 @@ void main() float a = vColor.x; highp float b = vColor.y; int i = 0; - float _14; - highp float hp_copy_14; - float _15; - highp float hp_copy_15; - for (; i < 4; i++, _14 = a, hp_copy_14 = _14, _15 = a * _14, hp_copy_15 = _15, b += (hp_copy_15 * hp_copy_14)) + float _44; + highp float hp_copy_44; + float _45; + highp float hp_copy_45; + for (; i < 4; i++, _44 = a, hp_copy_44 = _44, _45 = a * _44, hp_copy_45 = _45, b += (hp_copy_45 * hp_copy_44)) { FragColor += vec4(1.0); } diff --git a/reference/shaders-no-opt/asm/frag/relaxed-precision-inheritance-rules.asm.frag b/reference/shaders-no-opt/asm/frag/relaxed-precision-inheritance-rules.asm.frag index 5aef013e..dc3f6927 100644 --- a/reference/shaders-no-opt/asm/frag/relaxed-precision-inheritance-rules.asm.frag +++ b/reference/shaders-no-opt/asm/frag/relaxed-precision-inheritance-rules.asm.frag @@ -33,12 +33,12 @@ void main() FragColor0 = V4_value0 + vec4(3.0); FragColor1 = _48; FragColor2 = mp_copy_48 * vec4(3.0); - float _21 = V1_value0 + 3.0; + float _23 = V1_value0 + 3.0; float float_0_weird = 3.0 - mp_copy_ubo_hp0; highp float hp_copy_float_0_weird = float_0_weird; highp float _49 = hp_copy_V1_value0 - hp_copy_float_0_weird; float mp_copy_49 = _49; - FragColor3 = vec4(_21, _49, mp_copy_49 * mp_copy_ubo_hp0, 3.0); + FragColor3 = vec4(_23, _49, mp_copy_49 * mp_copy_ubo_hp0, 3.0); highp float _51 = hp_copy_V1_value2 - hp_copy_ubo_mp0; float mp_copy_51 = _51; FragColor3 = vec4(V4_value0.z + ubo_mp0, _51, mp_copy_51 * mp_copy_ubo_hp0, 3.0); @@ -46,7 +46,7 @@ void main() FragColor1 = sin(V4_value0); float phi_mp; highp float phi_hp; - phi_mp = _21; + phi_mp = _23; phi_hp = _49; hp_copy_phi_mp = phi_mp; mp_copy_phi_hp = phi_hp; diff --git a/reference/shaders-no-opt/asm/frag/scalar-select.spv14.asm.frag b/reference/shaders-no-opt/asm/frag/scalar-select.spv14.asm.frag index d74286a1..4360e104 100644 --- a/reference/shaders-no-opt/asm/frag/scalar-select.spv14.asm.frag +++ b/reference/shaders-no-opt/asm/frag/scalar-select.spv14.asm.frag @@ -1,6 +1,6 @@ #version 450 -struct _15 +struct _16 { float _m0; }; @@ -13,7 +13,7 @@ void main() FragColor = vec4(false); FragColor = mix(vec4(0.0, 0.0, 0.0, 1.0), vec4(1.0, 1.0, 0.0, 1.0), bvec4(false, true, false, true)); FragColor = vec4(bvec4(false, true, false, true)); - _15 _32 = false ? _15(0.0) : _15(1.0); - float _33[2] = true ? float[](0.0, 1.0) : float[](1.0, 0.0); + _16 _36 = false ? _16(0.0) : _16(1.0); + float _37[2] = true ? float[](0.0, 1.0) : float[](1.0, 0.0); } diff --git a/reference/shaders-no-opt/asm/frag/sparse-texture-feedback-uint-code.asm.desktop.frag b/reference/shaders-no-opt/asm/frag/sparse-texture-feedback-uint-code.asm.desktop.frag index 540978c4..5b32eee8 100644 --- a/reference/shaders-no-opt/asm/frag/sparse-texture-feedback-uint-code.asm.desktop.frag +++ b/reference/shaders-no-opt/asm/frag/sparse-texture-feedback-uint-code.asm.desktop.frag @@ -16,8 +16,8 @@ void main() uint _30; vec4 _31; _30 = sparseTextureARB(uSamp, vUV, _31); - ResType _26 = ResType(_30, _31); - vec4 texel = _26._m1; - bool ret = sparseTexelsResidentARB(int(_26._m0)); + ResType _24 = ResType(_30, _31); + vec4 texel = _24._m1; + bool ret = sparseTexelsResidentARB(int(_24._m0)); } diff --git a/reference/shaders-no-opt/asm/frag/subgroup-ballot-only.vk.asm.frag b/reference/shaders-no-opt/asm/frag/subgroup-ballot-only.vk.asm.frag index 8a918c03..e9b261c4 100644 --- a/reference/shaders-no-opt/asm/frag/subgroup-ballot-only.vk.asm.frag +++ b/reference/shaders-no-opt/asm/frag/subgroup-ballot-only.vk.asm.frag @@ -23,10 +23,10 @@ uvec4 subgroupBallot(bool v) { return uvec4(unpackUint2x32(ballotARB(v)), 0u, 0u void main() { - uvec4 _21 = subgroupBallot(INDEX < 100u); - SV_Target.x = _21.x; - SV_Target.y = _21.y; - SV_Target.z = _21.z; - SV_Target.w = _21.w; + uvec4 _15 = subgroupBallot(INDEX < 100u); + SV_Target.x = _15.x; + SV_Target.y = _15.y; + SV_Target.z = _15.z; + SV_Target.w = _15.w; } diff --git a/reference/shaders-no-opt/asm/frag/subgroup-ballot-only.vk.asm.frag.vk b/reference/shaders-no-opt/asm/frag/subgroup-ballot-only.vk.asm.frag.vk index ed5933f3..b9bb1306 100644 --- a/reference/shaders-no-opt/asm/frag/subgroup-ballot-only.vk.asm.frag.vk +++ b/reference/shaders-no-opt/asm/frag/subgroup-ballot-only.vk.asm.frag.vk @@ -6,10 +6,10 @@ layout(location = 0) out uvec4 SV_Target; void main() { - uvec4 _21 = subgroupBallot(INDEX < 100u); - SV_Target.x = _21.x; - SV_Target.y = _21.y; - SV_Target.z = _21.z; - SV_Target.w = _21.w; + uvec4 _15 = subgroupBallot(INDEX < 100u); + SV_Target.x = _15.x; + SV_Target.y = _15.y; + SV_Target.z = _15.z; + SV_Target.w = _15.w; } diff --git a/reference/shaders-no-opt/asm/frag/switch-block-case-fallthrough.asm.invalid.frag b/reference/shaders-no-opt/asm/frag/switch-block-case-fallthrough.asm.invalid.frag index de8090e3..8281a4a0 100644 --- a/reference/shaders-no-opt/asm/frag/switch-block-case-fallthrough.asm.invalid.frag +++ b/reference/shaders-no-opt/asm/frag/switch-block-case-fallthrough.asm.invalid.frag @@ -7,31 +7,31 @@ void main() { int i; int j; - int _30; - int _31; + int _33; + int _34; if (vIndex != 0 && vIndex != 1 && vIndex != 11 && vIndex != 2 && vIndex != 3 && vIndex != 4 && vIndex != 5) { - _30 = 2; + _33 = 2; } if (vIndex == 1 || vIndex == 11) { - _31 = 1; + _34 = 1; } switch (vIndex) { case 0: { - _30 = 3; + _33 = 3; } default: { - j = _30; - _31 = 0; + j = _33; + _34 = 0; } case 1: case 11: { - j = _31; + j = _34; } case 2: { diff --git a/reference/shaders-no-opt/asm/frag/switch-non-default-fallthrough-no-phi.asm.frag b/reference/shaders-no-opt/asm/frag/switch-non-default-fallthrough-no-phi.asm.frag index 33151809..c9273b7b 100644 --- a/reference/shaders-no-opt/asm/frag/switch-non-default-fallthrough-no-phi.asm.frag +++ b/reference/shaders-no-opt/asm/frag/switch-non-default-fallthrough-no-phi.asm.frag @@ -12,56 +12,56 @@ struct _5 int _m1; }; -_4 _16; -int _21; +_4 _26; +int _31; layout(location = 0) flat in int _2; layout(location = 0) out int _3; void main() { - bool _25 = false; + bool _76 = false; do { - _5 _26; - _26._m0 = 0; - _26._m1 = 10; - _4 _35; - _35 = _16; - int _39; - _4 _36; - bool _59; - int _38 = 0; + _5 _33; + _33._m0 = 0; + _33._m1 = 10; + _4 _41; + _41 = _26; + int _45; + _4 _42; + bool _79; + int _44 = 0; for (;;) { - if (_26._m0 < _26._m1) + if (_33._m0 < _33._m1) { - int _27 = _26._m0; - int _28 = _26._m0 + int(1u); - _26._m0 = _28; - _36 = _4(1u, _27); + int _34 = _33._m0; + int _35 = _33._m0 + int(1u); + _33._m0 = _35; + _42 = _4(1u, _34); } else { - _4 _48 = _35; - _48._m0 = 0u; - _36 = _48; + _4 _65 = _41; + _65._m0 = 0u; + _42 = _65; } - bool _45_ladder_break = false; - switch (int(_36._m0)) + bool _55_ladder_break = false; + switch (int(_42._m0)) { case 0: { - _3 = _38; - _25 = true; - _59 = true; - _45_ladder_break = true; + _3 = _44; + _76 = true; + _79 = true; + _55_ladder_break = true; break; } default: { - _59 = false; - _45_ladder_break = true; + _79 = false; + _55_ladder_break = true; break; } case 1: @@ -69,16 +69,16 @@ void main() break; } } - if (_45_ladder_break) + if (_55_ladder_break) { break; } - _39 = _38 + _2; - _35 = _36; - _38 = _39; + _45 = _44 + _2; + _41 = _42; + _44 = _45; continue; } - if (_59) + if (_79) { break; } diff --git a/reference/shaders-no-opt/asm/frag/switch-single-case-multiple-exit-cfg.asm.frag b/reference/shaders-no-opt/asm/frag/switch-single-case-multiple-exit-cfg.asm.frag index c9ddbe68..67ab027d 100644 --- a/reference/shaders-no-opt/asm/frag/switch-single-case-multiple-exit-cfg.asm.frag +++ b/reference/shaders-no-opt/asm/frag/switch-single-case-multiple-exit-cfg.asm.frag @@ -2,25 +2,25 @@ precision mediump float; precision highp int; -vec2 _19; +vec2 _52; layout(location = 0) out highp vec4 _GLF_color; void main() { - highp vec2 _30; + highp vec2 _53; do { if (gl_FragCoord.x != gl_FragCoord.x) { - _30 = _19; + _53 = _52; break; } - highp vec2 _29; - _29.y = _19.y; - _30 = _29; + highp vec2 _51; + _51.y = _52.y; + _53 = _51; break; } while(false); - _GLF_color = vec4(_30, 1.0, 1.0); + _GLF_color = vec4(_53, 1.0, 1.0); } diff --git a/reference/shaders-no-opt/asm/frag/terminate-impure-function-call.spv16.asm.frag b/reference/shaders-no-opt/asm/frag/terminate-impure-function-call.spv16.asm.frag index 0fe71f64..589e634c 100644 --- a/reference/shaders-no-opt/asm/frag/terminate-impure-function-call.spv16.asm.frag +++ b/reference/shaders-no-opt/asm/frag/terminate-impure-function-call.spv16.asm.frag @@ -15,7 +15,7 @@ vec4 foobar(int a) void main() { int param = vA; - vec4 _25 = foobar(param); + vec4 _31 = foobar(param); FragColor = vec4(10.0); } diff --git a/reference/shaders-no-opt/asm/frag/texel-fetch-ms-uint-sample.asm.frag b/reference/shaders-no-opt/asm/frag/texel-fetch-ms-uint-sample.asm.frag index d62ccb83..f4ada02a 100644 --- a/reference/shaders-no-opt/asm/frag/texel-fetch-ms-uint-sample.asm.frag +++ b/reference/shaders-no-opt/asm/frag/texel-fetch-ms-uint-sample.asm.frag @@ -6,10 +6,10 @@ layout(location = 0) out vec4 FragColor; void main() { - ivec2 _28 = ivec2(gl_FragCoord.xy); - FragColor.x = texelFetch(uSamp, _28, int(0u)).x; - FragColor.y = texelFetch(uSamp, _28, int(1u)).x; - FragColor.z = texelFetch(uSamp, _28, int(2u)).x; - FragColor.w = texelFetch(uSamp, _28, int(3u)).x; + ivec2 _22 = ivec2(gl_FragCoord.xy); + FragColor.x = texelFetch(uSamp, _22, int(0u)).x; + FragColor.y = texelFetch(uSamp, _22, int(1u)).x; + FragColor.z = texelFetch(uSamp, _22, int(2u)).x; + FragColor.w = texelFetch(uSamp, _22, int(3u)).x; } diff --git a/reference/shaders-no-opt/asm/loop-header-self-continue-break.asm.comp b/reference/shaders-no-opt/asm/loop-header-self-continue-break.asm.comp index bd2a3c27..429ed5f7 100644 --- a/reference/shaders-no-opt/asm/loop-header-self-continue-break.asm.comp +++ b/reference/shaders-no-opt/asm/loop-header-self-continue-break.asm.comp @@ -12,78 +12,78 @@ layout(local_size_x = SPIRV_CROSS_CONSTANT_ID_0, local_size_y = SPIRV_CROSS_CONSTANT_ID_1, local_size_z = SPIRV_CROSS_CONSTANT_ID_2) in; -layout(binding = 0, std430) buffer _4_6 +layout(binding = 0, std430) buffer _3_15 { float _m0[]; -} _6; +} _15; -layout(binding = 1, std430) buffer _4_7 +layout(binding = 1, std430) buffer _3_16 { float _m0[]; -} _7; +} _16; -uvec3 _28 = gl_WorkGroupSize; +uvec3 _14 = gl_WorkGroupSize; void main() { - float _44_copy; - float _46; - uint _47; - float _63; - uint _65; - float _36 = _6._m0[0u]; - uint _39 = 0u; - float _44; + float _38_copy; + float _39; + uint _40; + float _70; + uint _71; + float _32 = _15._m0[0u]; + uint _33 = 0u; + float _38; for (;;) { - _44 = _36; - _46 = _6._m0[35u]; - _47 = 0u; + _38 = _32; + _39 = _15._m0[35u]; + _40 = 0u; for (;;) { - uint _48 = _47 + 1u; - float _45 = _6._m0[_48]; - _6._m0[_47] = ((_46 + _44) + _45) / 3.0; - if (!(_47 < 34u)) + uint _44 = _40 + 1u; + float _46 = _15._m0[_44]; + _15._m0[_40] = ((_39 + _38) + _46) / 3.0; + if (!(_40 < 34u)) { break; } else { - _44_copy = _44; - _44 = _45; - _46 = _44_copy; - _47 = _48; + _38_copy = _38; + _38 = _46; + _39 = _38_copy; + _40 = _44; } } - _6._m0[35u] = (_36 + (_44 + _6._m0[35u])) / 3.0; - if (!(_39 < 5u)) + _15._m0[35u] = (_32 + (_38 + _15._m0[35u])) / 3.0; + if (!(_33 < 5u)) { - _63 = _6._m0[0u]; - _65 = 1u; + _70 = _15._m0[0u]; + _71 = 1u; break; } else { - _36 = _6._m0[0u]; - _39++; + _32 = _15._m0[0u]; + _33++; continue; } } - float _64; + float _75; for (;;) { - _64 = (_63 < _6._m0[_65]) ? _6._m0[_65] : _63; - if (!(_65 < 35u)) + _75 = (_70 < _15._m0[_71]) ? _15._m0[_71] : _70; + if (!(_71 < 35u)) { break; } else { - _63 = _64; - _65++; + _70 = _75; + _71++; } } - _7._m0[gl_GlobalInvocationID.x] = _64; + _16._m0[gl_GlobalInvocationID.x] = _75; } diff --git a/reference/shaders-no-opt/asm/mesh/mesh-shader-plain-builtin-outputs.spv14.asm.vk.nocompat.mesh.vk b/reference/shaders-no-opt/asm/mesh/mesh-shader-plain-builtin-outputs.spv14.asm.vk.nocompat.mesh.vk index 5040aa46..a2ea566c 100644 --- a/reference/shaders-no-opt/asm/mesh/mesh-shader-plain-builtin-outputs.spv14.asm.vk.nocompat.mesh.vk +++ b/reference/shaders-no-opt/asm/mesh/mesh-shader-plain-builtin-outputs.spv14.asm.vk.nocompat.mesh.vk @@ -10,35 +10,35 @@ struct _12 layout(location = 1) out vec4 B[24]; layout(location = 3) perprimitiveEXT out vec4 C[8]; -shared float _9[64]; -taskPayloadSharedEXT _12 _11; +shared float _32[64]; +taskPayloadSharedEXT _12 _38; void main() { - _9[gl_LocalInvocationIndex] = float(gl_LocalInvocationIndex); + _32[gl_LocalInvocationIndex] = float(gl_LocalInvocationIndex); barrier(); SetMeshOutputsEXT(24u, 8u); - gl_MeshVerticesEXT[gl_LocalInvocationIndex].gl_Position.x = _9[gl_LocalInvocationIndex]; - gl_MeshVerticesEXT[gl_LocalInvocationIndex].gl_Position.y = _9[gl_LocalInvocationIndex]; - gl_MeshVerticesEXT[gl_LocalInvocationIndex].gl_Position.z = _9[gl_LocalInvocationIndex]; - gl_MeshVerticesEXT[gl_LocalInvocationIndex].gl_Position.w = _9[gl_LocalInvocationIndex]; - float _63 = _11._m0 + _9[gl_LocalInvocationIndex ^ 1u]; - B[gl_LocalInvocationIndex].x = _63; - B[gl_LocalInvocationIndex].y = _63; - B[gl_LocalInvocationIndex].z = _63; - B[gl_LocalInvocationIndex].w = _63; + gl_MeshVerticesEXT[gl_LocalInvocationIndex].gl_Position.x = _32[gl_LocalInvocationIndex]; + gl_MeshVerticesEXT[gl_LocalInvocationIndex].gl_Position.y = _32[gl_LocalInvocationIndex]; + gl_MeshVerticesEXT[gl_LocalInvocationIndex].gl_Position.z = _32[gl_LocalInvocationIndex]; + gl_MeshVerticesEXT[gl_LocalInvocationIndex].gl_Position.w = _32[gl_LocalInvocationIndex]; + float _59 = _38._m0 + _32[gl_LocalInvocationIndex ^ 1u]; + B[gl_LocalInvocationIndex].x = _59; + B[gl_LocalInvocationIndex].y = _59; + B[gl_LocalInvocationIndex].z = _59; + B[gl_LocalInvocationIndex].w = _59; if (gl_LocalInvocationIndex < 8u) { - uint _71 = gl_LocalInvocationIndex * 3u; - gl_PrimitiveTriangleIndicesEXT[gl_LocalInvocationIndex] = uvec3(_71, _71 + 1u, _71 + 2u); + uint _65 = gl_LocalInvocationIndex * 3u; + gl_PrimitiveTriangleIndicesEXT[gl_LocalInvocationIndex] = uvec3(_65, _65 + 1u, _65 + 2u); gl_MeshPrimitivesEXT[gl_LocalInvocationIndex].gl_CullPrimitiveEXT = (gl_LocalInvocationIndex & 1u) != 0u; gl_MeshPrimitivesEXT[gl_LocalInvocationIndex].gl_PrimitiveID = int(gl_LocalInvocationIndex); gl_MeshPrimitivesEXT[gl_LocalInvocationIndex].gl_Layer = int(gl_LocalInvocationIndex); - uint _81 = gl_LocalInvocationIndex ^ 2u; - C[gl_LocalInvocationIndex].x = _9[_81]; - C[gl_LocalInvocationIndex].y = _9[_81]; - C[gl_LocalInvocationIndex].z = _9[_81]; - C[gl_LocalInvocationIndex].w = _9[_81]; + uint _78 = gl_LocalInvocationIndex ^ 2u; + C[gl_LocalInvocationIndex].x = _32[_78]; + C[gl_LocalInvocationIndex].y = _32[_78]; + C[gl_LocalInvocationIndex].z = _32[_78]; + C[gl_LocalInvocationIndex].w = _32[_78]; } } diff --git a/reference/shaders-no-opt/asm/rgen/acceleration-nonuniform.spv14.vk.nocompat.asm.rgen.vk b/reference/shaders-no-opt/asm/rgen/acceleration-nonuniform.spv14.vk.nocompat.asm.rgen.vk index a72a7cf4..5d07ae49 100644 --- a/reference/shaders-no-opt/asm/rgen/acceleration-nonuniform.spv14.vk.nocompat.asm.rgen.vk +++ b/reference/shaders-no-opt/asm/rgen/acceleration-nonuniform.spv14.vk.nocompat.asm.rgen.vk @@ -11,8 +11,8 @@ void main() vec4 col = vec4(0.0, 0.0, 0.0, 1.0); vec3 origin = vec3(float(gl_LaunchIDEXT.x) / float(gl_LaunchSizeEXT.x), float(gl_LaunchIDEXT.y) / float(gl_LaunchSizeEXT.y), 1.0); vec3 direction = vec3(0.0, 0.0, -1.0); - uint _62 = gl_LaunchIDEXT.x; - traceRayEXT(as[nonuniformEXT(_62)], 0u, 255u, 0u, 1u, 0u, origin, 0.0, direction, 1000.0, 0); + uint _48 = gl_LaunchIDEXT.x; + traceRayEXT(as[nonuniformEXT(_48)], 0u, 255u, 0u, 1u, 0u, origin, 0.0, direction, 1000.0, 0); col.y = payload; imageStore(image, ivec2(gl_LaunchIDEXT.xy), col); } diff --git a/reference/shaders-no-opt/asm/temporary.zero-initialize.asm.frag b/reference/shaders-no-opt/asm/temporary.zero-initialize.asm.frag index 1b8e8cd3..56a42a20 100644 --- a/reference/shaders-no-opt/asm/temporary.zero-initialize.asm.frag +++ b/reference/shaders-no-opt/asm/temporary.zero-initialize.asm.frag @@ -9,19 +9,19 @@ layout(location = 1) flat in mediump int vB; void main() { FragColor = vec4(0.0); - mediump int _10 = 0; - mediump int _15 = 0; - for (mediump int _16 = 0, _17 = 0; _16 < vA; _17 = _15, _16 += _10) + mediump int _49 = 0; + mediump int _58 = 0; + for (mediump int _57 = 0, _60 = 0; _57 < vA; _60 = _58, _57 += _49) { - if ((vA + _16) == 20) + if ((vA + _57) == 20) { - _15 = 50; + _58 = 50; } else { - _15 = ((vB + _16) == 40) ? 60 : _17; + _58 = ((vB + _57) == 40) ? 60 : _60; } - _10 = _15 + 10; + _49 = _58 + 10; FragColor += vec4(1.0); } } diff --git a/reference/shaders-no-opt/asm/tesc/array-of-block-output-initializer.asm.tesc b/reference/shaders-no-opt/asm/tesc/array-of-block-output-initializer.asm.tesc index 13e1d329..446d381c 100644 --- a/reference/shaders-no-opt/asm/tesc/array-of-block-output-initializer.asm.tesc +++ b/reference/shaders-no-opt/asm/tesc/array-of-block-output-initializer.asm.tesc @@ -13,7 +13,7 @@ layout(location = 0) patch out vert { float v0; float v1; -} _5; +} _7; layout(location = 2) patch out vert_patch { @@ -29,54 +29,54 @@ layout(location = 8) out vert2 float v5; } verts[4]; -const vec4 _3_0_init[4] = vec4[](vec4(0.0), vec4(0.0), vec4(0.0), vec4(0.0)); -const float _3_1_init[4] = float[](0.0, 0.0, 0.0, 0.0); -const float _3_2_init[4][1] = float[][](float[](0.0), float[](0.0), float[](0.0), float[](0.0)); -const float _3_3_init[4][1] = float[][](float[](0.0), float[](0.0), float[](0.0), float[](0.0)); -const float _6_0_init[2] = float[](0.0, 0.0); -const float _6_1_init[2] = float[](0.0, 0.0); -const float _7_init = 0.0; -const float _8_init[4] = float[](0.0, 0.0, 0.0, 0.0); -const float _9_0_init[4] = float[](0.0, 0.0, 0.0, 0.0); -const float _9_1_init[4] = float[](0.0, 0.0, 0.0, 0.0); +const vec4 _4_0_init[4] = vec4[](vec4(0.0), vec4(0.0), vec4(0.0), vec4(0.0)); +const float _4_1_init[4] = float[](0.0, 0.0, 0.0, 0.0); +const float _4_2_init[4][1] = float[][](float[](0.0), float[](0.0), float[](0.0), float[](0.0)); +const float _4_3_init[4][1] = float[][](float[](0.0), float[](0.0), float[](0.0), float[](0.0)); +const float _8_0_init[2] = float[](0.0, 0.0); +const float _8_1_init[2] = float[](0.0, 0.0); +const float _9_init = 0.0; +const float _10_init[4] = float[](0.0, 0.0, 0.0, 0.0); +const float _11_0_init[4] = float[](0.0, 0.0, 0.0, 0.0); +const float _11_1_init[4] = float[](0.0, 0.0, 0.0, 0.0); void main() { - gl_out[gl_InvocationID].gl_Position = _3_0_init[gl_InvocationID]; - gl_out[gl_InvocationID].gl_PointSize = _3_1_init[gl_InvocationID]; - gl_out[gl_InvocationID].gl_ClipDistance = _3_2_init[gl_InvocationID]; - gl_out[gl_InvocationID].gl_CullDistance = _3_3_init[gl_InvocationID]; + gl_out[gl_InvocationID].gl_Position = _4_0_init[gl_InvocationID]; + gl_out[gl_InvocationID].gl_PointSize = _4_1_init[gl_InvocationID]; + gl_out[gl_InvocationID].gl_ClipDistance = _4_2_init[gl_InvocationID]; + gl_out[gl_InvocationID].gl_CullDistance = _4_3_init[gl_InvocationID]; if (gl_InvocationID == 0) { - _5.v0 = 0.0; + _7.v0 = 0.0; } if (gl_InvocationID == 0) { - _5.v1 = 0.0; + _7.v1 = 0.0; } if (gl_InvocationID == 0) { - patches[0].v2 = _6_0_init[0]; + patches[0].v2 = _8_0_init[0]; } if (gl_InvocationID == 0) { - patches[1].v2 = _6_0_init[1]; + patches[1].v2 = _8_0_init[1]; } if (gl_InvocationID == 0) { - patches[0].v3 = _6_1_init[0]; + patches[0].v3 = _8_1_init[0]; } if (gl_InvocationID == 0) { - patches[1].v3 = _6_1_init[1]; + patches[1].v3 = _8_1_init[1]; } if (gl_InvocationID == 0) { - v2 = _7_init; + v2 = _9_init; } - v3[gl_InvocationID] = _8_init[gl_InvocationID]; - verts[gl_InvocationID].v4 = _9_0_init[gl_InvocationID]; - verts[gl_InvocationID].v5 = _9_1_init[gl_InvocationID]; + v3[gl_InvocationID] = _10_init[gl_InvocationID]; + verts[gl_InvocationID].v4 = _11_0_init[gl_InvocationID]; + verts[gl_InvocationID].v5 = _11_1_init[gl_InvocationID]; gl_out[gl_InvocationID].gl_Position = vec4(1.0); } diff --git a/reference/shaders-no-opt/asm/tesc/copy-memory-control-point.asm.tesc b/reference/shaders-no-opt/asm/tesc/copy-memory-control-point.asm.tesc index 3412f1cf..bb8b3c91 100644 --- a/reference/shaders-no-opt/asm/tesc/copy-memory-control-point.asm.tesc +++ b/reference/shaders-no-opt/asm/tesc/copy-memory-control-point.asm.tesc @@ -14,16 +14,16 @@ layout(location = 4) in vec4 vicp1[]; layout(location = 5) out vec4 vocp1[3]; vec4 opc[4]; vec4 vicp[2][3]; -vec4 _48; -vec4 _49; -vec4 _50; -vec4 _56; +vec4 _52; +vec4 _55; +vec4 _58; +vec4 _89; -void fork0_epilogue(vec4 _87, vec4 _88, vec4 _89) +void fork0_epilogue(vec4 _61, vec4 _62, vec4 _63) { - gl_TessLevelOuter[0u] = _87.x; - gl_TessLevelOuter[1u] = _88.x; - gl_TessLevelOuter[2u] = _89.x; + gl_TessLevelOuter[0u] = _61.x; + gl_TessLevelOuter[1u] = _62.x; + gl_TessLevelOuter[2u] = _63.x; } void fork0(uint vForkInstanceId) @@ -31,22 +31,22 @@ void fork0(uint vForkInstanceId) vec4 r0; r0.x = uintBitsToFloat(vForkInstanceId); opc[floatBitsToInt(r0.x)].x = cb0_0._m0[0u].x; - _48 = opc[0u]; - _49 = opc[1u]; - _50 = opc[2u]; - fork0_epilogue(_48, _49, _50); + _52 = opc[0u]; + _55 = opc[1u]; + _58 = opc[2u]; + fork0_epilogue(_52, _55, _58); } -void fork1_epilogue(vec4 _109) +void fork1_epilogue(vec4 _92) { - gl_TessLevelInner[0u] = _109.x; + gl_TessLevelInner[0u] = _92.x; } void fork1() { opc[3u].x = cb0_0._m0[0u].x; - _56 = opc[3u]; - fork1_epilogue(_56); + _89 = opc[3u]; + fork1_epilogue(_89); } void main() diff --git a/reference/shaders-no-opt/asm/tesc/tess-level-initializer.asm.tesc b/reference/shaders-no-opt/asm/tesc/tess-level-initializer.asm.tesc index ebd2d8ae..f0493436 100644 --- a/reference/shaders-no-opt/asm/tesc/tess-level-initializer.asm.tesc +++ b/reference/shaders-no-opt/asm/tesc/tess-level-initializer.asm.tesc @@ -1,17 +1,17 @@ #version 450 layout(vertices = 4) out; -const float _5_init[2] = float[](0.0, 0.0); -const float _6_init[4] = float[](0.0, 0.0, 0.0, 0.0); +const float _7_init[2] = float[](0.0, 0.0); +const float _8_init[4] = float[](0.0, 0.0, 0.0, 0.0); void main() { if (gl_InvocationID == 0) { - gl_TessLevelInner = _5_init; + gl_TessLevelInner = _7_init; } if (gl_InvocationID == 0) { - gl_TessLevelOuter = _6_init; + gl_TessLevelOuter = _8_init; } gl_out[gl_InvocationID].gl_Position = vec4(1.0); gl_TessLevelInner[0] = 1.0; diff --git a/reference/shaders-no-opt/asm/vert/block-struct-initializer.asm.vert b/reference/shaders-no-opt/asm/vert/block-struct-initializer.asm.vert index 6060888d..074c7f56 100644 --- a/reference/shaders-no-opt/asm/vert/block-struct-initializer.asm.vert +++ b/reference/shaders-no-opt/asm/vert/block-struct-initializer.asm.vert @@ -10,15 +10,15 @@ layout(location = 0) out Vert { float a; float b; -} _3; +} _4; layout(location = 2) out Foo foo; -const Foo _4_init = Foo(0.0, 0.0); +const Foo _6_init = Foo(0.0, 0.0); void main() { - _3.a = 0.0; - _3.b = 0.0; - foo = _4_init; + _4.a = 0.0; + _4.b = 0.0; + foo = _6_init; } diff --git a/reference/shaders-no-opt/asm/vert/debug-printf.asm.vk.nocompat.vert.vk b/reference/shaders-no-opt/asm/vert/debug-printf.asm.vk.nocompat.vert.vk index b90912d1..6e1ece4a 100644 --- a/reference/shaders-no-opt/asm/vert/debug-printf.asm.vk.nocompat.vert.vk +++ b/reference/shaders-no-opt/asm/vert/debug-printf.asm.vk.nocompat.vert.vk @@ -4,7 +4,7 @@ void main() { debugPrintfEXT("Foo %f %f", 1.0, 2.0); - vec4 _17 = vec4(0.0, 0.0, 0.0, 1.0); + vec4 _16 = vec4(0.0, 0.0, 0.0, 1.0); gl_Position = vec4(0.0, 0.0, 0.0, 1.0); } diff --git a/reference/shaders-no-opt/asm/vert/empty-struct-composite.asm.vert b/reference/shaders-no-opt/asm/vert/empty-struct-composite.asm.vert index 8f786d49..22348681 100644 --- a/reference/shaders-no-opt/asm/vert/empty-struct-composite.asm.vert +++ b/reference/shaders-no-opt/asm/vert/empty-struct-composite.asm.vert @@ -7,7 +7,7 @@ struct Test void main() { - Test _14 = Test(0); - Test t = _14; + Test _13 = Test(0); + Test t = _13; } diff --git a/reference/shaders-no-opt/comp/illegal-struct-name.asm.comp b/reference/shaders-no-opt/comp/illegal-struct-name.asm.comp index 885dcb3b..991d4dbd 100644 --- a/reference/shaders-no-opt/comp/illegal-struct-name.asm.comp +++ b/reference/shaders-no-opt/comp/illegal-struct-name.asm.comp @@ -10,13 +10,13 @@ layout(binding = 0, std430) buffer SSBO { Foo foo; Foo foo2; -} _7; +} _9; void main() { Foo f; - f._abs = _7.foo._abs; + f._abs = _9.foo._abs; int _abs = 10; - _7.foo2._abs = f._abs; + _9.foo2._abs = f._abs; } diff --git a/reference/shaders-no-opt/legacy/frag/switch-single-case-multiple-exit-cfg.legacy.asm.frag b/reference/shaders-no-opt/legacy/frag/switch-single-case-multiple-exit-cfg.legacy.asm.frag index f46bc2fd..14afed70 100644 --- a/reference/shaders-no-opt/legacy/frag/switch-single-case-multiple-exit-cfg.legacy.asm.frag +++ b/reference/shaders-no-opt/legacy/frag/switch-single-case-multiple-exit-cfg.legacy.asm.frag @@ -2,23 +2,23 @@ precision mediump float; precision highp int; -vec2 _19; +vec2 _52; void main() { - highp vec2 _30; + highp vec2 _53; for (int spvDummy15 = 0; spvDummy15 < 1; spvDummy15++) { if (gl_FragCoord.x != gl_FragCoord.x) { - _30 = _19; + _53 = _52; break; } - highp vec2 _29; - _29.y = _19.y; - _30 = _29; + highp vec2 _51; + _51.y = _52.y; + _53 = _51; break; } - gl_FragData[0] = vec4(_30, 1.0, 1.0); + gl_FragData[0] = vec4(_53, 1.0, 1.0); } diff --git a/reference/shaders-reflection/asm/aliased-entry-point-names.asm.multi.json b/reference/shaders-reflection/asm/aliased-entry-point-names.asm.multi.json index 666167af..a21659ca 100644 --- a/reference/shaders-reflection/asm/aliased-entry-point-names.asm.multi.json +++ b/reference/shaders-reflection/asm/aliased-entry-point-names.asm.multi.json @@ -18,8 +18,8 @@ } ], "types" : { - "_8" : { - "name" : "_8", + "_13" : { + "name" : "_13", "members" : [ { "name" : "_m0", diff --git a/reference/shaders-reflection/asm/comp/pointer-to-array-of-physical-pointer.asm.comp.json b/reference/shaders-reflection/asm/comp/pointer-to-array-of-physical-pointer.asm.comp.json index b9224ecc..53f14353 100644 --- a/reference/shaders-reflection/asm/comp/pointer-to-array-of-physical-pointer.asm.comp.json +++ b/reference/shaders-reflection/asm/comp/pointer-to-array-of-physical-pointer.asm.comp.json @@ -16,7 +16,7 @@ } ], "types" : { - "_3" : { + "_4" : { "name" : "Params", "members" : [ { @@ -26,13 +26,13 @@ }, { "name" : "y", - "type" : "_6", + "type" : "_8", "offset" : 16, "physical_pointer" : true } ] }, - "_4" : { + "_6" : { "name" : "IntBuf", "members" : [ { @@ -42,12 +42,12 @@ } ] }, - "_11" : { + "_12" : { "name" : "IntBuf", - "type" : "_4", + "type" : "_6", "physical_pointer" : true }, - "_6" : { + "_8" : { "name" : "IntBuf", "array" : [ 3 @@ -55,13 +55,13 @@ "array_size_is_literal" : [ true ], - "type" : "_11", + "type" : "_12", "array_stride" : 16 } }, "ubos" : [ { - "type" : "_3", + "type" : "_4", "name" : "Params", "block_size" : 24, "set" : 0, diff --git a/reference/shaders-reflection/asm/op-source-glsl-ssbo-1.asm.comp.json b/reference/shaders-reflection/asm/op-source-glsl-ssbo-1.asm.comp.json index 3b0c9868..e7d51221 100644 --- a/reference/shaders-reflection/asm/op-source-glsl-ssbo-1.asm.comp.json +++ b/reference/shaders-reflection/asm/op-source-glsl-ssbo-1.asm.comp.json @@ -16,7 +16,7 @@ } ], "types" : { - "_5" : { + "_7" : { "name" : "SSBO0", "members" : [ { @@ -36,7 +36,7 @@ }, "ssbos" : [ { - "type" : "_5", + "type" : "_7", "name" : "SSBO0", "block_size" : 0, "set" : 0, diff --git a/reference/shaders-reflection/asm/op-source-glsl-ssbo-2.asm.comp.json b/reference/shaders-reflection/asm/op-source-glsl-ssbo-2.asm.comp.json index 80cf8622..62754a36 100644 --- a/reference/shaders-reflection/asm/op-source-glsl-ssbo-2.asm.comp.json +++ b/reference/shaders-reflection/asm/op-source-glsl-ssbo-2.asm.comp.json @@ -16,7 +16,7 @@ } ], "types" : { - "_4" : { + "_6" : { "name" : "SSBO0", "members" : [ { @@ -33,7 +33,7 @@ } ] }, - "_6" : { + "_8" : { "name" : "SSBO1", "members" : [ { @@ -53,14 +53,14 @@ }, "ssbos" : [ { - "type" : "_4", + "type" : "_6", "name" : "SSBO0", "block_size" : 0, "set" : 0, "binding" : 0 }, { - "type" : "_6", + "type" : "_8", "name" : "SSBO1", "block_size" : 0, "set" : 0, diff --git a/reference/shaders-reflection/asm/op-source-hlsl-uav-1.asm.comp.json b/reference/shaders-reflection/asm/op-source-hlsl-uav-1.asm.comp.json index b34f85bb..d3af24ee 100644 --- a/reference/shaders-reflection/asm/op-source-hlsl-uav-1.asm.comp.json +++ b/reference/shaders-reflection/asm/op-source-hlsl-uav-1.asm.comp.json @@ -16,7 +16,7 @@ } ], "types" : { - "_4" : { + "_6" : { "name" : "UAV0", "members" : [ { @@ -36,7 +36,7 @@ }, "ssbos" : [ { - "type" : "_4", + "type" : "_6", "name" : "UAV0", "block_size" : 0, "set" : 0, diff --git a/reference/shaders-reflection/asm/op-source-hlsl-uav-2.asm.comp.json b/reference/shaders-reflection/asm/op-source-hlsl-uav-2.asm.comp.json index 052e3ba8..27fadb3e 100644 --- a/reference/shaders-reflection/asm/op-source-hlsl-uav-2.asm.comp.json +++ b/reference/shaders-reflection/asm/op-source-hlsl-uav-2.asm.comp.json @@ -16,7 +16,7 @@ } ], "types" : { - "_4" : { + "_6" : { "name" : "UAV0", "members" : [ { @@ -36,14 +36,14 @@ }, "ssbos" : [ { - "type" : "_4", + "type" : "_6", "name" : "UAV0", "block_size" : 0, "set" : 0, "binding" : 0 }, { - "type" : "_4", + "type" : "_6", "name" : "UAV1", "block_size" : 0, "set" : 0, diff --git a/reference/shaders-reflection/asm/op-source-none-ssbo-1.asm.comp.json b/reference/shaders-reflection/asm/op-source-none-ssbo-1.asm.comp.json index 3b0c9868..e7d51221 100644 --- a/reference/shaders-reflection/asm/op-source-none-ssbo-1.asm.comp.json +++ b/reference/shaders-reflection/asm/op-source-none-ssbo-1.asm.comp.json @@ -16,7 +16,7 @@ } ], "types" : { - "_5" : { + "_7" : { "name" : "SSBO0", "members" : [ { @@ -36,7 +36,7 @@ }, "ssbos" : [ { - "type" : "_5", + "type" : "_7", "name" : "SSBO0", "block_size" : 0, "set" : 0, diff --git a/reference/shaders-reflection/asm/op-source-none-ssbo-2.asm.comp.json b/reference/shaders-reflection/asm/op-source-none-ssbo-2.asm.comp.json index 80cf8622..62754a36 100644 --- a/reference/shaders-reflection/asm/op-source-none-ssbo-2.asm.comp.json +++ b/reference/shaders-reflection/asm/op-source-none-ssbo-2.asm.comp.json @@ -16,7 +16,7 @@ } ], "types" : { - "_4" : { + "_6" : { "name" : "SSBO0", "members" : [ { @@ -33,7 +33,7 @@ } ] }, - "_6" : { + "_8" : { "name" : "SSBO1", "members" : [ { @@ -53,14 +53,14 @@ }, "ssbos" : [ { - "type" : "_4", + "type" : "_6", "name" : "SSBO0", "block_size" : 0, "set" : 0, "binding" : 0 }, { - "type" : "_6", + "type" : "_8", "name" : "SSBO1", "block_size" : 0, "set" : 0, diff --git a/reference/shaders-reflection/asm/op-source-none-uav-1.asm.comp.json b/reference/shaders-reflection/asm/op-source-none-uav-1.asm.comp.json index b34f85bb..d3af24ee 100644 --- a/reference/shaders-reflection/asm/op-source-none-uav-1.asm.comp.json +++ b/reference/shaders-reflection/asm/op-source-none-uav-1.asm.comp.json @@ -16,7 +16,7 @@ } ], "types" : { - "_4" : { + "_6" : { "name" : "UAV0", "members" : [ { @@ -36,7 +36,7 @@ }, "ssbos" : [ { - "type" : "_4", + "type" : "_6", "name" : "UAV0", "block_size" : 0, "set" : 0, diff --git a/reference/shaders-reflection/asm/op-source-none-uav-2.asm.comp.json b/reference/shaders-reflection/asm/op-source-none-uav-2.asm.comp.json index 052e3ba8..27fadb3e 100644 --- a/reference/shaders-reflection/asm/op-source-none-uav-2.asm.comp.json +++ b/reference/shaders-reflection/asm/op-source-none-uav-2.asm.comp.json @@ -16,7 +16,7 @@ } ], "types" : { - "_4" : { + "_6" : { "name" : "UAV0", "members" : [ { @@ -36,14 +36,14 @@ }, "ssbos" : [ { - "type" : "_4", + "type" : "_6", "name" : "UAV0", "block_size" : 0, "set" : 0, "binding" : 0 }, { - "type" : "_4", + "type" : "_6", "name" : "UAV1", "block_size" : 0, "set" : 0, diff --git a/reference/shaders-ue4/asm/tesc/hs-incorrect-base-type.invalid.asm.tesc b/reference/shaders-ue4/asm/tesc/hs-incorrect-base-type.invalid.asm.tesc index 84540d35..7741719b 100644 --- a/reference/shaders-ue4/asm/tesc/hs-incorrect-base-type.invalid.asm.tesc +++ b/reference/shaders-ue4/asm/tesc/hs-incorrect-base-type.invalid.asm.tesc @@ -263,7 +263,7 @@ struct type_StructuredBuffer_v4float float4 _m0[1]; }; -constant float4 _142 = {}; +constant float4 _140 = {}; struct main0_out { @@ -308,26 +308,26 @@ kernel void main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0) threadgroup_barrier(mem_flags::mem_threadgroup); if (gl_InvocationID >= 3) return; - spvUnsafeArray _144 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD10_centroid, gl_in[3].in_var_TEXCOORD10_centroid, gl_in[4].in_var_TEXCOORD10_centroid, gl_in[5].in_var_TEXCOORD10_centroid, gl_in[6].in_var_TEXCOORD10_centroid, gl_in[7].in_var_TEXCOORD10_centroid, gl_in[8].in_var_TEXCOORD10_centroid, gl_in[9].in_var_TEXCOORD10_centroid, gl_in[10].in_var_TEXCOORD10_centroid, gl_in[11].in_var_TEXCOORD10_centroid }); - spvUnsafeArray _145 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD11_centroid, gl_in[1].in_var_TEXCOORD11_centroid, gl_in[2].in_var_TEXCOORD11_centroid, gl_in[3].in_var_TEXCOORD11_centroid, gl_in[4].in_var_TEXCOORD11_centroid, gl_in[5].in_var_TEXCOORD11_centroid, gl_in[6].in_var_TEXCOORD11_centroid, gl_in[7].in_var_TEXCOORD11_centroid, gl_in[8].in_var_TEXCOORD11_centroid, gl_in[9].in_var_TEXCOORD11_centroid, gl_in[10].in_var_TEXCOORD11_centroid, gl_in[11].in_var_TEXCOORD11_centroid }); - spvUnsafeArray _146 = spvUnsafeArray({ gl_in[0].in_var_COLOR0, gl_in[1].in_var_COLOR0, gl_in[2].in_var_COLOR0, gl_in[3].in_var_COLOR0, gl_in[4].in_var_COLOR0, gl_in[5].in_var_COLOR0, gl_in[6].in_var_COLOR0, gl_in[7].in_var_COLOR0, gl_in[8].in_var_COLOR0, gl_in[9].in_var_COLOR0, gl_in[10].in_var_COLOR0, gl_in[11].in_var_COLOR0 }); - spvUnsafeArray, 12> _147 = spvUnsafeArray, 12>({ spvUnsafeArray({ gl_in[0].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[1].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[2].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[3].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[4].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[5].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[6].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[7].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[8].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[9].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[10].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[11].in_var_TEXCOORD0_0 }) }); - spvUnsafeArray _148 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD4, gl_in[1].in_var_TEXCOORD4, gl_in[2].in_var_TEXCOORD4, gl_in[3].in_var_TEXCOORD4, gl_in[4].in_var_TEXCOORD4, gl_in[5].in_var_TEXCOORD4, gl_in[6].in_var_TEXCOORD4, gl_in[7].in_var_TEXCOORD4, gl_in[8].in_var_TEXCOORD4, gl_in[9].in_var_TEXCOORD4, gl_in[10].in_var_TEXCOORD4, gl_in[11].in_var_TEXCOORD4 }); - spvUnsafeArray _149 = spvUnsafeArray({ gl_in[0].in_var_PRIMITIVE_ID, gl_in[1].in_var_PRIMITIVE_ID, gl_in[2].in_var_PRIMITIVE_ID, gl_in[3].in_var_PRIMITIVE_ID, gl_in[4].in_var_PRIMITIVE_ID, gl_in[5].in_var_PRIMITIVE_ID, gl_in[6].in_var_PRIMITIVE_ID, gl_in[7].in_var_PRIMITIVE_ID, gl_in[8].in_var_PRIMITIVE_ID, gl_in[9].in_var_PRIMITIVE_ID, gl_in[10].in_var_PRIMITIVE_ID, gl_in[11].in_var_PRIMITIVE_ID }); - spvUnsafeArray _150 = spvUnsafeArray({ gl_in[0].in_var_LIGHTMAP_ID, gl_in[1].in_var_LIGHTMAP_ID, gl_in[2].in_var_LIGHTMAP_ID, gl_in[3].in_var_LIGHTMAP_ID, gl_in[4].in_var_LIGHTMAP_ID, gl_in[5].in_var_LIGHTMAP_ID, gl_in[6].in_var_LIGHTMAP_ID, gl_in[7].in_var_LIGHTMAP_ID, gl_in[8].in_var_LIGHTMAP_ID, gl_in[9].in_var_LIGHTMAP_ID, gl_in[10].in_var_LIGHTMAP_ID, gl_in[11].in_var_LIGHTMAP_ID }); - spvUnsafeArray _259 = spvUnsafeArray({ gl_in[0].in_var_VS_To_DS_Position, gl_in[1].in_var_VS_To_DS_Position, gl_in[2].in_var_VS_To_DS_Position, gl_in[3].in_var_VS_To_DS_Position, gl_in[4].in_var_VS_To_DS_Position, gl_in[5].in_var_VS_To_DS_Position, gl_in[6].in_var_VS_To_DS_Position, gl_in[7].in_var_VS_To_DS_Position, gl_in[8].in_var_VS_To_DS_Position, gl_in[9].in_var_VS_To_DS_Position, gl_in[10].in_var_VS_To_DS_Position, gl_in[11].in_var_VS_To_DS_Position }); - spvUnsafeArray _284 = spvUnsafeArray({ FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[0], _145[0], _146[0], _147[0], _148[0], _149[0], _150[0] } }, FBasePassInterpolantsVSToDS{ { } }, _259[0] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[1], _145[1], _146[1], _147[1], _148[1], _149[1], _150[1] } }, FBasePassInterpolantsVSToDS{ { } }, _259[1] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[2], _145[2], _146[2], _147[2], _148[2], _149[2], _150[2] } }, FBasePassInterpolantsVSToDS{ { } }, _259[2] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[3], _145[3], _146[3], _147[3], _148[3], _149[3], _150[3] } }, FBasePassInterpolantsVSToDS{ { } }, _259[3] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[4], _145[4], _146[4], _147[4], _148[4], _149[4], _150[4] } }, FBasePassInterpolantsVSToDS{ { } }, _259[4] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[5], _145[5], _146[5], _147[5], _148[5], _149[5], _150[5] } }, FBasePassInterpolantsVSToDS{ { } }, _259[5] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[6], _145[6], _146[6], _147[6], _148[6], _149[6], _150[6] } }, FBasePassInterpolantsVSToDS{ { } }, _259[6] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[7], _145[7], _146[7], _147[7], _148[7], _149[7], _150[7] } }, FBasePassInterpolantsVSToDS{ { } }, _259[7] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[8], _145[8], _146[8], _147[8], _148[8], _149[8], _150[8] } }, FBasePassInterpolantsVSToDS{ { } }, _259[8] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[9], _145[9], _146[9], _147[9], _148[9], _149[9], _150[9] } }, FBasePassInterpolantsVSToDS{ { } }, _259[9] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[10], _145[10], _146[10], _147[10], _148[10], _149[10], _150[10] } }, FBasePassInterpolantsVSToDS{ { } }, _259[10] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _144[11], _145[11], _146[11], _147[11], _148[11], _149[11], _150[11] } }, FBasePassInterpolantsVSToDS{ { } }, _259[11] } }); - spvUnsafeArray param_var_I = _284; - float4 _301 = float4(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); - float3 _310 = View_PrimitiveSceneData._m0[(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.PrimitiveId * 26u) + 22u].xyz * float3x3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz, cross(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz) * float3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.w), param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz); - uint _313 = (gl_InvocationID < 2u) ? (gl_InvocationID + 1u) : 0u; - uint _314 = 2u * gl_InvocationID; - uint _315 = 3u + _314; - uint _316 = _314 + 4u; - 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 _142 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD10_centroid, gl_in[3].in_var_TEXCOORD10_centroid, gl_in[4].in_var_TEXCOORD10_centroid, gl_in[5].in_var_TEXCOORD10_centroid, gl_in[6].in_var_TEXCOORD10_centroid, gl_in[7].in_var_TEXCOORD10_centroid, gl_in[8].in_var_TEXCOORD10_centroid, gl_in[9].in_var_TEXCOORD10_centroid, gl_in[10].in_var_TEXCOORD10_centroid, gl_in[11].in_var_TEXCOORD10_centroid }); + spvUnsafeArray _143 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD11_centroid, gl_in[1].in_var_TEXCOORD11_centroid, gl_in[2].in_var_TEXCOORD11_centroid, gl_in[3].in_var_TEXCOORD11_centroid, gl_in[4].in_var_TEXCOORD11_centroid, gl_in[5].in_var_TEXCOORD11_centroid, gl_in[6].in_var_TEXCOORD11_centroid, gl_in[7].in_var_TEXCOORD11_centroid, gl_in[8].in_var_TEXCOORD11_centroid, gl_in[9].in_var_TEXCOORD11_centroid, gl_in[10].in_var_TEXCOORD11_centroid, gl_in[11].in_var_TEXCOORD11_centroid }); + spvUnsafeArray _144 = spvUnsafeArray({ gl_in[0].in_var_COLOR0, gl_in[1].in_var_COLOR0, gl_in[2].in_var_COLOR0, gl_in[3].in_var_COLOR0, gl_in[4].in_var_COLOR0, gl_in[5].in_var_COLOR0, gl_in[6].in_var_COLOR0, gl_in[7].in_var_COLOR0, gl_in[8].in_var_COLOR0, gl_in[9].in_var_COLOR0, gl_in[10].in_var_COLOR0, gl_in[11].in_var_COLOR0 }); + spvUnsafeArray, 12> _145 = spvUnsafeArray, 12>({ spvUnsafeArray({ gl_in[0].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[1].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[2].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[3].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[4].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[5].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[6].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[7].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[8].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[9].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[10].in_var_TEXCOORD0_0 }), spvUnsafeArray({ gl_in[11].in_var_TEXCOORD0_0 }) }); + spvUnsafeArray _146 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD4, gl_in[1].in_var_TEXCOORD4, gl_in[2].in_var_TEXCOORD4, gl_in[3].in_var_TEXCOORD4, gl_in[4].in_var_TEXCOORD4, gl_in[5].in_var_TEXCOORD4, gl_in[6].in_var_TEXCOORD4, gl_in[7].in_var_TEXCOORD4, gl_in[8].in_var_TEXCOORD4, gl_in[9].in_var_TEXCOORD4, gl_in[10].in_var_TEXCOORD4, gl_in[11].in_var_TEXCOORD4 }); + spvUnsafeArray _147 = spvUnsafeArray({ gl_in[0].in_var_PRIMITIVE_ID, gl_in[1].in_var_PRIMITIVE_ID, gl_in[2].in_var_PRIMITIVE_ID, gl_in[3].in_var_PRIMITIVE_ID, gl_in[4].in_var_PRIMITIVE_ID, gl_in[5].in_var_PRIMITIVE_ID, gl_in[6].in_var_PRIMITIVE_ID, gl_in[7].in_var_PRIMITIVE_ID, gl_in[8].in_var_PRIMITIVE_ID, gl_in[9].in_var_PRIMITIVE_ID, gl_in[10].in_var_PRIMITIVE_ID, gl_in[11].in_var_PRIMITIVE_ID }); + spvUnsafeArray _148 = spvUnsafeArray({ gl_in[0].in_var_LIGHTMAP_ID, gl_in[1].in_var_LIGHTMAP_ID, gl_in[2].in_var_LIGHTMAP_ID, gl_in[3].in_var_LIGHTMAP_ID, gl_in[4].in_var_LIGHTMAP_ID, gl_in[5].in_var_LIGHTMAP_ID, gl_in[6].in_var_LIGHTMAP_ID, gl_in[7].in_var_LIGHTMAP_ID, gl_in[8].in_var_LIGHTMAP_ID, gl_in[9].in_var_LIGHTMAP_ID, gl_in[10].in_var_LIGHTMAP_ID, gl_in[11].in_var_LIGHTMAP_ID }); + spvUnsafeArray _257 = spvUnsafeArray({ gl_in[0].in_var_VS_To_DS_Position, gl_in[1].in_var_VS_To_DS_Position, gl_in[2].in_var_VS_To_DS_Position, gl_in[3].in_var_VS_To_DS_Position, gl_in[4].in_var_VS_To_DS_Position, gl_in[5].in_var_VS_To_DS_Position, gl_in[6].in_var_VS_To_DS_Position, gl_in[7].in_var_VS_To_DS_Position, gl_in[8].in_var_VS_To_DS_Position, gl_in[9].in_var_VS_To_DS_Position, gl_in[10].in_var_VS_To_DS_Position, gl_in[11].in_var_VS_To_DS_Position }); + spvUnsafeArray _282 = spvUnsafeArray({ FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[0], _143[0], _144[0], _145[0], _146[0], _147[0], _148[0] } }, FBasePassInterpolantsVSToDS{ { } }, _257[0] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[1], _143[1], _144[1], _145[1], _146[1], _147[1], _148[1] } }, FBasePassInterpolantsVSToDS{ { } }, _257[1] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[2], _143[2], _144[2], _145[2], _146[2], _147[2], _148[2] } }, FBasePassInterpolantsVSToDS{ { } }, _257[2] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[3], _143[3], _144[3], _145[3], _146[3], _147[3], _148[3] } }, FBasePassInterpolantsVSToDS{ { } }, _257[3] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[4], _143[4], _144[4], _145[4], _146[4], _147[4], _148[4] } }, FBasePassInterpolantsVSToDS{ { } }, _257[4] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[5], _143[5], _144[5], _145[5], _146[5], _147[5], _148[5] } }, FBasePassInterpolantsVSToDS{ { } }, _257[5] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[6], _143[6], _144[6], _145[6], _146[6], _147[6], _148[6] } }, FBasePassInterpolantsVSToDS{ { } }, _257[6] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[7], _143[7], _144[7], _145[7], _146[7], _147[7], _148[7] } }, FBasePassInterpolantsVSToDS{ { } }, _257[7] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[8], _143[8], _144[8], _145[8], _146[8], _147[8], _148[8] } }, FBasePassInterpolantsVSToDS{ { } }, _257[8] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[9], _143[9], _144[9], _145[9], _146[9], _147[9], _148[9] } }, FBasePassInterpolantsVSToDS{ { } }, _257[9] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[10], _143[10], _144[10], _145[10], _146[10], _147[10], _148[10] } }, FBasePassInterpolantsVSToDS{ { } }, _257[10] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[11], _143[11], _144[11], _145[11], _146[11], _147[11], _148[11] } }, FBasePassInterpolantsVSToDS{ { } }, _257[11] } }); + spvUnsafeArray param_var_I = _282; + float4 _299 = float4(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float3 _308 = View_PrimitiveSceneData._m0[(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.PrimitiveId * 26u) + 22u].xyz * float3x3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz, cross(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz) * float3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.w), param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz); + uint _311 = (gl_InvocationID < 2u) ? (gl_InvocationID + 1u) : 0u; + uint _312 = 2u * gl_InvocationID; + uint _313 = 3u + _312; + uint _314 = _312 + 4u; + float4 _326 = float4(param_var_I[_311].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float4 _334 = float4(param_var_I[_313].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float4 _342 = float4(param_var_I[_314].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + spvUnsafeArray _390 = spvUnsafeArray({ param_var_I[gl_InvocationID].Position, (((((float4(2.0) * param_var_I[gl_InvocationID].Position) + param_var_I[_311].Position) - (float4(dot(param_var_I[_311].Position - param_var_I[gl_InvocationID].Position, _299)) * _299)) * float4(0.3333333432674407958984375)) + ((((float4(2.0) * param_var_I[_313].Position) + param_var_I[_314].Position) - (float4(dot(param_var_I[_314].Position - param_var_I[_313].Position, _334)) * _334)) * float4(0.3333333432674407958984375))) * float4(0.5), (((((float4(2.0) * param_var_I[_311].Position) + param_var_I[gl_InvocationID].Position) - (float4(dot(param_var_I[gl_InvocationID].Position - param_var_I[_311].Position, _326)) * _326)) * float4(0.3333333432674407958984375)) + ((((float4(2.0) * param_var_I[_314].Position) + param_var_I[_313].Position) - (float4(dot(param_var_I[_313].Position - param_var_I[_314].Position, _342)) * _342)) * float4(0.3333333432674407958984375))) * float4(0.5) }); 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; @@ -336,60 +336,60 @@ kernel void main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0) gl_out[gl_InvocationID].out_var_PRIMITIVE_ID = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.PrimitiveId; gl_out[gl_InvocationID].out_var_LIGHTMAP_ID = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.LightmapDataIndex; gl_out[gl_InvocationID].out_var_VS_To_DS_Position = param_var_I[gl_InvocationID].Position; - gl_out[gl_InvocationID].out_var_PN_POSITION = _392; - gl_out[gl_InvocationID].out_var_PN_DisplacementScales = _310; + gl_out[gl_InvocationID].out_var_PN_POSITION = _390; + gl_out[gl_InvocationID].out_var_PN_DisplacementScales = _308; gl_out[gl_InvocationID].out_var_PN_TessellationMultiplier = 1.0; gl_out[gl_InvocationID].out_var_PN_WorldDisplacementMultiplier = 1.0; - temp_var_hullMainRetVal[gl_InvocationID] = FPNTessellationHSToDS{ param_var_I[gl_InvocationID], _392, _310, 1.0, 1.0 }; + temp_var_hullMainRetVal[gl_InvocationID] = FPNTessellationHSToDS{ param_var_I[gl_InvocationID], _390, _308, 1.0, 1.0 }; threadgroup_barrier(mem_flags::mem_device | mem_flags::mem_threadgroup); 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; - _463.x = 0.5 * (temp_var_hullMainRetVal[1u].TessellationMultiplier + temp_var_hullMainRetVal[2u].TessellationMultiplier); - _463.y = 0.5 * (temp_var_hullMainRetVal[2u].TessellationMultiplier + temp_var_hullMainRetVal[0u].TessellationMultiplier); - _463.z = 0.5 * (temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier); - _463.w = 0.333000004291534423828125 * ((temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier) + temp_var_hullMainRetVal[2u].TessellationMultiplier); - float4 _589; + float4 _448 = (((((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 _461; + _461.x = 0.5 * (temp_var_hullMainRetVal[1u].TessellationMultiplier + temp_var_hullMainRetVal[2u].TessellationMultiplier); + _461.y = 0.5 * (temp_var_hullMainRetVal[2u].TessellationMultiplier + temp_var_hullMainRetVal[0u].TessellationMultiplier); + _461.z = 0.5 * (temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier); + _461.w = 0.333000004291534423828125 * ((temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier) + temp_var_hullMainRetVal[2u].TessellationMultiplier); + float4 _587; for (;;) { - float4 _489 = View.View_ViewToClip * float4(0.0); - float4 _494 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[0u].WorldPosition[0].xyz, 1.0); - float3 _495 = _494.xyz; - float3 _496 = _489.xyz; - float _498 = _494.w; - float _499 = _489.w; - float4 _516 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[1u].WorldPosition[0].xyz, 1.0); - float3 _517 = _516.xyz; - float _519 = _516.w; - float4 _537 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[2u].WorldPosition[0].xyz, 1.0); - float3 _538 = _537.xyz; - float _540 = _537.w; - if (any((((int3((_495 - _496) < float3(_498 + _499)) + (int3(2) * int3((_495 + _496) > float3((-_498) - _499)))) | (int3((_517 - _496) < float3(_519 + _499)) + (int3(2) * int3((_517 + _496) > float3((-_519) - _499))))) | (int3((_538 - _496) < float3(_540 + _499)) + (int3(2) * int3((_538 + _496) > float3((-_540) - _499))))) != int3(3))) + float4 _487 = View.View_ViewToClip * float4(0.0); + float4 _492 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[0u].WorldPosition[0].xyz, 1.0); + float3 _493 = _492.xyz; + float3 _494 = _487.xyz; + float _496 = _492.w; + float _497 = _487.w; + float4 _514 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[1u].WorldPosition[0].xyz, 1.0); + float3 _515 = _514.xyz; + float _517 = _514.w; + float4 _535 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[2u].WorldPosition[0].xyz, 1.0); + float3 _536 = _535.xyz; + float _538 = _535.w; + if (any((((int3((_493 - _494) < float3(_496 + _497)) + (int3(2) * int3((_493 + _494) > float3((-_496) - _497)))) | (int3((_515 - _494) < float3(_517 + _497)) + (int3(2) * int3((_515 + _494) > float3((-_517) - _497))))) | (int3((_536 - _494) < float3(_538 + _497)) + (int3(2) * int3((_536 + _494) > float3((-_538) - _497))))) != int3(3))) { - _589 = float4(0.0); + _587 = float4(0.0); break; } - float3 _558 = temp_var_hullMainRetVal[0u].WorldPosition[0].xyz - temp_var_hullMainRetVal[1u].WorldPosition[0].xyz; - float3 _559 = temp_var_hullMainRetVal[1u].WorldPosition[0].xyz - temp_var_hullMainRetVal[2u].WorldPosition[0].xyz; - float3 _560 = temp_var_hullMainRetVal[2u].WorldPosition[0].xyz - temp_var_hullMainRetVal[0u].WorldPosition[0].xyz; - float3 _563 = (float3(0.5) * (temp_var_hullMainRetVal[0u].WorldPosition[0].xyz + temp_var_hullMainRetVal[1u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); - float3 _566 = (float3(0.5) * (temp_var_hullMainRetVal[1u].WorldPosition[0].xyz + temp_var_hullMainRetVal[2u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); - float3 _569 = (float3(0.5) * (temp_var_hullMainRetVal[2u].WorldPosition[0].xyz + temp_var_hullMainRetVal[0u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); - float _573 = sqrt(dot(_559, _559) / dot(_566, _566)); - float _577 = sqrt(dot(_560, _560) / dot(_569, _569)); - float _581 = sqrt(dot(_558, _558) / dot(_563, _563)); - float4 _582 = float4(_573, _577, _581, 1.0); - _582.w = 0.333000004291534423828125 * ((_573 + _577) + _581); - _589 = float4(View.View_AdaptiveTessellationFactor) * _582; + float3 _556 = temp_var_hullMainRetVal[0u].WorldPosition[0].xyz - temp_var_hullMainRetVal[1u].WorldPosition[0].xyz; + float3 _557 = temp_var_hullMainRetVal[1u].WorldPosition[0].xyz - temp_var_hullMainRetVal[2u].WorldPosition[0].xyz; + float3 _558 = temp_var_hullMainRetVal[2u].WorldPosition[0].xyz - temp_var_hullMainRetVal[0u].WorldPosition[0].xyz; + float3 _561 = (float3(0.5) * (temp_var_hullMainRetVal[0u].WorldPosition[0].xyz + temp_var_hullMainRetVal[1u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float3 _564 = (float3(0.5) * (temp_var_hullMainRetVal[1u].WorldPosition[0].xyz + temp_var_hullMainRetVal[2u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float3 _567 = (float3(0.5) * (temp_var_hullMainRetVal[2u].WorldPosition[0].xyz + temp_var_hullMainRetVal[0u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float _571 = sqrt(dot(_557, _557) / dot(_564, _564)); + float _575 = sqrt(dot(_558, _558) / dot(_567, _567)); + float _579 = sqrt(dot(_556, _556) / dot(_561, _561)); + float4 _580 = float4(_571, _575, _579, 1.0); + _580.w = 0.333000004291534423828125 * ((_571 + _575) + _579); + _587 = float4(View.View_AdaptiveTessellationFactor) * _580; break; } - float4 _591 = fast::clamp(_463 * _589, float4(1.0), float4(15.0)); - spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[0u] = half(_591.x); - spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[1u] = half(_591.y); - spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[2u] = half(_591.z); - spvTessLevel[gl_PrimitiveID].insideTessellationFactor = half(_591.w); - patchOut.out_var_PN_POSITION9 = _450 + ((_450 - (((temp_var_hullMainRetVal[2u].WorldPosition[0] + temp_var_hullMainRetVal[1u].WorldPosition[0]) + temp_var_hullMainRetVal[0u].WorldPosition[0]) * float4(0.3333333432674407958984375))) * float4(0.5)); + float4 _589 = fast::clamp(_461 * _587, float4(1.0), float4(15.0)); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[0u] = half(_589.x); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[1u] = half(_589.y); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[2u] = half(_589.z); + spvTessLevel[gl_PrimitiveID].insideTessellationFactor = half(_589.w); + patchOut.out_var_PN_POSITION9 = _448 + ((_448 - (((temp_var_hullMainRetVal[2u].WorldPosition[0] + temp_var_hullMainRetVal[1u].WorldPosition[0]) + temp_var_hullMainRetVal[0u].WorldPosition[0]) * float4(0.3333333432674407958984375))) * float4(0.5)); } } diff --git a/reference/shaders-ue4/asm/tesc/hs-input-array-access.invalid.asm.tesc b/reference/shaders-ue4/asm/tesc/hs-input-array-access.invalid.asm.tesc index 3bfbb69c..df2dc815 100644 --- a/reference/shaders-ue4/asm/tesc/hs-input-array-access.invalid.asm.tesc +++ b/reference/shaders-ue4/asm/tesc/hs-input-array-access.invalid.asm.tesc @@ -304,7 +304,7 @@ struct type_Primitive float4 Primitive_CustomPrimitiveData[4]; }; -constant float4 _140 = {}; +constant float4 _136 = {}; struct main0_out { @@ -350,114 +350,114 @@ kernel void main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0) threadgroup_barrier(mem_flags::mem_threadgroup); if (gl_InvocationID >= 3) return; - spvUnsafeArray _142 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD10_centroid, gl_in[3].in_var_TEXCOORD10_centroid, gl_in[4].in_var_TEXCOORD10_centroid, gl_in[5].in_var_TEXCOORD10_centroid, gl_in[6].in_var_TEXCOORD10_centroid, gl_in[7].in_var_TEXCOORD10_centroid, gl_in[8].in_var_TEXCOORD10_centroid, gl_in[9].in_var_TEXCOORD10_centroid, gl_in[10].in_var_TEXCOORD10_centroid, gl_in[11].in_var_TEXCOORD10_centroid }); - spvUnsafeArray _143 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD11_centroid, gl_in[1].in_var_TEXCOORD11_centroid, gl_in[2].in_var_TEXCOORD11_centroid, gl_in[3].in_var_TEXCOORD11_centroid, gl_in[4].in_var_TEXCOORD11_centroid, gl_in[5].in_var_TEXCOORD11_centroid, gl_in[6].in_var_TEXCOORD11_centroid, gl_in[7].in_var_TEXCOORD11_centroid, gl_in[8].in_var_TEXCOORD11_centroid, gl_in[9].in_var_TEXCOORD11_centroid, gl_in[10].in_var_TEXCOORD11_centroid, gl_in[11].in_var_TEXCOORD11_centroid }); - spvUnsafeArray _192 = spvUnsafeArray({ gl_in[0].in_var_VS_To_DS_Position, gl_in[1].in_var_VS_To_DS_Position, gl_in[2].in_var_VS_To_DS_Position, gl_in[3].in_var_VS_To_DS_Position, gl_in[4].in_var_VS_To_DS_Position, gl_in[5].in_var_VS_To_DS_Position, gl_in[6].in_var_VS_To_DS_Position, gl_in[7].in_var_VS_To_DS_Position, gl_in[8].in_var_VS_To_DS_Position, gl_in[9].in_var_VS_To_DS_Position, gl_in[10].in_var_VS_To_DS_Position, gl_in[11].in_var_VS_To_DS_Position }); - spvUnsafeArray _193 = spvUnsafeArray({ gl_in[0].in_var_VS_To_DS_VertexID, gl_in[1].in_var_VS_To_DS_VertexID, gl_in[2].in_var_VS_To_DS_VertexID, gl_in[3].in_var_VS_To_DS_VertexID, gl_in[4].in_var_VS_To_DS_VertexID, gl_in[5].in_var_VS_To_DS_VertexID, gl_in[6].in_var_VS_To_DS_VertexID, gl_in[7].in_var_VS_To_DS_VertexID, gl_in[8].in_var_VS_To_DS_VertexID, gl_in[9].in_var_VS_To_DS_VertexID, gl_in[10].in_var_VS_To_DS_VertexID, gl_in[11].in_var_VS_To_DS_VertexID }); - spvUnsafeArray _230 = spvUnsafeArray({ FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[0], _143[0] } }, _192[0], _193[0] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[1], _143[1] } }, _192[1], _193[1] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[2], _143[2] } }, _192[2], _193[2] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[3], _143[3] } }, _192[3], _193[3] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[4], _143[4] } }, _192[4], _193[4] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[5], _143[5] } }, _192[5], _193[5] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[6], _143[6] } }, _192[6], _193[6] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[7], _143[7] } }, _192[7], _193[7] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[8], _143[8] } }, _192[8], _193[8] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[9], _143[9] } }, _192[9], _193[9] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[10], _143[10] } }, _192[10], _193[10] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _142[11], _143[11] } }, _192[11], _193[11] } }); - spvUnsafeArray param_var_I = _230; - float4 _247 = float4(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); - float3 _251 = Primitive.Primitive_NonUniformScale.xyz * float3x3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz, cross(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz) * float3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.w), param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz); - uint _254 = (gl_InvocationID < 2u) ? (gl_InvocationID + 1u) : 0u; - uint _255 = 2u * gl_InvocationID; - uint _256 = 3u + _255; - uint _257 = _255 + 4u; - uint _264 = (_254 < 2u) ? (_254 + 1u) : 0u; - uint _265 = 2u * _254; - uint _266 = 3u + _265; - uint _267 = _265 + 4u; - float4 _279 = float4(param_var_I[9u + gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); - float4 _315; - float4 _316; - float4 _317; - float4 _318; - if ((param_var_I[_266].VertexID < param_var_I[_254].VertexID) || ((param_var_I[_266].VertexID == param_var_I[_254].VertexID) && (param_var_I[_267].VertexID < param_var_I[_264].VertexID))) + spvUnsafeArray _138 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD10_centroid, gl_in[3].in_var_TEXCOORD10_centroid, gl_in[4].in_var_TEXCOORD10_centroid, gl_in[5].in_var_TEXCOORD10_centroid, gl_in[6].in_var_TEXCOORD10_centroid, gl_in[7].in_var_TEXCOORD10_centroid, gl_in[8].in_var_TEXCOORD10_centroid, gl_in[9].in_var_TEXCOORD10_centroid, gl_in[10].in_var_TEXCOORD10_centroid, gl_in[11].in_var_TEXCOORD10_centroid }); + spvUnsafeArray _139 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD11_centroid, gl_in[1].in_var_TEXCOORD11_centroid, gl_in[2].in_var_TEXCOORD11_centroid, gl_in[3].in_var_TEXCOORD11_centroid, gl_in[4].in_var_TEXCOORD11_centroid, gl_in[5].in_var_TEXCOORD11_centroid, gl_in[6].in_var_TEXCOORD11_centroid, gl_in[7].in_var_TEXCOORD11_centroid, gl_in[8].in_var_TEXCOORD11_centroid, gl_in[9].in_var_TEXCOORD11_centroid, gl_in[10].in_var_TEXCOORD11_centroid, gl_in[11].in_var_TEXCOORD11_centroid }); + spvUnsafeArray _188 = spvUnsafeArray({ gl_in[0].in_var_VS_To_DS_Position, gl_in[1].in_var_VS_To_DS_Position, gl_in[2].in_var_VS_To_DS_Position, gl_in[3].in_var_VS_To_DS_Position, gl_in[4].in_var_VS_To_DS_Position, gl_in[5].in_var_VS_To_DS_Position, gl_in[6].in_var_VS_To_DS_Position, gl_in[7].in_var_VS_To_DS_Position, gl_in[8].in_var_VS_To_DS_Position, gl_in[9].in_var_VS_To_DS_Position, gl_in[10].in_var_VS_To_DS_Position, gl_in[11].in_var_VS_To_DS_Position }); + spvUnsafeArray _189 = spvUnsafeArray({ gl_in[0].in_var_VS_To_DS_VertexID, gl_in[1].in_var_VS_To_DS_VertexID, gl_in[2].in_var_VS_To_DS_VertexID, gl_in[3].in_var_VS_To_DS_VertexID, gl_in[4].in_var_VS_To_DS_VertexID, gl_in[5].in_var_VS_To_DS_VertexID, gl_in[6].in_var_VS_To_DS_VertexID, gl_in[7].in_var_VS_To_DS_VertexID, gl_in[8].in_var_VS_To_DS_VertexID, gl_in[9].in_var_VS_To_DS_VertexID, gl_in[10].in_var_VS_To_DS_VertexID, gl_in[11].in_var_VS_To_DS_VertexID }); + spvUnsafeArray _226 = spvUnsafeArray({ FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[0], _139[0] } }, _188[0], _189[0] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[1], _139[1] } }, _188[1], _189[1] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[2], _139[2] } }, _188[2], _189[2] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[3], _139[3] } }, _188[3], _189[3] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[4], _139[4] } }, _188[4], _189[4] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[5], _139[5] } }, _188[5], _189[5] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[6], _139[6] } }, _188[6], _189[6] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[7], _139[7] } }, _188[7], _189[7] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[8], _139[8] } }, _188[8], _189[8] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[9], _139[9] } }, _188[9], _189[9] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[10], _139[10] } }, _188[10], _189[10] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _138[11], _139[11] } }, _188[11], _189[11] } }); + spvUnsafeArray param_var_I = _226; + float4 _243 = float4(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float3 _247 = Primitive.Primitive_NonUniformScale.xyz * float3x3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz, cross(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz) * float3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.w), param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz); + uint _250 = (gl_InvocationID < 2u) ? (gl_InvocationID + 1u) : 0u; + uint _251 = 2u * gl_InvocationID; + uint _252 = 3u + _251; + uint _253 = _251 + 4u; + uint _260 = (_250 < 2u) ? (_250 + 1u) : 0u; + uint _261 = 2u * _250; + uint _262 = 3u + _261; + uint _263 = _261 + 4u; + float4 _275 = float4(param_var_I[9u + gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float4 _311; + float4 _312; + float4 _313; + float4 _314; + if ((param_var_I[_262].VertexID < param_var_I[_250].VertexID) || ((param_var_I[_262].VertexID == param_var_I[_250].VertexID) && (param_var_I[_263].VertexID < param_var_I[_260].VertexID))) { - _315 = param_var_I[_267].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; - _316 = param_var_I[_267].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; - _317 = param_var_I[_266].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; - _318 = param_var_I[_266].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; + _311 = param_var_I[_263].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; + _312 = param_var_I[_263].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; + _313 = param_var_I[_262].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; + _314 = param_var_I[_262].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; } else { - _315 = param_var_I[_264].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; - _316 = param_var_I[_264].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; - _317 = param_var_I[_254].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; - _318 = param_var_I[_254].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; + _311 = param_var_I[_260].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; + _312 = param_var_I[_260].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; + _313 = param_var_I[_250].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0; + _314 = param_var_I[_250].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2; } - float4 _324 = float4(_318.xyz, 0.0); - float4 _328 = float4(_316.xyz, 0.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) }); + float4 _320 = float4(_314.xyz, 0.0); + float4 _324 = float4(_312.xyz, 0.0); + float4 _332 = float4(param_var_I[_250].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float4 _340 = float4(param_var_I[_252].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float4 _348 = float4(param_var_I[_253].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + spvUnsafeArray _398 = spvUnsafeArray({ param_var_I[gl_InvocationID].Position, (((((float4(2.0) * param_var_I[gl_InvocationID].Position) + param_var_I[_250].Position) - (float4(dot(param_var_I[_250].Position - param_var_I[gl_InvocationID].Position, _243)) * _243)) * float4(0.3333333432674407958984375)) + ((((float4(2.0) * param_var_I[_252].Position) + param_var_I[_253].Position) - (float4(dot(param_var_I[_253].Position - param_var_I[_252].Position, _340)) * _340)) * float4(0.3333333432674407958984375))) * float4(0.5), (((((float4(2.0) * param_var_I[_250].Position) + param_var_I[gl_InvocationID].Position) - (float4(dot(param_var_I[gl_InvocationID].Position - param_var_I[_250].Position, _332)) * _332)) * float4(0.3333333432674407958984375)) + ((((float4(2.0) * param_var_I[_253].Position) + param_var_I[_252].Position) - (float4(dot(param_var_I[_252].Position - param_var_I[_253].Position, _348)) * _348)) * float4(0.3333333432674407958984375))) * float4(0.5) }); 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; gl_out[gl_InvocationID].out_var_VS_To_DS_VertexID = param_var_I[gl_InvocationID].VertexID; - gl_out[gl_InvocationID].out_var_PN_POSITION = _402; - gl_out[gl_InvocationID].out_var_PN_DisplacementScales = _251; + gl_out[gl_InvocationID].out_var_PN_POSITION = _398; + gl_out[gl_InvocationID].out_var_PN_DisplacementScales = _247; gl_out[gl_InvocationID].out_var_PN_TessellationMultiplier = 1.0; gl_out[gl_InvocationID].out_var_PN_WorldDisplacementMultiplier = 1.0; gl_out[gl_InvocationID].out_var_PN_DominantVertex = float2(0.0); - gl_out[gl_InvocationID].out_var_PN_DominantVertex1 = _279; + gl_out[gl_InvocationID].out_var_PN_DominantVertex1 = _275; gl_out[gl_InvocationID].out_var_PN_DominantVertex2 = param_var_I[9u + gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz; gl_out[gl_InvocationID].out_var_PN_DominantEdge = float2(0.0); gl_out[gl_InvocationID].out_var_PN_DominantEdge1 = float2(0.0); - gl_out[gl_InvocationID].out_var_PN_DominantEdge2 = _324; - gl_out[gl_InvocationID].out_var_PN_DominantEdge3 = _328; - gl_out[gl_InvocationID].out_var_PN_DominantEdge4 = _317.xyz; - gl_out[gl_InvocationID].out_var_PN_DominantEdge5 = _315.xyz; - temp_var_hullMainRetVal[gl_InvocationID] = FPNTessellationHSToDS{ param_var_I[gl_InvocationID], _402, _251, 1.0, 1.0, FHullShaderConstantDominantVertexData{ float2(0.0), _279, param_var_I[9u + gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz }, FHullShaderConstantDominantEdgeData{ float2(0.0), float2(0.0), _324, _328, _317.xyz, _315.xyz } }; + gl_out[gl_InvocationID].out_var_PN_DominantEdge2 = _320; + gl_out[gl_InvocationID].out_var_PN_DominantEdge3 = _324; + gl_out[gl_InvocationID].out_var_PN_DominantEdge4 = _313.xyz; + gl_out[gl_InvocationID].out_var_PN_DominantEdge5 = _311.xyz; + temp_var_hullMainRetVal[gl_InvocationID] = FPNTessellationHSToDS{ param_var_I[gl_InvocationID], _398, _247, 1.0, 1.0, FHullShaderConstantDominantVertexData{ float2(0.0), _275, param_var_I[9u + gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz }, FHullShaderConstantDominantEdgeData{ float2(0.0), float2(0.0), _320, _324, _313.xyz, _311.xyz } }; threadgroup_barrier(mem_flags::mem_device | mem_flags::mem_threadgroup); 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; - _474.x = 0.5 * (temp_var_hullMainRetVal[1u].TessellationMultiplier + temp_var_hullMainRetVal[2u].TessellationMultiplier); - _474.y = 0.5 * (temp_var_hullMainRetVal[2u].TessellationMultiplier + temp_var_hullMainRetVal[0u].TessellationMultiplier); - _474.z = 0.5 * (temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier); - _474.w = 0.333000004291534423828125 * ((temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier) + temp_var_hullMainRetVal[2u].TessellationMultiplier); - float4 _600; + float4 _457 = (((((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 _470; + _470.x = 0.5 * (temp_var_hullMainRetVal[1u].TessellationMultiplier + temp_var_hullMainRetVal[2u].TessellationMultiplier); + _470.y = 0.5 * (temp_var_hullMainRetVal[2u].TessellationMultiplier + temp_var_hullMainRetVal[0u].TessellationMultiplier); + _470.z = 0.5 * (temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier); + _470.w = 0.333000004291534423828125 * ((temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier) + temp_var_hullMainRetVal[2u].TessellationMultiplier); + float4 _596; for (;;) { - float4 _500 = View.View_ViewToClip * float4(0.0); - float4 _505 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[0u].WorldPosition[0].xyz, 1.0); - float3 _506 = _505.xyz; - float3 _507 = _500.xyz; - float _509 = _505.w; - float _510 = _500.w; - float4 _527 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[1u].WorldPosition[0].xyz, 1.0); - float3 _528 = _527.xyz; - float _530 = _527.w; - float4 _548 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[2u].WorldPosition[0].xyz, 1.0); - float3 _549 = _548.xyz; - float _551 = _548.w; - if (any((((int3((_506 - _507) < float3(_509 + _510)) + (int3(2) * int3((_506 + _507) > float3((-_509) - _510)))) | (int3((_528 - _507) < float3(_530 + _510)) + (int3(2) * int3((_528 + _507) > float3((-_530) - _510))))) | (int3((_549 - _507) < float3(_551 + _510)) + (int3(2) * int3((_549 + _507) > float3((-_551) - _510))))) != int3(3))) + float4 _496 = View.View_ViewToClip * float4(0.0); + float4 _501 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[0u].WorldPosition[0].xyz, 1.0); + float3 _502 = _501.xyz; + float3 _503 = _496.xyz; + float _505 = _501.w; + float _506 = _496.w; + float4 _523 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[1u].WorldPosition[0].xyz, 1.0); + float3 _524 = _523.xyz; + float _526 = _523.w; + float4 _544 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[2u].WorldPosition[0].xyz, 1.0); + float3 _545 = _544.xyz; + float _547 = _544.w; + if (any((((int3((_502 - _503) < float3(_505 + _506)) + (int3(2) * int3((_502 + _503) > float3((-_505) - _506)))) | (int3((_524 - _503) < float3(_526 + _506)) + (int3(2) * int3((_524 + _503) > float3((-_526) - _506))))) | (int3((_545 - _503) < float3(_547 + _506)) + (int3(2) * int3((_545 + _503) > float3((-_547) - _506))))) != int3(3))) { - _600 = float4(0.0); + _596 = float4(0.0); break; } - float3 _569 = temp_var_hullMainRetVal[0u].WorldPosition[0].xyz - temp_var_hullMainRetVal[1u].WorldPosition[0].xyz; - float3 _570 = temp_var_hullMainRetVal[1u].WorldPosition[0].xyz - temp_var_hullMainRetVal[2u].WorldPosition[0].xyz; - float3 _571 = temp_var_hullMainRetVal[2u].WorldPosition[0].xyz - temp_var_hullMainRetVal[0u].WorldPosition[0].xyz; - float3 _574 = (float3(0.5) * (temp_var_hullMainRetVal[0u].WorldPosition[0].xyz + temp_var_hullMainRetVal[1u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); - float3 _577 = (float3(0.5) * (temp_var_hullMainRetVal[1u].WorldPosition[0].xyz + temp_var_hullMainRetVal[2u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); - float3 _580 = (float3(0.5) * (temp_var_hullMainRetVal[2u].WorldPosition[0].xyz + temp_var_hullMainRetVal[0u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); - float _584 = sqrt(dot(_570, _570) / dot(_577, _577)); - float _588 = sqrt(dot(_571, _571) / dot(_580, _580)); - float _592 = sqrt(dot(_569, _569) / dot(_574, _574)); - float4 _593 = float4(_584, _588, _592, 1.0); - _593.w = 0.333000004291534423828125 * ((_584 + _588) + _592); - _600 = float4(View.View_AdaptiveTessellationFactor) * _593; + float3 _565 = temp_var_hullMainRetVal[0u].WorldPosition[0].xyz - temp_var_hullMainRetVal[1u].WorldPosition[0].xyz; + float3 _566 = temp_var_hullMainRetVal[1u].WorldPosition[0].xyz - temp_var_hullMainRetVal[2u].WorldPosition[0].xyz; + float3 _567 = temp_var_hullMainRetVal[2u].WorldPosition[0].xyz - temp_var_hullMainRetVal[0u].WorldPosition[0].xyz; + float3 _570 = (float3(0.5) * (temp_var_hullMainRetVal[0u].WorldPosition[0].xyz + temp_var_hullMainRetVal[1u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float3 _573 = (float3(0.5) * (temp_var_hullMainRetVal[1u].WorldPosition[0].xyz + temp_var_hullMainRetVal[2u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float3 _576 = (float3(0.5) * (temp_var_hullMainRetVal[2u].WorldPosition[0].xyz + temp_var_hullMainRetVal[0u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float _580 = sqrt(dot(_566, _566) / dot(_573, _573)); + float _584 = sqrt(dot(_567, _567) / dot(_576, _576)); + float _588 = sqrt(dot(_565, _565) / dot(_570, _570)); + float4 _589 = float4(_580, _584, _588, 1.0); + _589.w = 0.333000004291534423828125 * ((_580 + _584) + _588); + _596 = float4(View.View_AdaptiveTessellationFactor) * _589; break; } - float4 _602 = fast::clamp(_474 * _600, float4(1.0), float4(15.0)); - spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[0u] = half(_602.x); - spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[1u] = half(_602.y); - spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[2u] = half(_602.z); - spvTessLevel[gl_PrimitiveID].insideTessellationFactor = half(_602.w); - patchOut.out_var_PN_POSITION9 = _461 + ((_461 - (((temp_var_hullMainRetVal[2u].WorldPosition[0] + temp_var_hullMainRetVal[1u].WorldPosition[0]) + temp_var_hullMainRetVal[0u].WorldPosition[0]) * float4(0.3333333432674407958984375))) * float4(0.5)); + float4 _598 = fast::clamp(_470 * _596, float4(1.0), float4(15.0)); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[0u] = half(_598.x); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[1u] = half(_598.y); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[2u] = half(_598.z); + spvTessLevel[gl_PrimitiveID].insideTessellationFactor = half(_598.w); + patchOut.out_var_PN_POSITION9 = _457 + ((_457 - (((temp_var_hullMainRetVal[2u].WorldPosition[0] + temp_var_hullMainRetVal[1u].WorldPosition[0]) + temp_var_hullMainRetVal[0u].WorldPosition[0]) * float4(0.3333333432674407958984375))) * float4(0.5)); } } diff --git a/reference/shaders-ue4/asm/tesc/hs-texcoord-array.invalid.asm.tesc b/reference/shaders-ue4/asm/tesc/hs-texcoord-array.invalid.asm.tesc index 23859bc5..a50dbb0d 100644 --- a/reference/shaders-ue4/asm/tesc/hs-texcoord-array.invalid.asm.tesc +++ b/reference/shaders-ue4/asm/tesc/hs-texcoord-array.invalid.asm.tesc @@ -286,7 +286,7 @@ struct type_Primitive float4 Primitive_CustomPrimitiveData[4]; }; -constant float4 _127 = {}; +constant float4 _123 = {}; struct main0_out { @@ -326,82 +326,82 @@ kernel void main0(main0_in in [[stage_in]], constant type_View& View [[buffer(0) threadgroup_barrier(mem_flags::mem_threadgroup); if (gl_InvocationID >= 3) return; - spvUnsafeArray _129 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD10_centroid, gl_in[3].in_var_TEXCOORD10_centroid, gl_in[4].in_var_TEXCOORD10_centroid, gl_in[5].in_var_TEXCOORD10_centroid, gl_in[6].in_var_TEXCOORD10_centroid, gl_in[7].in_var_TEXCOORD10_centroid, gl_in[8].in_var_TEXCOORD10_centroid, gl_in[9].in_var_TEXCOORD10_centroid, gl_in[10].in_var_TEXCOORD10_centroid, gl_in[11].in_var_TEXCOORD10_centroid }); - spvUnsafeArray _130 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD11_centroid, gl_in[1].in_var_TEXCOORD11_centroid, gl_in[2].in_var_TEXCOORD11_centroid, gl_in[3].in_var_TEXCOORD11_centroid, gl_in[4].in_var_TEXCOORD11_centroid, gl_in[5].in_var_TEXCOORD11_centroid, gl_in[6].in_var_TEXCOORD11_centroid, gl_in[7].in_var_TEXCOORD11_centroid, gl_in[8].in_var_TEXCOORD11_centroid, gl_in[9].in_var_TEXCOORD11_centroid, gl_in[10].in_var_TEXCOORD11_centroid, gl_in[11].in_var_TEXCOORD11_centroid }); - spvUnsafeArray _131 = spvUnsafeArray({ gl_in[0].in_var_COLOR0, gl_in[1].in_var_COLOR0, gl_in[2].in_var_COLOR0, gl_in[3].in_var_COLOR0, gl_in[4].in_var_COLOR0, gl_in[5].in_var_COLOR0, gl_in[6].in_var_COLOR0, gl_in[7].in_var_COLOR0, gl_in[8].in_var_COLOR0, gl_in[9].in_var_COLOR0, gl_in[10].in_var_COLOR0, gl_in[11].in_var_COLOR0 }); - spvUnsafeArray, 12> _132 = spvUnsafeArray, 12>({ spvUnsafeArray({ gl_in[0].in_var_TEXCOORD0_0, gl_in[0].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[1].in_var_TEXCOORD0_0, gl_in[1].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[2].in_var_TEXCOORD0_0, gl_in[2].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[3].in_var_TEXCOORD0_0, gl_in[3].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[4].in_var_TEXCOORD0_0, gl_in[4].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[5].in_var_TEXCOORD0_0, gl_in[5].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[6].in_var_TEXCOORD0_0, gl_in[6].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[7].in_var_TEXCOORD0_0, gl_in[7].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[8].in_var_TEXCOORD0_0, gl_in[8].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[9].in_var_TEXCOORD0_0, gl_in[9].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[10].in_var_TEXCOORD0_0, gl_in[10].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[11].in_var_TEXCOORD0_0, gl_in[11].in_var_TEXCOORD0_1 }) }); - spvUnsafeArray _205 = spvUnsafeArray({ gl_in[0].in_var_VS_To_DS_Position, gl_in[1].in_var_VS_To_DS_Position, gl_in[2].in_var_VS_To_DS_Position, gl_in[3].in_var_VS_To_DS_Position, gl_in[4].in_var_VS_To_DS_Position, gl_in[5].in_var_VS_To_DS_Position, gl_in[6].in_var_VS_To_DS_Position, gl_in[7].in_var_VS_To_DS_Position, gl_in[8].in_var_VS_To_DS_Position, gl_in[9].in_var_VS_To_DS_Position, gl_in[10].in_var_VS_To_DS_Position, gl_in[11].in_var_VS_To_DS_Position }); - spvUnsafeArray _230 = spvUnsafeArray({ FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[0], _130[0], _131[0], _132[0] } }, _205[0] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[1], _130[1], _131[1], _132[1] } }, _205[1] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[2], _130[2], _131[2], _132[2] } }, _205[2] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[3], _130[3], _131[3], _132[3] } }, _205[3] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[4], _130[4], _131[4], _132[4] } }, _205[4] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[5], _130[5], _131[5], _132[5] } }, _205[5] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[6], _130[6], _131[6], _132[6] } }, _205[6] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[7], _130[7], _131[7], _132[7] } }, _205[7] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[8], _130[8], _131[8], _132[8] } }, _205[8] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[9], _130[9], _131[9], _132[9] } }, _205[9] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[10], _130[10], _131[10], _132[10] } }, _205[10] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _129[11], _130[11], _131[11], _132[11] } }, _205[11] } }); - spvUnsafeArray param_var_I = _230; - float4 _247 = float4(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); - float3 _251 = Primitive.Primitive_NonUniformScale.xyz * float3x3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz, cross(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz) * float3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.w), param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz); - uint _254 = (gl_InvocationID < 2u) ? (gl_InvocationID + 1u) : 0u; - uint _255 = 2u * gl_InvocationID; - uint _256 = 3u + _255; - uint _257 = _255 + 4u; - 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 _125 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD10_centroid, gl_in[3].in_var_TEXCOORD10_centroid, gl_in[4].in_var_TEXCOORD10_centroid, gl_in[5].in_var_TEXCOORD10_centroid, gl_in[6].in_var_TEXCOORD10_centroid, gl_in[7].in_var_TEXCOORD10_centroid, gl_in[8].in_var_TEXCOORD10_centroid, gl_in[9].in_var_TEXCOORD10_centroid, gl_in[10].in_var_TEXCOORD10_centroid, gl_in[11].in_var_TEXCOORD10_centroid }); + spvUnsafeArray _126 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD11_centroid, gl_in[1].in_var_TEXCOORD11_centroid, gl_in[2].in_var_TEXCOORD11_centroid, gl_in[3].in_var_TEXCOORD11_centroid, gl_in[4].in_var_TEXCOORD11_centroid, gl_in[5].in_var_TEXCOORD11_centroid, gl_in[6].in_var_TEXCOORD11_centroid, gl_in[7].in_var_TEXCOORD11_centroid, gl_in[8].in_var_TEXCOORD11_centroid, gl_in[9].in_var_TEXCOORD11_centroid, gl_in[10].in_var_TEXCOORD11_centroid, gl_in[11].in_var_TEXCOORD11_centroid }); + spvUnsafeArray _127 = spvUnsafeArray({ gl_in[0].in_var_COLOR0, gl_in[1].in_var_COLOR0, gl_in[2].in_var_COLOR0, gl_in[3].in_var_COLOR0, gl_in[4].in_var_COLOR0, gl_in[5].in_var_COLOR0, gl_in[6].in_var_COLOR0, gl_in[7].in_var_COLOR0, gl_in[8].in_var_COLOR0, gl_in[9].in_var_COLOR0, gl_in[10].in_var_COLOR0, gl_in[11].in_var_COLOR0 }); + spvUnsafeArray, 12> _128 = spvUnsafeArray, 12>({ spvUnsafeArray({ gl_in[0].in_var_TEXCOORD0_0, gl_in[0].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[1].in_var_TEXCOORD0_0, gl_in[1].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[2].in_var_TEXCOORD0_0, gl_in[2].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[3].in_var_TEXCOORD0_0, gl_in[3].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[4].in_var_TEXCOORD0_0, gl_in[4].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[5].in_var_TEXCOORD0_0, gl_in[5].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[6].in_var_TEXCOORD0_0, gl_in[6].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[7].in_var_TEXCOORD0_0, gl_in[7].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[8].in_var_TEXCOORD0_0, gl_in[8].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[9].in_var_TEXCOORD0_0, gl_in[9].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[10].in_var_TEXCOORD0_0, gl_in[10].in_var_TEXCOORD0_1 }), spvUnsafeArray({ gl_in[11].in_var_TEXCOORD0_0, gl_in[11].in_var_TEXCOORD0_1 }) }); + spvUnsafeArray _201 = spvUnsafeArray({ gl_in[0].in_var_VS_To_DS_Position, gl_in[1].in_var_VS_To_DS_Position, gl_in[2].in_var_VS_To_DS_Position, gl_in[3].in_var_VS_To_DS_Position, gl_in[4].in_var_VS_To_DS_Position, gl_in[5].in_var_VS_To_DS_Position, gl_in[6].in_var_VS_To_DS_Position, gl_in[7].in_var_VS_To_DS_Position, gl_in[8].in_var_VS_To_DS_Position, gl_in[9].in_var_VS_To_DS_Position, gl_in[10].in_var_VS_To_DS_Position, gl_in[11].in_var_VS_To_DS_Position }); + spvUnsafeArray _226 = spvUnsafeArray({ FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[0], _126[0], _127[0], _128[0] } }, _201[0] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[1], _126[1], _127[1], _128[1] } }, _201[1] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[2], _126[2], _127[2], _128[2] } }, _201[2] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[3], _126[3], _127[3], _128[3] } }, _201[3] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[4], _126[4], _127[4], _128[4] } }, _201[4] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[5], _126[5], _127[5], _128[5] } }, _201[5] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[6], _126[6], _127[6], _128[6] } }, _201[6] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[7], _126[7], _127[7], _128[7] } }, _201[7] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[8], _126[8], _127[8], _128[8] } }, _201[8] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[9], _126[9], _127[9], _128[9] } }, _201[9] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[10], _126[10], _127[10], _128[10] } }, _201[10] }, FHitProxyVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _125[11], _126[11], _127[11], _128[11] } }, _201[11] } }); + spvUnsafeArray param_var_I = _226; + float4 _243 = float4(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float3 _247 = Primitive.Primitive_NonUniformScale.xyz * float3x3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz, cross(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz) * float3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.w), param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz); + uint _250 = (gl_InvocationID < 2u) ? (gl_InvocationID + 1u) : 0u; + uint _251 = 2u * gl_InvocationID; + uint _252 = 3u + _251; + uint _253 = _251 + 4u; + float4 _265 = float4(param_var_I[_250].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float4 _273 = float4(param_var_I[_252].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + float4 _281 = float4(param_var_I[_253].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, 0.0); + spvUnsafeArray _329 = spvUnsafeArray({ param_var_I[gl_InvocationID].Position, (((((float4(2.0) * param_var_I[gl_InvocationID].Position) + param_var_I[_250].Position) - (float4(dot(param_var_I[_250].Position - param_var_I[gl_InvocationID].Position, _243)) * _243)) * float4(0.3333333432674407958984375)) + ((((float4(2.0) * param_var_I[_252].Position) + param_var_I[_253].Position) - (float4(dot(param_var_I[_253].Position - param_var_I[_252].Position, _273)) * _273)) * float4(0.3333333432674407958984375))) * float4(0.5), (((((float4(2.0) * param_var_I[_250].Position) + param_var_I[gl_InvocationID].Position) - (float4(dot(param_var_I[gl_InvocationID].Position - param_var_I[_250].Position, _265)) * _265)) * float4(0.3333333432674407958984375)) + ((((float4(2.0) * param_var_I[_253].Position) + param_var_I[_252].Position) - (float4(dot(param_var_I[_252].Position - param_var_I[_253].Position, _281)) * _281)) * float4(0.3333333432674407958984375))) * float4(0.5) }); 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; gl_out[gl_InvocationID].out_var_TEXCOORD0 = param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TexCoords; gl_out[gl_InvocationID].out_var_VS_To_DS_Position = param_var_I[gl_InvocationID].Position; - gl_out[gl_InvocationID].out_var_PN_POSITION = _333; - gl_out[gl_InvocationID].out_var_PN_DisplacementScales = _251; + gl_out[gl_InvocationID].out_var_PN_POSITION = _329; + gl_out[gl_InvocationID].out_var_PN_DisplacementScales = _247; gl_out[gl_InvocationID].out_var_PN_TessellationMultiplier = 1.0; gl_out[gl_InvocationID].out_var_PN_WorldDisplacementMultiplier = 1.0; - temp_var_hullMainRetVal[gl_InvocationID] = FPNTessellationHSToDS{ param_var_I[gl_InvocationID], _333, _251, 1.0, 1.0 }; + temp_var_hullMainRetVal[gl_InvocationID] = FPNTessellationHSToDS{ param_var_I[gl_InvocationID], _329, _247, 1.0, 1.0 }; threadgroup_barrier(mem_flags::mem_device | mem_flags::mem_threadgroup); 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; - _398.x = 0.5 * (temp_var_hullMainRetVal[1u].TessellationMultiplier + temp_var_hullMainRetVal[2u].TessellationMultiplier); - _398.y = 0.5 * (temp_var_hullMainRetVal[2u].TessellationMultiplier + temp_var_hullMainRetVal[0u].TessellationMultiplier); - _398.z = 0.5 * (temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier); - _398.w = 0.333000004291534423828125 * ((temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier) + temp_var_hullMainRetVal[2u].TessellationMultiplier); - float4 _524; + float4 _381 = (((((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 _394; + _394.x = 0.5 * (temp_var_hullMainRetVal[1u].TessellationMultiplier + temp_var_hullMainRetVal[2u].TessellationMultiplier); + _394.y = 0.5 * (temp_var_hullMainRetVal[2u].TessellationMultiplier + temp_var_hullMainRetVal[0u].TessellationMultiplier); + _394.z = 0.5 * (temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier); + _394.w = 0.333000004291534423828125 * ((temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier) + temp_var_hullMainRetVal[2u].TessellationMultiplier); + float4 _520; for (;;) { - float4 _424 = View.View_ViewToClip * float4(0.0); - float4 _429 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[0u].WorldPosition[0].xyz, 1.0); - float3 _430 = _429.xyz; - float3 _431 = _424.xyz; - float _433 = _429.w; - float _434 = _424.w; - float4 _451 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[1u].WorldPosition[0].xyz, 1.0); - float3 _452 = _451.xyz; - float _454 = _451.w; - float4 _472 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[2u].WorldPosition[0].xyz, 1.0); - float3 _473 = _472.xyz; - float _475 = _472.w; - if (any((((int3((_430 - _431) < float3(_433 + _434)) + (int3(2) * int3((_430 + _431) > float3((-_433) - _434)))) | (int3((_452 - _431) < float3(_454 + _434)) + (int3(2) * int3((_452 + _431) > float3((-_454) - _434))))) | (int3((_473 - _431) < float3(_475 + _434)) + (int3(2) * int3((_473 + _431) > float3((-_475) - _434))))) != int3(3))) + float4 _420 = View.View_ViewToClip * float4(0.0); + float4 _425 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[0u].WorldPosition[0].xyz, 1.0); + float3 _426 = _425.xyz; + float3 _427 = _420.xyz; + float _429 = _425.w; + float _430 = _420.w; + float4 _447 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[1u].WorldPosition[0].xyz, 1.0); + float3 _448 = _447.xyz; + float _450 = _447.w; + float4 _468 = View.View_TranslatedWorldToClip * float4(temp_var_hullMainRetVal[2u].WorldPosition[0].xyz, 1.0); + float3 _469 = _468.xyz; + float _471 = _468.w; + if (any((((int3((_426 - _427) < float3(_429 + _430)) + (int3(2) * int3((_426 + _427) > float3((-_429) - _430)))) | (int3((_448 - _427) < float3(_450 + _430)) + (int3(2) * int3((_448 + _427) > float3((-_450) - _430))))) | (int3((_469 - _427) < float3(_471 + _430)) + (int3(2) * int3((_469 + _427) > float3((-_471) - _430))))) != int3(3))) { - _524 = float4(0.0); + _520 = float4(0.0); break; } - float3 _493 = temp_var_hullMainRetVal[0u].WorldPosition[0].xyz - temp_var_hullMainRetVal[1u].WorldPosition[0].xyz; - float3 _494 = temp_var_hullMainRetVal[1u].WorldPosition[0].xyz - temp_var_hullMainRetVal[2u].WorldPosition[0].xyz; - float3 _495 = temp_var_hullMainRetVal[2u].WorldPosition[0].xyz - temp_var_hullMainRetVal[0u].WorldPosition[0].xyz; - float3 _498 = (float3(0.5) * (temp_var_hullMainRetVal[0u].WorldPosition[0].xyz + temp_var_hullMainRetVal[1u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); - float3 _501 = (float3(0.5) * (temp_var_hullMainRetVal[1u].WorldPosition[0].xyz + temp_var_hullMainRetVal[2u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); - float3 _504 = (float3(0.5) * (temp_var_hullMainRetVal[2u].WorldPosition[0].xyz + temp_var_hullMainRetVal[0u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); - float _508 = sqrt(dot(_494, _494) / dot(_501, _501)); - float _512 = sqrt(dot(_495, _495) / dot(_504, _504)); - float _516 = sqrt(dot(_493, _493) / dot(_498, _498)); - float4 _517 = float4(_508, _512, _516, 1.0); - _517.w = 0.333000004291534423828125 * ((_508 + _512) + _516); - _524 = float4(View.View_AdaptiveTessellationFactor) * _517; + float3 _489 = temp_var_hullMainRetVal[0u].WorldPosition[0].xyz - temp_var_hullMainRetVal[1u].WorldPosition[0].xyz; + float3 _490 = temp_var_hullMainRetVal[1u].WorldPosition[0].xyz - temp_var_hullMainRetVal[2u].WorldPosition[0].xyz; + float3 _491 = temp_var_hullMainRetVal[2u].WorldPosition[0].xyz - temp_var_hullMainRetVal[0u].WorldPosition[0].xyz; + float3 _494 = (float3(0.5) * (temp_var_hullMainRetVal[0u].WorldPosition[0].xyz + temp_var_hullMainRetVal[1u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float3 _497 = (float3(0.5) * (temp_var_hullMainRetVal[1u].WorldPosition[0].xyz + temp_var_hullMainRetVal[2u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float3 _500 = (float3(0.5) * (temp_var_hullMainRetVal[2u].WorldPosition[0].xyz + temp_var_hullMainRetVal[0u].WorldPosition[0].xyz)) - float3(View.View_TranslatedWorldCameraOrigin); + float _504 = sqrt(dot(_490, _490) / dot(_497, _497)); + float _508 = sqrt(dot(_491, _491) / dot(_500, _500)); + float _512 = sqrt(dot(_489, _489) / dot(_494, _494)); + float4 _513 = float4(_504, _508, _512, 1.0); + _513.w = 0.333000004291534423828125 * ((_504 + _508) + _512); + _520 = float4(View.View_AdaptiveTessellationFactor) * _513; break; } - float4 _526 = fast::clamp(_398 * _524, float4(1.0), float4(15.0)); - spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[0u] = half(_526.x); - spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[1u] = half(_526.y); - spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[2u] = half(_526.z); - spvTessLevel[gl_PrimitiveID].insideTessellationFactor = half(_526.w); - patchOut.out_var_PN_POSITION9 = _385 + ((_385 - (((temp_var_hullMainRetVal[2u].WorldPosition[0] + temp_var_hullMainRetVal[1u].WorldPosition[0]) + temp_var_hullMainRetVal[0u].WorldPosition[0]) * float4(0.3333333432674407958984375))) * float4(0.5)); + float4 _522 = fast::clamp(_394 * _520, float4(1.0), float4(15.0)); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[0u] = half(_522.x); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[1u] = half(_522.y); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[2u] = half(_522.z); + spvTessLevel[gl_PrimitiveID].insideTessellationFactor = half(_522.w); + patchOut.out_var_PN_POSITION9 = _381 + ((_381 - (((temp_var_hullMainRetVal[2u].WorldPosition[0] + temp_var_hullMainRetVal[1u].WorldPosition[0]) + temp_var_hullMainRetVal[0u].WorldPosition[0]) * float4(0.3333333432674407958984375))) * float4(0.5)); } } diff --git a/reference/shaders-ue4/asm/tesc/tess-factor-must-be-threadgroup.invalid.asm.tesc b/reference/shaders-ue4/asm/tesc/tess-factor-must-be-threadgroup.invalid.asm.tesc index cab75e39..1945220f 100644 --- a/reference/shaders-ue4/asm/tesc/tess-factor-must-be-threadgroup.invalid.asm.tesc +++ b/reference/shaders-ue4/asm/tesc/tess-factor-must-be-threadgroup.invalid.asm.tesc @@ -115,7 +115,7 @@ struct type_Material float4 Material_ScalarExpressions[1]; }; -constant float4 _88 = {}; +constant float4 _85 = {}; struct main0_out { @@ -143,32 +143,32 @@ kernel void main0(main0_in in [[stage_in]], constant type_Primitive& Primitive [ threadgroup_barrier(mem_flags::mem_threadgroup); if (gl_InvocationID >= 3) return; - spvUnsafeArray _90 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD10_centroid }); - spvUnsafeArray _91 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD11_centroid, gl_in[1].in_var_TEXCOORD11_centroid, gl_in[2].in_var_TEXCOORD11_centroid }); - spvUnsafeArray _104 = spvUnsafeArray({ gl_in[0].in_var_VS_To_DS_Position, gl_in[1].in_var_VS_To_DS_Position, gl_in[2].in_var_VS_To_DS_Position }); - spvUnsafeArray _111 = spvUnsafeArray({ FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _90[0], _91[0] } }, FBasePassInterpolantsVSToDS{ { } }, _104[0] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _90[1], _91[1] } }, FBasePassInterpolantsVSToDS{ { } }, _104[1] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _90[2], _91[2] } }, FBasePassInterpolantsVSToDS{ { } }, _104[2] } }); - spvUnsafeArray param_var_I = _111; - float3 _128 = Primitive.Primitive_NonUniformScale.xyz * float3x3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz, cross(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz) * float3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.w), param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz); + spvUnsafeArray _87 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD10_centroid, gl_in[1].in_var_TEXCOORD10_centroid, gl_in[2].in_var_TEXCOORD10_centroid }); + spvUnsafeArray _88 = spvUnsafeArray({ gl_in[0].in_var_TEXCOORD11_centroid, gl_in[1].in_var_TEXCOORD11_centroid, gl_in[2].in_var_TEXCOORD11_centroid }); + spvUnsafeArray _101 = spvUnsafeArray({ gl_in[0].in_var_VS_To_DS_Position, gl_in[1].in_var_VS_To_DS_Position, gl_in[2].in_var_VS_To_DS_Position }); + spvUnsafeArray _108 = spvUnsafeArray({ FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _87[0], _88[0] } }, FBasePassInterpolantsVSToDS{ { } }, _101[0] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _87[1], _88[1] } }, FBasePassInterpolantsVSToDS{ { } }, _101[1] }, FBasePassVSToDS{ FVertexFactoryInterpolantsVSToDS{ FVertexFactoryInterpolantsVSToPS{ _87[2], _88[2] } }, FBasePassInterpolantsVSToDS{ { } }, _101[2] } }); + spvUnsafeArray param_var_I = _108; + float3 _125 = Primitive.Primitive_NonUniformScale.xyz * float3x3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz, cross(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz, param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld0.xyz) * float3(param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.w), param_var_I[gl_InvocationID].FactoryInterpolants.InterpolantsVSToPS.TangentToWorld2.xyz); 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; - gl_out[gl_InvocationID].out_var_Flat_DisplacementScales = _128; + gl_out[gl_InvocationID].out_var_Flat_DisplacementScales = _125; gl_out[gl_InvocationID].out_var_Flat_TessellationMultiplier = Material.Material_ScalarExpressions[0].x; gl_out[gl_InvocationID].out_var_Flat_WorldDisplacementMultiplier = 1.0; - temp_var_hullMainRetVal[gl_InvocationID] = FFlatTessellationHSToDS{ param_var_I[gl_InvocationID], _128, Material.Material_ScalarExpressions[0].x, 1.0 }; + temp_var_hullMainRetVal[gl_InvocationID] = FFlatTessellationHSToDS{ param_var_I[gl_InvocationID], _125, Material.Material_ScalarExpressions[0].x, 1.0 }; threadgroup_barrier(mem_flags::mem_device | mem_flags::mem_threadgroup); if (gl_InvocationID == 0u) { - float4 _154; - _154.x = 0.5 * (temp_var_hullMainRetVal[1u].TessellationMultiplier + temp_var_hullMainRetVal[2u].TessellationMultiplier); - _154.y = 0.5 * (temp_var_hullMainRetVal[2u].TessellationMultiplier + temp_var_hullMainRetVal[0u].TessellationMultiplier); - _154.z = 0.5 * (temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier); - _154.w = 0.333000004291534423828125 * ((temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier) + temp_var_hullMainRetVal[2u].TessellationMultiplier); - float4 _173 = fast::clamp(_154, float4(1.0), float4(15.0)); - spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[0u] = half(_173.x); - spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[1u] = half(_173.y); - spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[2u] = half(_173.z); - spvTessLevel[gl_PrimitiveID].insideTessellationFactor = half(_173.w); + float4 _151; + _151.x = 0.5 * (temp_var_hullMainRetVal[1u].TessellationMultiplier + temp_var_hullMainRetVal[2u].TessellationMultiplier); + _151.y = 0.5 * (temp_var_hullMainRetVal[2u].TessellationMultiplier + temp_var_hullMainRetVal[0u].TessellationMultiplier); + _151.z = 0.5 * (temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier); + _151.w = 0.333000004291534423828125 * ((temp_var_hullMainRetVal[0u].TessellationMultiplier + temp_var_hullMainRetVal[1u].TessellationMultiplier) + temp_var_hullMainRetVal[2u].TessellationMultiplier); + float4 _170 = fast::clamp(_151, float4(1.0), float4(15.0)); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[0u] = half(_170.x); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[1u] = half(_170.y); + spvTessLevel[gl_PrimitiveID].edgeTessellationFactor[2u] = half(_170.z); + spvTessLevel[gl_PrimitiveID].insideTessellationFactor = half(_170.w); } } diff --git a/reference/shaders/asm/comp/atomic-decrement.asm.comp b/reference/shaders/asm/comp/atomic-decrement.asm.comp index 5ece8257..bd92891d 100644 --- a/reference/shaders/asm/comp/atomic-decrement.asm.comp +++ b/reference/shaders/asm/comp/atomic-decrement.asm.comp @@ -10,9 +10,9 @@ layout(binding = 0, r32ui) uniform writeonly uimageBuffer u0; void main() { - uint _29 = atomicAdd(u0_counter.c, uint(-1)); + uint _24 = atomicAdd(u0_counter.c, uint(-1)); vec4 r0; - r0.x = uintBitsToFloat(_29); + r0.x = uintBitsToFloat(_24); imageStore(u0, int((uint(floatBitsToInt(r0.x)) * 1u) + (uint(0) >> 2u)), uvec4(uint(int(gl_GlobalInvocationID.x)))); } diff --git a/reference/shaders/asm/comp/atomic-increment.asm.comp b/reference/shaders/asm/comp/atomic-increment.asm.comp index 2a8f7118..00e195cc 100644 --- a/reference/shaders/asm/comp/atomic-increment.asm.comp +++ b/reference/shaders/asm/comp/atomic-increment.asm.comp @@ -10,9 +10,9 @@ layout(binding = 0, r32ui) uniform writeonly uimageBuffer u0; void main() { - uint _29 = atomicAdd(u0_counter.c, 1u); + uint _24 = atomicAdd(u0_counter.c, 1u); vec4 r0; - r0.x = uintBitsToFloat(_29); + r0.x = uintBitsToFloat(_24); imageStore(u0, int((uint(floatBitsToInt(r0.x)) * 1u) + (uint(0) >> 2u)), uvec4(uint(int(gl_GlobalInvocationID.x)))); } diff --git a/reference/shaders/asm/comp/builtin-compute-bitcast.asm.comp b/reference/shaders/asm/comp/builtin-compute-bitcast.asm.comp index abb8a797..0b89fa5c 100644 --- a/reference/shaders/asm/comp/builtin-compute-bitcast.asm.comp +++ b/reference/shaders/asm/comp/builtin-compute-bitcast.asm.comp @@ -4,10 +4,10 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; layout(binding = 0, std430) buffer BUF { int values[]; -} _6; +} _8; void main() { - _6.values[int(gl_WorkGroupID.y)] = int(gl_GlobalInvocationID.z); + _8.values[int(gl_WorkGroupID.y)] = int(gl_GlobalInvocationID.z); } diff --git a/reference/shaders/asm/comp/hlsl-functionality.asm.comp b/reference/shaders/asm/comp/hlsl-functionality.asm.comp index e80f5240..f4926ea2 100644 --- a/reference/shaders/asm/comp/hlsl-functionality.asm.comp +++ b/reference/shaders/asm/comp/hlsl-functionality.asm.comp @@ -13,8 +13,8 @@ layout(binding = 1, std430) buffer Buf_count void _main() { - int _29 = atomicAdd(Buf_count_1._count, 1); - Buf_1._data[_29] = vec4(1.0); + int _25 = atomicAdd(Buf_count_1._count, 1); + Buf_1._data[_25] = vec4(1.0); } void main() diff --git a/reference/shaders/asm/comp/logical.asm.comp b/reference/shaders/asm/comp/logical.asm.comp index 9ae25f78..17a8675e 100644 --- a/reference/shaders/asm/comp/logical.asm.comp +++ b/reference/shaders/asm/comp/logical.asm.comp @@ -24,8 +24,8 @@ bool and(bool a, bool b) bvec2 and(bvec2 a, bvec2 b) { - bvec2 _98 = bvec2(a.x && b.x, a.y && b.y); - return not(bvec2(_98.x || b.x, _98.y || b.y)); + bvec2 _48 = bvec2(a.x && b.x, a.y && b.y); + return not(bvec2(_48.x || b.x, _48.y || b.y)); } bvec3 and(bvec3 a, bvec3 b) diff --git a/reference/shaders/asm/comp/quantize.asm.comp b/reference/shaders/asm/comp/quantize.asm.comp index c0892138..6930e5f4 100644 --- a/reference/shaders/asm/comp/quantize.asm.comp +++ b/reference/shaders/asm/comp/quantize.asm.comp @@ -7,13 +7,13 @@ layout(binding = 0, std430) buffer SSBO0 vec2 vec2_val; vec3 vec3_val; vec4 vec4_val; -} _4; +} _12; void main() { - _4.scalar = unpackHalf2x16(packHalf2x16(vec2(_4.scalar))).x; - _4.vec2_val = unpackHalf2x16(packHalf2x16(_4.vec2_val)); - _4.vec3_val = vec3(unpackHalf2x16(packHalf2x16(_4.vec3_val.xy)), unpackHalf2x16(packHalf2x16(_4.vec3_val.zz)).x); - _4.vec4_val = vec4(unpackHalf2x16(packHalf2x16(_4.vec4_val.xy)), unpackHalf2x16(packHalf2x16(_4.vec4_val.zw))); + _12.scalar = unpackHalf2x16(packHalf2x16(vec2(_12.scalar))).x; + _12.vec2_val = unpackHalf2x16(packHalf2x16(_12.vec2_val)); + _12.vec3_val = vec3(unpackHalf2x16(packHalf2x16(_12.vec3_val.xy)), unpackHalf2x16(packHalf2x16(_12.vec3_val.zz)).x); + _12.vec4_val = vec4(unpackHalf2x16(packHalf2x16(_12.vec4_val.xy)), unpackHalf2x16(packHalf2x16(_12.vec4_val.zw))); } diff --git a/reference/shaders/asm/comp/specialization-constant-workgroup.asm.comp b/reference/shaders/asm/comp/specialization-constant-workgroup.asm.comp index 8016ebaf..e16bd191 100644 --- a/reference/shaders/asm/comp/specialization-constant-workgroup.asm.comp +++ b/reference/shaders/asm/comp/specialization-constant-workgroup.asm.comp @@ -12,10 +12,10 @@ layout(local_size_x = SPIRV_CROSS_CONSTANT_ID_10, local_size_y = 20, local_size_ layout(binding = 0, std430) buffer SSBO { float a; -} _4; +} _6; void main() { - _4.a += 1.0; + _6.a += 1.0; } diff --git a/reference/shaders/asm/comp/switch-break-ladder.asm.invalid.comp b/reference/shaders/asm/comp/switch-break-ladder.asm.invalid.comp index f326869c..a22f3c43 100644 --- a/reference/shaders/asm/comp/switch-break-ladder.asm.invalid.comp +++ b/reference/shaders/asm/comp/switch-break-ladder.asm.invalid.comp @@ -14,21 +14,21 @@ void main() int a; for (;;) { - bool _22_ladder_break = false; + bool _17_ladder_break = false; switch (c) { case 5: { for (;;) { - bool _30_ladder_break = false; + bool _25_ladder_break = false; switch (o.d) { case 10: case 20: { c += c; - _30_ladder_break = true; + _25_ladder_break = true; break; } default: @@ -36,7 +36,7 @@ void main() continue; } } - if (_30_ladder_break) + if (_25_ladder_break) { break; } @@ -48,11 +48,11 @@ void main() case 3: { a = c; - _22_ladder_break = true; + _17_ladder_break = true; break; } } - if (_22_ladder_break) + if (_17_ladder_break) { break; } diff --git a/reference/shaders/asm/frag/composite-construct-struct-no-swizzle.asm.frag b/reference/shaders/asm/frag/composite-construct-struct-no-swizzle.asm.frag index c64818d2..bbf9a7dd 100644 --- a/reference/shaders/asm/frag/composite-construct-struct-no-swizzle.asm.frag +++ b/reference/shaders/asm/frag/composite-construct-struct-no-swizzle.asm.frag @@ -13,7 +13,7 @@ layout(location = 0) out float FooOut; void main() { - SwizzleTest _22 = SwizzleTest(foo.x, foo.y); - FooOut = _22.a + _22.b; + SwizzleTest _19 = SwizzleTest(foo.x, foo.y); + FooOut = _19.a + _19.b; } diff --git a/reference/shaders/asm/frag/default-member-names.asm.frag b/reference/shaders/asm/frag/default-member-names.asm.frag index 57d4536c..82406520 100644 --- a/reference/shaders/asm/frag/default-member-names.asm.frag +++ b/reference/shaders/asm/frag/default-member-names.asm.frag @@ -1,11 +1,11 @@ #version 450 -struct _9 +struct _10 { float _m0; }; -struct _10 +struct _11 { float _m0; float _m1; @@ -19,14 +19,14 @@ struct _10 float _m9; float _m10; float _m11; - _9 _m12; + _10 _m12; }; layout(location = 0) out vec4 _3; void main() { - _10 _21; - _3 = vec4(_21._m0, _21._m1, _21._m2, _21._m3); + _11 _23; + _3 = vec4(_23._m0, _23._m1, _23._m2, _23._m3); } diff --git a/reference/shaders/asm/frag/empty-struct.asm.frag b/reference/shaders/asm/frag/empty-struct.asm.frag index 7c9d3933..b3712c00 100644 --- a/reference/shaders/asm/frag/empty-struct.asm.frag +++ b/reference/shaders/asm/frag/empty-struct.asm.frag @@ -17,9 +17,9 @@ float GetValue_1(EmptyStructTest self) void main() { - EmptyStructTest _23 = EmptyStructTest(0); + EmptyStructTest _24 = EmptyStructTest(0); EmptyStructTest emptyStruct; float value = GetValue(emptyStruct); - value = GetValue_1(_23); + value = GetValue_1(_24); } diff --git a/reference/shaders/asm/frag/for-loop-phi-only-continue.asm.frag b/reference/shaders/asm/frag/for-loop-phi-only-continue.asm.frag index 31011429..a97b0fb7 100644 --- a/reference/shaders/asm/frag/for-loop-phi-only-continue.asm.frag +++ b/reference/shaders/asm/frag/for-loop-phi-only-continue.asm.frag @@ -4,15 +4,15 @@ layout(location = 0) out vec4 FragColor; void main() { - float _19; - _19 = 0.0; - float _20; - int _23; - for (int _22 = 0; _22 < 16; _19 = _20, _22 = _23) + float _50; + _50 = 0.0; + float _25; + int _28; + for (int _47 = 0; _47 < 16; _50 = _25, _47 = _28) { - _20 = _19 + 1.0; - _23 = _22 + 1; + _25 = _50 + 1.0; + _28 = _47 + 1; } - FragColor = vec4(_19); + FragColor = vec4(_50); } diff --git a/reference/shaders/asm/frag/hlsl-sample-cmp-level-zero-cube.asm.frag b/reference/shaders/asm/frag/hlsl-sample-cmp-level-zero-cube.asm.frag index ec89d44e..ebaab6b9 100644 --- a/reference/shaders/asm/frag/hlsl-sample-cmp-level-zero-cube.asm.frag +++ b/reference/shaders/asm/frag/hlsl-sample-cmp-level-zero-cube.asm.frag @@ -6,8 +6,8 @@ layout(location = 0) out float _entryPointOutput; float _main() { - vec4 _33 = vec4(0.100000001490116119384765625, 0.100000001490116119384765625, 0.100000001490116119384765625, 0.5); - return textureGrad(SPIRV_Cross_CombinedpointLightShadowMapshadowSamplerPCF, vec4(_33.xyz, _33.w), vec3(0.0), vec3(0.0)); + vec4 _29 = vec4(0.100000001490116119384765625, 0.100000001490116119384765625, 0.100000001490116119384765625, 0.5); + return textureGrad(SPIRV_Cross_CombinedpointLightShadowMapshadowSamplerPCF, vec4(_29.xyz, _29.w), vec3(0.0), vec3(0.0)); } void main() diff --git a/reference/shaders/asm/frag/hlsl-sample-cmp-level-zero.asm.frag b/reference/shaders/asm/frag/hlsl-sample-cmp-level-zero.asm.frag index 63856ddd..fc1fa20c 100644 --- a/reference/shaders/asm/frag/hlsl-sample-cmp-level-zero.asm.frag +++ b/reference/shaders/asm/frag/hlsl-sample-cmp-level-zero.asm.frag @@ -9,8 +9,8 @@ layout(location = 0) out vec4 _entryPointOutput; vec4 _main(vec2 texCoords_1, float cascadeIndex_1, float fragDepth_1) { - vec4 _60 = vec4(vec3(texCoords_1, cascadeIndex_1), fragDepth_1); - float c = textureGrad(SPIRV_Cross_CombinedShadowMapShadowSamplerPCF, vec4(_60.xyz, _60.w), vec2(0.0), vec2(0.0)); + vec4 _39 = vec4(vec3(texCoords_1, cascadeIndex_1), fragDepth_1); + float c = textureGrad(SPIRV_Cross_CombinedShadowMapShadowSamplerPCF, vec4(_39.xyz, _39.w), vec2(0.0), vec2(0.0)); return vec4(c, c, c, c); } diff --git a/reference/shaders/asm/frag/implicit-read-dep-phi.asm.frag b/reference/shaders/asm/frag/implicit-read-dep-phi.asm.frag index 6bc1be0d..0596ed62 100644 --- a/reference/shaders/asm/frag/implicit-read-dep-phi.asm.frag +++ b/reference/shaders/asm/frag/implicit-read-dep-phi.asm.frag @@ -9,20 +9,20 @@ void main() { int i = 0; float phi; - vec4 _36; + vec4 _45; phi = 1.0; - _36 = vec4(1.0, 2.0, 1.0, 2.0); + _45 = vec4(1.0, 2.0, 1.0, 2.0); for (;;) { - FragColor = _36; + FragColor = _45; if (i < 4) { if (v0[i] > 0.0) { - vec2 _48 = vec2(phi); + vec2 _43 = vec2(phi); i++; phi += 2.0; - _36 = textureLod(uImage, _48, 0.0); + _45 = textureLod(uImage, _43, 0.0); continue; } else diff --git a/reference/shaders/asm/frag/invalidation.asm.frag b/reference/shaders/asm/frag/invalidation.asm.frag index db118180..1aba1cfa 100644 --- a/reference/shaders/asm/frag/invalidation.asm.frag +++ b/reference/shaders/asm/frag/invalidation.asm.frag @@ -8,8 +8,8 @@ void main() { float a = v0; float b = v1; - float _17 = a; + float _16 = a; a = v1; - FragColor = (_17 + b) * b; + FragColor = (_16 + b) * b; } diff --git a/reference/shaders/asm/frag/locations-components.asm.frag b/reference/shaders/asm/frag/locations-components.asm.frag index 95dcd9ce..4b0870e6 100644 --- a/reference/shaders/asm/frag/locations-components.asm.frag +++ b/reference/shaders/asm/frag/locations-components.asm.frag @@ -1,21 +1,21 @@ #version 450 -layout(location = 1) in vec2 _2; -layout(location = 1, component = 2) in float _3; -layout(location = 2) flat in float _4; -layout(location = 2, component = 1) flat in uint _5; -layout(location = 2, component = 2) flat in uint _6; +layout(location = 1) in vec2 _8; +layout(location = 1, component = 2) in float _16; +layout(location = 2) flat in float _22; +layout(location = 2, component = 1) flat in uint _28; +layout(location = 2, component = 2) flat in uint _33; layout(location = 0) out vec4 o0; vec4 v1; vec4 v2; void main() { - v1 = vec4(_2.x, _2.y, v1.z, v1.w); - v1.z = _3; - v2.x = _4; - v2.y = uintBitsToFloat(_5); - v2.z = uintBitsToFloat(_6); + v1 = vec4(_8.x, _8.y, v1.z, v1.w); + v1.z = _16; + v2.x = _22; + v2.y = uintBitsToFloat(_28); + v2.z = uintBitsToFloat(_33); vec4 r0; r0.x = intBitsToFloat(floatBitsToInt(v2.y) + floatBitsToInt(v2.z)); o0.y = float(floatBitsToUint(r0.x)); diff --git a/reference/shaders/asm/frag/loop-body-dominator-continue-access.asm.frag b/reference/shaders/asm/frag/loop-body-dominator-continue-access.asm.frag index 3ee68e32..6d46bc15 100644 --- a/reference/shaders/asm/frag/loop-body-dominator-continue-access.asm.frag +++ b/reference/shaders/asm/frag/loop-body-dominator-continue-access.asm.frag @@ -17,7 +17,7 @@ layout(binding = 0, std140) uniform Foo layout(row_major) mat4 lightVP[64]; uint shadowCascadesNum; int test; -} _11; +} _16; layout(location = 0) in vec3 fragWorld; layout(location = 0) out int _entryPointOutput; @@ -26,7 +26,7 @@ mat4 spvWorkaroundRowMajor(mat4 wrap) { return wrap; } mat4 GetClip2TexMatrix() { - if (_11.test == 0) + if (_16.test == 0) { return 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)); } @@ -36,9 +36,9 @@ mat4 GetClip2TexMatrix() int GetCascade(vec3 fragWorldPosition) { SPIRV_CROSS_UNROLL - for (uint cascadeIndex = 0u; cascadeIndex < _11.shadowCascadesNum; cascadeIndex++) + for (uint cascadeIndex = 0u; cascadeIndex < _16.shadowCascadesNum; cascadeIndex++) { - mat4 worldToShadowMap = GetClip2TexMatrix() * spvWorkaroundRowMajor(_11.lightVP[cascadeIndex]); + mat4 worldToShadowMap = GetClip2TexMatrix() * spvWorkaroundRowMajor(_16.lightVP[cascadeIndex]); vec4 fragShadowMapPos = worldToShadowMap * vec4(fragWorldPosition, 1.0); if ((((fragShadowMapPos.z >= 0.0) && (fragShadowMapPos.z <= 1.0)) && (max(fragShadowMapPos.x, fragShadowMapPos.y) <= 1.0)) && (min(fragShadowMapPos.x, fragShadowMapPos.y) >= 0.0)) { diff --git a/reference/shaders/asm/frag/loop-header-to-continue.asm.frag b/reference/shaders/asm/frag/loop-header-to-continue.asm.frag index 8a3b664b..65676d2a 100644 --- a/reference/shaders/asm/frag/loop-header-to-continue.asm.frag +++ b/reference/shaders/asm/frag/loop-header-to-continue.asm.frag @@ -13,7 +13,7 @@ struct Params layout(binding = 1, std140) uniform CB1 { Params CB1; -} _8; +} _12; uniform sampler2D SPIRV_Cross_CombinedmapTexturemapSampler; @@ -22,24 +22,24 @@ layout(location = 0) out vec4 _entryPointOutput; void main() { - vec2 _45 = vec2(0.0, _8.CB1.TextureSize.w); - vec4 _49 = texture(SPIRV_Cross_CombinedmapTexturemapSampler, IN_uv); - float _50 = _49.y; - float _53 = clamp((_50 * 80.0) * 0.0007999999797903001308441162109375, 7.999999797903001308441162109375e-05, 0.008000000379979610443115234375); - float _55; - float _58; - _55 = 0.0; - _58 = 0.0; - for (int _60 = -3; _60 <= 3; ) + vec2 _180 = vec2(0.0, _12.CB1.TextureSize.w); + vec4 _206 = texture(SPIRV_Cross_CombinedmapTexturemapSampler, IN_uv); + float _207 = _206.y; + float _211 = clamp((_207 * 80.0) * 0.0007999999797903001308441162109375, 7.999999797903001308441162109375e-05, 0.008000000379979610443115234375); + float _276; + float _277; + _276 = 0.0; + _277 = 0.0; + for (int _278 = -3; _278 <= 3; ) { - float _64 = float(_60); - vec4 _72 = texture(SPIRV_Cross_CombinedmapTexturemapSampler, IN_uv + (_45 * _64)); - float _78 = exp(((-_64) * _64) * 0.2222220003604888916015625) * float(abs(_72.y - _50) < _53); - _55 += (_72.x * _78); - _58 += _78; - _60++; + float _220 = float(_278); + vec4 _236 = texture(SPIRV_Cross_CombinedmapTexturemapSampler, IN_uv + (_180 * _220)); + float _246 = exp(((-_220) * _220) * 0.2222220003604888916015625) * float(abs(_236.y - _207) < _211); + _276 += (_236.x * _246); + _277 += _246; + _278++; continue; } - _entryPointOutput = vec4(_55 / _58, _50, 0.0, 1.0); + _entryPointOutput = vec4(_276 / _277, _207, 0.0, 1.0); } diff --git a/reference/shaders/asm/frag/lut-promotion-initializer.asm.frag b/reference/shaders/asm/frag/lut-promotion-initializer.asm.frag index c08bc2c7..d7bb4c5f 100644 --- a/reference/shaders/asm/frag/lut-promotion-initializer.asm.frag +++ b/reference/shaders/asm/frag/lut-promotion-initializer.asm.frag @@ -2,32 +2,32 @@ precision mediump float; precision highp int; -const float _46[16] = float[](1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0); -const vec4 _76[4] = vec4[](vec4(0.0), vec4(1.0), vec4(8.0), vec4(5.0)); +const float _16[16] = float[](1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0); +const vec4 _60[4] = vec4[](vec4(0.0), vec4(1.0), vec4(8.0), vec4(5.0)); layout(location = 0) out float FragColor; layout(location = 0) flat in mediump int index; void main() { - vec4 foobar[4] = _76; - vec4 baz[4] = _76; - FragColor = _46[index]; + vec4 foobar[4] = _60; + vec4 baz[4] = _60; + FragColor = _16[index]; if (index < 10) { - FragColor += _46[index ^ 1]; + FragColor += _16[index ^ 1]; } else { - FragColor += _46[index & 1]; + FragColor += _16[index & 1]; } if (index > 30) { - FragColor += _76[index & 3].y; + FragColor += _60[index & 3].y; } else { - FragColor += _76[index & 1].x; + FragColor += _60[index & 1].x; } if (index > 30) { diff --git a/reference/shaders/asm/frag/op-constant-null.asm.frag b/reference/shaders/asm/frag/op-constant-null.asm.frag index f293c180..b2fb66ec 100644 --- a/reference/shaders/asm/frag/op-constant-null.asm.frag +++ b/reference/shaders/asm/frag/op-constant-null.asm.frag @@ -8,7 +8,7 @@ struct D float b; }; -const vec4 _14[4] = vec4[](vec4(0.0), vec4(0.0), vec4(0.0), vec4(0.0)); +const vec4 _41[4] = vec4[](vec4(0.0), vec4(0.0), vec4(0.0), vec4(0.0)); layout(location = 0) out float FragColor; diff --git a/reference/shaders/asm/frag/op-phi-swap-continue-block.asm.frag b/reference/shaders/asm/frag/op-phi-swap-continue-block.asm.frag index d62b63a0..19702f3c 100644 --- a/reference/shaders/asm/frag/op-phi-swap-continue-block.asm.frag +++ b/reference/shaders/asm/frag/op-phi-swap-continue-block.asm.frag @@ -5,20 +5,20 @@ layout(binding = 0, std140) uniform UBO int uCount; int uJ; int uK; -} _5; +} _7; layout(location = 0) out float FragColor; void main() { - int _23; - int _23_copy; - int _24; - _23 = _5.uK; - _24 = _5.uJ; - for (int _26 = 0; _26 < _5.uCount; _23_copy = _23, _23 = _24, _24 = _23_copy, _26++) + int _53; + int _54; + int _54_copy; + _54 = _7.uK; + _53 = _7.uJ; + for (int _52 = 0; _52 < _7.uCount; _54_copy = _54, _54 = _53, _53 = _54_copy, _52++) { } - FragColor = float(_24 - _23) * float(_5.uJ * _5.uK); + FragColor = float(_53 - _54) * float(_7.uJ * _7.uK); } diff --git a/reference/shaders/asm/frag/out-of-bounds-access-opspecconstant.asm.frag b/reference/shaders/asm/frag/out-of-bounds-access-opspecconstant.asm.frag index eddb3829..47e44bdd 100644 --- a/reference/shaders/asm/frag/out-of-bounds-access-opspecconstant.asm.frag +++ b/reference/shaders/asm/frag/out-of-bounds-access-opspecconstant.asm.frag @@ -2,7 +2,7 @@ precision mediump float; precision highp int; -const uint _15 = 3u; +const uint _18 = 3u; void main() { diff --git a/reference/shaders/asm/frag/phi-loop-variable.asm.frag b/reference/shaders/asm/frag/phi-loop-variable.asm.frag index 786ac74d..e3f8c674 100644 --- a/reference/shaders/asm/frag/phi-loop-variable.asm.frag +++ b/reference/shaders/asm/frag/phi-loop-variable.asm.frag @@ -2,7 +2,7 @@ void main() { - for (int _22 = 35; _22 >= 0; _22--) + for (int _58 = 35; _58 >= 0; _58--) { } } diff --git a/reference/shaders/asm/frag/sampler-buffer-without-sampler.asm.frag b/reference/shaders/asm/frag/sampler-buffer-without-sampler.asm.frag index 1ebf8fb9..264f5610 100644 --- a/reference/shaders/asm/frag/sampler-buffer-without-sampler.asm.frag +++ b/reference/shaders/asm/frag/sampler-buffer-without-sampler.asm.frag @@ -14,7 +14,7 @@ vec4 _main() void main() { - vec4 _28 = _main(); - _entryPointOutput = _28; + vec4 _35 = _main(); + _entryPointOutput = _35; } diff --git a/reference/shaders/asm/frag/storage-class-output-initializer.asm.frag b/reference/shaders/asm/frag/storage-class-output-initializer.asm.frag index a5faaefb..b839921a 100644 --- a/reference/shaders/asm/frag/storage-class-output-initializer.asm.frag +++ b/reference/shaders/asm/frag/storage-class-output-initializer.asm.frag @@ -2,12 +2,12 @@ layout(location = 0) out vec4 FragColors[2]; layout(location = 2) out vec4 FragColor; -const vec4 _3_init[2] = vec4[](vec4(1.0, 2.0, 3.0, 4.0), vec4(10.0)); -const vec4 _4_init = vec4(5.0); +const vec4 _4_init[2] = vec4[](vec4(1.0, 2.0, 3.0, 4.0), vec4(10.0)); +const vec4 _6_init = vec4(5.0); void main() { - FragColors = _3_init; - FragColor = _4_init; + FragColors = _4_init; + FragColor = _6_init; } diff --git a/reference/shaders/asm/frag/struct-composite-extract-swizzle.asm.frag b/reference/shaders/asm/frag/struct-composite-extract-swizzle.asm.frag index 7930ca3b..396b9813 100644 --- a/reference/shaders/asm/frag/struct-composite-extract-swizzle.asm.frag +++ b/reference/shaders/asm/frag/struct-composite-extract-swizzle.asm.frag @@ -8,7 +8,7 @@ struct Foo float var2; }; -Foo _22; +Foo _33; layout(binding = 0) uniform mediump sampler2D uSampler; @@ -16,6 +16,6 @@ layout(location = 0) out vec4 FragColor; void main() { - FragColor = texture(uSampler, vec2(_22.var1, _22.var2)); + FragColor = texture(uSampler, vec2(_33.var1, _33.var2)); } diff --git a/reference/shaders/asm/frag/switch-label-shared-block.asm.frag b/reference/shaders/asm/frag/switch-label-shared-block.asm.frag index 748f96c8..61b45c6d 100644 --- a/reference/shaders/asm/frag/switch-label-shared-block.asm.frag +++ b/reference/shaders/asm/frag/switch-label-shared-block.asm.frag @@ -7,26 +7,26 @@ layout(location = 0) out float FragColor; void main() { - highp float _19; + highp float _27; switch (vIndex) { case 0: case 2: { - _19 = 1.0; + _27 = 1.0; break; } default: { - _19 = 3.0; + _27 = 3.0; break; } case 8: { - _19 = 8.0; + _27 = 8.0; break; } } - FragColor = _19; + FragColor = _27; } diff --git a/reference/shaders/asm/frag/temporary-phi-hoisting.asm.frag b/reference/shaders/asm/frag/temporary-phi-hoisting.asm.frag index 4cee76cc..b5d188fe 100644 --- a/reference/shaders/asm/frag/temporary-phi-hoisting.asm.frag +++ b/reference/shaders/asm/frag/temporary-phi-hoisting.asm.frag @@ -8,19 +8,19 @@ struct MyStruct layout(binding = 0, std140) uniform MyStruct_CB { MyStruct g_MyStruct[4]; -} _6; +} _8; layout(location = 0) out vec4 _entryPointOutput; void main() { - vec3 _28; - _28 = vec3(0.0); - vec3 _29; - for (int _31 = 0; _31 < 4; _28 = _29, _31++) + vec3 _85; + _85 = vec3(0.0); + vec3 _77; + for (int _86 = 0; _86 < 4; _85 = _77, _86++) { - _29 = _28 + _6.g_MyStruct[_31].color.xyz; + _77 = _85 + _8.g_MyStruct[_86].color.xyz; } - _entryPointOutput = vec4(_28, 1.0); + _entryPointOutput = vec4(_85, 1.0); } diff --git a/reference/shaders/asm/frag/undef-variable-store.asm.frag b/reference/shaders/asm/frag/undef-variable-store.asm.frag index a3b1290d..990fde79 100644 --- a/reference/shaders/asm/frag/undef-variable-store.asm.frag +++ b/reference/shaders/asm/frag/undef-variable-store.asm.frag @@ -1,29 +1,29 @@ #version 450 -vec4 _38; -vec4 _47; +vec4 _48; +vec4 _31; layout(location = 0) out vec4 _entryPointOutput; void main() { - vec4 _27; + vec4 _37; do { - vec2 _26 = vec2(0.0); - if (_26.x != 0.0) + vec2 _35 = vec2(0.0); + if (_35.x != 0.0) { - _27 = vec4(1.0, 0.0, 0.0, 1.0); + _37 = vec4(1.0, 0.0, 0.0, 1.0); break; } else { - _27 = vec4(1.0, 1.0, 0.0, 1.0); + _37 = vec4(1.0, 1.0, 0.0, 1.0); break; } - _27 = _38; + _37 = _48; break; } while (false); - _entryPointOutput = _27; + _entryPointOutput = _37; } diff --git a/reference/shaders/asm/frag/unreachable.asm.frag b/reference/shaders/asm/frag/unreachable.asm.frag index beb8708e..dd71ba40 100644 --- a/reference/shaders/asm/frag/unreachable.asm.frag +++ b/reference/shaders/asm/frag/unreachable.asm.frag @@ -1,28 +1,28 @@ #version 450 -vec4 _21; +vec4 _44; layout(location = 0) flat in int counter; layout(location = 0) out vec4 FragColor; void main() { - vec4 _24; - _24 = _21; - vec4 _33; + vec4 _45; + _45 = _44; + vec4 _46; for (;;) { if (counter == 10) { - _33 = vec4(10.0); + _46 = vec4(10.0); break; } else { - _33 = vec4(30.0); + _46 = vec4(30.0); break; } } - FragColor = _33; + FragColor = _46; } diff --git a/reference/shaders/asm/frag/vector-shuffle-oom.asm.frag b/reference/shaders/asm/frag/vector-shuffle-oom.asm.frag index 97c9a2eb..e68d972f 100644 --- a/reference/shaders/asm/frag/vector-shuffle-oom.asm.frag +++ b/reference/shaders/asm/frag/vector-shuffle-oom.asm.frag @@ -12,21 +12,21 @@ #define SPIRV_CROSS_LOOP #endif -struct _28 +struct _15 { vec4 _m0; }; -_28 _74; +_15 _10264; -layout(binding = 0, std140) uniform _6_7 +layout(binding = 0, std140) uniform _3_22044 { vec4 _m0; float _m1; vec4 _m2; -} _7; +} _22044; -layout(binding = 2, std140) uniform _10_11 +layout(binding = 2, std140) uniform _4_12348 { vec3 _m0; vec3 _m1; @@ -53,9 +53,9 @@ layout(binding = 2, std140) uniform _10_11 vec4 _m22; layout(row_major) mat4 _m23; vec4 _m24; -} _11; +} _12348; -layout(binding = 1, std140) uniform _18_19 +layout(binding = 1, std140) uniform _7_15259 { layout(row_major) mat4 _m0; layout(row_major) mat4 _m1; @@ -96,231 +96,231 @@ layout(binding = 1, std140) uniform _18_19 vec3 _m36; layout(row_major) mat4 _m37[2]; vec4 _m38[2]; -} _19; +} _15259; uniform sampler2D SPIRV_Cross_Combined; uniform sampler2D SPIRV_Cross_Combined_1; uniform sampler2D SPIRV_Cross_Combined_2; -layout(location = 0) out vec4 _5; +layout(location = 0) out vec4 _4317; void main() { - _28 _77; - _77._m0 = vec4(0.0); - vec2 _82 = gl_FragCoord.xy * _19._m23.xy; - vec4 _88 = _7._m2 * _7._m0.xyxy; - vec2 _97 = clamp(_82 + (vec3(0.0, -2.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw); - vec3 _109 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _97, 0.0).w * _7._m1, 0.0, 1.0); - vec4 _113 = textureLod(SPIRV_Cross_Combined_1, _97, 0.0); - vec3 _129; + _15 _13863; + _13863._m0 = vec4(0.0); + vec2 _19927 = gl_FragCoord.xy * _15259._m23.xy; + vec4 _17581 = _22044._m2 * _22044._m0.xyxy; + vec2 _13149 = clamp(_19927 + (vec3(0.0, -2.0, 0.5).xy * _22044._m0.xy), _17581.xy, _17581.zw); + vec3 _12103 = _12348._m5 * clamp(textureLod(SPIRV_Cross_Combined, _13149, 0.0).w * _22044._m1, 0.0, 1.0); + vec4 _17670 = textureLod(SPIRV_Cross_Combined_1, _13149, 0.0); + vec3 _7719; SPIRV_CROSS_BRANCH - if (_113.y > 0.0) + if (_17670.y > 0.0) { - _129 = _109 + (textureLod(SPIRV_Cross_Combined_2, _97, 0.0).xyz * clamp(_113.y * _113.z, 0.0, 1.0)); + _7719 = _12103 + (textureLod(SPIRV_Cross_Combined_2, _13149, 0.0).xyz * clamp(_17670.y * _17670.z, 0.0, 1.0)); } else { - _129 = _109; + _7719 = _12103; } - vec3 _133 = vec4(0.0).xyz + (_129 * 0.5); - vec4 _134 = vec4(_133.x, _133.y, _133.z, vec4(0.0).w); - _77._m0 = _134; - vec2 _144 = clamp(_82 + (vec3(-1.0, -1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw); - vec3 _156 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _144, 0.0).w * _7._m1, 0.0, 1.0); - vec4 _160 = textureLod(SPIRV_Cross_Combined_1, _144, 0.0); - vec3 _176; + vec3 _22177 = vec4(0.0).xyz + (_7719 * 0.5); + vec4 _15527 = vec4(_22177.x, _22177.y, _22177.z, vec4(0.0).w); + _13863._m0 = _15527; + vec2 _13150 = clamp(_19927 + (vec3(-1.0, -1.0, 0.5).xy * _22044._m0.xy), _17581.xy, _17581.zw); + vec3 _12104 = _12348._m5 * clamp(textureLod(SPIRV_Cross_Combined, _13150, 0.0).w * _22044._m1, 0.0, 1.0); + vec4 _17671 = textureLod(SPIRV_Cross_Combined_1, _13150, 0.0); + vec3 _7720; SPIRV_CROSS_BRANCH - if (_160.y > 0.0) + if (_17671.y > 0.0) { - _176 = _156 + (textureLod(SPIRV_Cross_Combined_2, _144, 0.0).xyz * clamp(_160.y * _160.z, 0.0, 1.0)); + _7720 = _12104 + (textureLod(SPIRV_Cross_Combined_2, _13150, 0.0).xyz * clamp(_17671.y * _17671.z, 0.0, 1.0)); } else { - _176 = _156; + _7720 = _12104; } - vec3 _180 = _134.xyz + (_176 * 0.5); - vec4 _181 = vec4(_180.x, _180.y, _180.z, _134.w); - _77._m0 = _181; - vec2 _191 = clamp(_82 + (vec3(0.0, -1.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw); - vec3 _203 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _191, 0.0).w * _7._m1, 0.0, 1.0); - vec4 _207 = textureLod(SPIRV_Cross_Combined_1, _191, 0.0); - vec3 _223; + vec3 _22178 = _15527.xyz + (_7720 * 0.5); + vec4 _15528 = vec4(_22178.x, _22178.y, _22178.z, _15527.w); + _13863._m0 = _15528; + vec2 _13151 = clamp(_19927 + (vec3(0.0, -1.0, 0.75).xy * _22044._m0.xy), _17581.xy, _17581.zw); + vec3 _12105 = _12348._m5 * clamp(textureLod(SPIRV_Cross_Combined, _13151, 0.0).w * _22044._m1, 0.0, 1.0); + vec4 _17672 = textureLod(SPIRV_Cross_Combined_1, _13151, 0.0); + vec3 _7721; SPIRV_CROSS_BRANCH - if (_207.y > 0.0) + if (_17672.y > 0.0) { - _223 = _203 + (textureLod(SPIRV_Cross_Combined_2, _191, 0.0).xyz * clamp(_207.y * _207.z, 0.0, 1.0)); + _7721 = _12105 + (textureLod(SPIRV_Cross_Combined_2, _13151, 0.0).xyz * clamp(_17672.y * _17672.z, 0.0, 1.0)); } else { - _223 = _203; + _7721 = _12105; } - vec3 _227 = _181.xyz + (_223 * 0.75); - vec4 _228 = vec4(_227.x, _227.y, _227.z, _181.w); - _77._m0 = _228; - vec2 _238 = clamp(_82 + (vec3(1.0, -1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw); - vec3 _250 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _238, 0.0).w * _7._m1, 0.0, 1.0); - vec4 _254 = textureLod(SPIRV_Cross_Combined_1, _238, 0.0); - vec3 _270; + vec3 _22179 = _15528.xyz + (_7721 * 0.75); + vec4 _15529 = vec4(_22179.x, _22179.y, _22179.z, _15528.w); + _13863._m0 = _15529; + vec2 _13152 = clamp(_19927 + (vec3(1.0, -1.0, 0.5).xy * _22044._m0.xy), _17581.xy, _17581.zw); + vec3 _12106 = _12348._m5 * clamp(textureLod(SPIRV_Cross_Combined, _13152, 0.0).w * _22044._m1, 0.0, 1.0); + vec4 _17673 = textureLod(SPIRV_Cross_Combined_1, _13152, 0.0); + vec3 _7722; SPIRV_CROSS_BRANCH - if (_254.y > 0.0) + if (_17673.y > 0.0) { - _270 = _250 + (textureLod(SPIRV_Cross_Combined_2, _238, 0.0).xyz * clamp(_254.y * _254.z, 0.0, 1.0)); + _7722 = _12106 + (textureLod(SPIRV_Cross_Combined_2, _13152, 0.0).xyz * clamp(_17673.y * _17673.z, 0.0, 1.0)); } else { - _270 = _250; + _7722 = _12106; } - vec3 _274 = _228.xyz + (_270 * 0.5); - vec4 _275 = vec4(_274.x, _274.y, _274.z, _228.w); - _77._m0 = _275; - vec2 _285 = clamp(_82 + (vec3(-2.0, 0.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw); - vec3 _297 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _285, 0.0).w * _7._m1, 0.0, 1.0); - vec4 _301 = textureLod(SPIRV_Cross_Combined_1, _285, 0.0); - vec3 _317; + vec3 _22180 = _15529.xyz + (_7722 * 0.5); + vec4 _15530 = vec4(_22180.x, _22180.y, _22180.z, _15529.w); + _13863._m0 = _15530; + vec2 _13153 = clamp(_19927 + (vec3(-2.0, 0.0, 0.5).xy * _22044._m0.xy), _17581.xy, _17581.zw); + vec3 _12107 = _12348._m5 * clamp(textureLod(SPIRV_Cross_Combined, _13153, 0.0).w * _22044._m1, 0.0, 1.0); + vec4 _17674 = textureLod(SPIRV_Cross_Combined_1, _13153, 0.0); + vec3 _7723; SPIRV_CROSS_BRANCH - if (_301.y > 0.0) + if (_17674.y > 0.0) { - _317 = _297 + (textureLod(SPIRV_Cross_Combined_2, _285, 0.0).xyz * clamp(_301.y * _301.z, 0.0, 1.0)); + _7723 = _12107 + (textureLod(SPIRV_Cross_Combined_2, _13153, 0.0).xyz * clamp(_17674.y * _17674.z, 0.0, 1.0)); } else { - _317 = _297; + _7723 = _12107; } - vec3 _321 = _275.xyz + (_317 * 0.5); - vec4 _322 = vec4(_321.x, _321.y, _321.z, _275.w); - _77._m0 = _322; - vec2 _332 = clamp(_82 + (vec3(-1.0, 0.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw); - vec3 _344 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _332, 0.0).w * _7._m1, 0.0, 1.0); - vec4 _348 = textureLod(SPIRV_Cross_Combined_1, _332, 0.0); - vec3 _364; + vec3 _22181 = _15530.xyz + (_7723 * 0.5); + vec4 _15531 = vec4(_22181.x, _22181.y, _22181.z, _15530.w); + _13863._m0 = _15531; + vec2 _13154 = clamp(_19927 + (vec3(-1.0, 0.0, 0.75).xy * _22044._m0.xy), _17581.xy, _17581.zw); + vec3 _12108 = _12348._m5 * clamp(textureLod(SPIRV_Cross_Combined, _13154, 0.0).w * _22044._m1, 0.0, 1.0); + vec4 _17675 = textureLod(SPIRV_Cross_Combined_1, _13154, 0.0); + vec3 _7724; SPIRV_CROSS_BRANCH - if (_348.y > 0.0) + if (_17675.y > 0.0) { - _364 = _344 + (textureLod(SPIRV_Cross_Combined_2, _332, 0.0).xyz * clamp(_348.y * _348.z, 0.0, 1.0)); + _7724 = _12108 + (textureLod(SPIRV_Cross_Combined_2, _13154, 0.0).xyz * clamp(_17675.y * _17675.z, 0.0, 1.0)); } else { - _364 = _344; + _7724 = _12108; } - vec3 _368 = _322.xyz + (_364 * 0.75); - vec4 _369 = vec4(_368.x, _368.y, _368.z, _322.w); - _77._m0 = _369; - vec2 _379 = clamp(_82 + (vec3(0.0, 0.0, 1.0).xy * _7._m0.xy), _88.xy, _88.zw); - vec3 _391 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _379, 0.0).w * _7._m1, 0.0, 1.0); - vec4 _395 = textureLod(SPIRV_Cross_Combined_1, _379, 0.0); - vec3 _411; + vec3 _22182 = _15531.xyz + (_7724 * 0.75); + vec4 _15532 = vec4(_22182.x, _22182.y, _22182.z, _15531.w); + _13863._m0 = _15532; + vec2 _13155 = clamp(_19927 + (vec3(0.0, 0.0, 1.0).xy * _22044._m0.xy), _17581.xy, _17581.zw); + vec3 _12109 = _12348._m5 * clamp(textureLod(SPIRV_Cross_Combined, _13155, 0.0).w * _22044._m1, 0.0, 1.0); + vec4 _17676 = textureLod(SPIRV_Cross_Combined_1, _13155, 0.0); + vec3 _7725; SPIRV_CROSS_BRANCH - if (_395.y > 0.0) + if (_17676.y > 0.0) { - _411 = _391 + (textureLod(SPIRV_Cross_Combined_2, _379, 0.0).xyz * clamp(_395.y * _395.z, 0.0, 1.0)); + _7725 = _12109 + (textureLod(SPIRV_Cross_Combined_2, _13155, 0.0).xyz * clamp(_17676.y * _17676.z, 0.0, 1.0)); } else { - _411 = _391; + _7725 = _12109; } - vec3 _415 = _369.xyz + (_411 * 1.0); - vec4 _416 = vec4(_415.x, _415.y, _415.z, _369.w); - _77._m0 = _416; - vec2 _426 = clamp(_82 + (vec3(1.0, 0.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw); - vec3 _438 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _426, 0.0).w * _7._m1, 0.0, 1.0); - vec4 _442 = textureLod(SPIRV_Cross_Combined_1, _426, 0.0); - vec3 _458; + vec3 _22183 = _15532.xyz + (_7725 * 1.0); + vec4 _15533 = vec4(_22183.x, _22183.y, _22183.z, _15532.w); + _13863._m0 = _15533; + vec2 _13156 = clamp(_19927 + (vec3(1.0, 0.0, 0.75).xy * _22044._m0.xy), _17581.xy, _17581.zw); + vec3 _12110 = _12348._m5 * clamp(textureLod(SPIRV_Cross_Combined, _13156, 0.0).w * _22044._m1, 0.0, 1.0); + vec4 _17677 = textureLod(SPIRV_Cross_Combined_1, _13156, 0.0); + vec3 _7726; SPIRV_CROSS_BRANCH - if (_442.y > 0.0) + if (_17677.y > 0.0) { - _458 = _438 + (textureLod(SPIRV_Cross_Combined_2, _426, 0.0).xyz * clamp(_442.y * _442.z, 0.0, 1.0)); + _7726 = _12110 + (textureLod(SPIRV_Cross_Combined_2, _13156, 0.0).xyz * clamp(_17677.y * _17677.z, 0.0, 1.0)); } else { - _458 = _438; + _7726 = _12110; } - vec3 _462 = _416.xyz + (_458 * 0.75); - vec4 _463 = vec4(_462.x, _462.y, _462.z, _416.w); - _77._m0 = _463; - vec2 _473 = clamp(_82 + (vec3(2.0, 0.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw); - vec3 _485 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _473, 0.0).w * _7._m1, 0.0, 1.0); - vec4 _489 = textureLod(SPIRV_Cross_Combined_1, _473, 0.0); - vec3 _505; + vec3 _22184 = _15533.xyz + (_7726 * 0.75); + vec4 _15534 = vec4(_22184.x, _22184.y, _22184.z, _15533.w); + _13863._m0 = _15534; + vec2 _13157 = clamp(_19927 + (vec3(2.0, 0.0, 0.5).xy * _22044._m0.xy), _17581.xy, _17581.zw); + vec3 _12111 = _12348._m5 * clamp(textureLod(SPIRV_Cross_Combined, _13157, 0.0).w * _22044._m1, 0.0, 1.0); + vec4 _17678 = textureLod(SPIRV_Cross_Combined_1, _13157, 0.0); + vec3 _7727; SPIRV_CROSS_BRANCH - if (_489.y > 0.0) + if (_17678.y > 0.0) { - _505 = _485 + (textureLod(SPIRV_Cross_Combined_2, _473, 0.0).xyz * clamp(_489.y * _489.z, 0.0, 1.0)); + _7727 = _12111 + (textureLod(SPIRV_Cross_Combined_2, _13157, 0.0).xyz * clamp(_17678.y * _17678.z, 0.0, 1.0)); } else { - _505 = _485; + _7727 = _12111; } - vec3 _509 = _463.xyz + (_505 * 0.5); - vec4 _510 = vec4(_509.x, _509.y, _509.z, _463.w); - _77._m0 = _510; - vec2 _520 = clamp(_82 + (vec3(-1.0, 1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw); - vec3 _532 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _520, 0.0).w * _7._m1, 0.0, 1.0); - vec4 _536 = textureLod(SPIRV_Cross_Combined_1, _520, 0.0); - vec3 _552; + vec3 _22185 = _15534.xyz + (_7727 * 0.5); + vec4 _15535 = vec4(_22185.x, _22185.y, _22185.z, _15534.w); + _13863._m0 = _15535; + vec2 _13158 = clamp(_19927 + (vec3(-1.0, 1.0, 0.5).xy * _22044._m0.xy), _17581.xy, _17581.zw); + vec3 _12112 = _12348._m5 * clamp(textureLod(SPIRV_Cross_Combined, _13158, 0.0).w * _22044._m1, 0.0, 1.0); + vec4 _17679 = textureLod(SPIRV_Cross_Combined_1, _13158, 0.0); + vec3 _7728; SPIRV_CROSS_BRANCH - if (_536.y > 0.0) + if (_17679.y > 0.0) { - _552 = _532 + (textureLod(SPIRV_Cross_Combined_2, _520, 0.0).xyz * clamp(_536.y * _536.z, 0.0, 1.0)); + _7728 = _12112 + (textureLod(SPIRV_Cross_Combined_2, _13158, 0.0).xyz * clamp(_17679.y * _17679.z, 0.0, 1.0)); } else { - _552 = _532; + _7728 = _12112; } - vec3 _556 = _510.xyz + (_552 * 0.5); - vec4 _557 = vec4(_556.x, _556.y, _556.z, _510.w); - _77._m0 = _557; - vec2 _567 = clamp(_82 + (vec3(0.0, 1.0, 0.75).xy * _7._m0.xy), _88.xy, _88.zw); - vec3 _579 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _567, 0.0).w * _7._m1, 0.0, 1.0); - vec4 _583 = textureLod(SPIRV_Cross_Combined_1, _567, 0.0); - vec3 _599; + vec3 _22186 = _15535.xyz + (_7728 * 0.5); + vec4 _15536 = vec4(_22186.x, _22186.y, _22186.z, _15535.w); + _13863._m0 = _15536; + vec2 _13159 = clamp(_19927 + (vec3(0.0, 1.0, 0.75).xy * _22044._m0.xy), _17581.xy, _17581.zw); + vec3 _12113 = _12348._m5 * clamp(textureLod(SPIRV_Cross_Combined, _13159, 0.0).w * _22044._m1, 0.0, 1.0); + vec4 _17680 = textureLod(SPIRV_Cross_Combined_1, _13159, 0.0); + vec3 _7729; SPIRV_CROSS_BRANCH - if (_583.y > 0.0) + if (_17680.y > 0.0) { - _599 = _579 + (textureLod(SPIRV_Cross_Combined_2, _567, 0.0).xyz * clamp(_583.y * _583.z, 0.0, 1.0)); + _7729 = _12113 + (textureLod(SPIRV_Cross_Combined_2, _13159, 0.0).xyz * clamp(_17680.y * _17680.z, 0.0, 1.0)); } else { - _599 = _579; + _7729 = _12113; } - vec3 _603 = _557.xyz + (_599 * 0.75); - vec4 _604 = vec4(_603.x, _603.y, _603.z, _557.w); - _77._m0 = _604; - vec2 _614 = clamp(_82 + (vec3(1.0, 1.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw); - vec3 _626 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _614, 0.0).w * _7._m1, 0.0, 1.0); - vec4 _630 = textureLod(SPIRV_Cross_Combined_1, _614, 0.0); - vec3 _646; + vec3 _22187 = _15536.xyz + (_7729 * 0.75); + vec4 _15537 = vec4(_22187.x, _22187.y, _22187.z, _15536.w); + _13863._m0 = _15537; + vec2 _13160 = clamp(_19927 + (vec3(1.0, 1.0, 0.5).xy * _22044._m0.xy), _17581.xy, _17581.zw); + vec3 _12114 = _12348._m5 * clamp(textureLod(SPIRV_Cross_Combined, _13160, 0.0).w * _22044._m1, 0.0, 1.0); + vec4 _17681 = textureLod(SPIRV_Cross_Combined_1, _13160, 0.0); + vec3 _7730; SPIRV_CROSS_BRANCH - if (_630.y > 0.0) + if (_17681.y > 0.0) { - _646 = _626 + (textureLod(SPIRV_Cross_Combined_2, _614, 0.0).xyz * clamp(_630.y * _630.z, 0.0, 1.0)); + _7730 = _12114 + (textureLod(SPIRV_Cross_Combined_2, _13160, 0.0).xyz * clamp(_17681.y * _17681.z, 0.0, 1.0)); } else { - _646 = _626; + _7730 = _12114; } - vec3 _650 = _604.xyz + (_646 * 0.5); - vec4 _651 = vec4(_650.x, _650.y, _650.z, _604.w); - _77._m0 = _651; - vec2 _661 = clamp(_82 + (vec3(0.0, 2.0, 0.5).xy * _7._m0.xy), _88.xy, _88.zw); - vec3 _673 = _11._m5 * clamp(textureLod(SPIRV_Cross_Combined, _661, 0.0).w * _7._m1, 0.0, 1.0); - vec4 _677 = textureLod(SPIRV_Cross_Combined_1, _661, 0.0); - vec3 _693; + vec3 _22188 = _15537.xyz + (_7730 * 0.5); + vec4 _15539 = vec4(_22188.x, _22188.y, _22188.z, _15537.w); + _13863._m0 = _15539; + vec2 _13161 = clamp(_19927 + (vec3(0.0, 2.0, 0.5).xy * _22044._m0.xy), _17581.xy, _17581.zw); + vec3 _12115 = _12348._m5 * clamp(textureLod(SPIRV_Cross_Combined, _13161, 0.0).w * _22044._m1, 0.0, 1.0); + vec4 _17682 = textureLod(SPIRV_Cross_Combined_1, _13161, 0.0); + vec3 _7731; SPIRV_CROSS_BRANCH - if (_677.y > 0.0) + if (_17682.y > 0.0) { - _693 = _673 + (textureLod(SPIRV_Cross_Combined_2, _661, 0.0).xyz * clamp(_677.y * _677.z, 0.0, 1.0)); + _7731 = _12115 + (textureLod(SPIRV_Cross_Combined_2, _13161, 0.0).xyz * clamp(_17682.y * _17682.z, 0.0, 1.0)); } else { - _693 = _673; + _7731 = _12115; } - vec3 _697 = _651.xyz + (_693 * 0.5); - vec4 _698 = vec4(_697.x, _697.y, _697.z, _651.w); - _77._m0 = _698; - vec3 _702 = _698.xyz / vec3(((((((((((((0.0 + 0.5) + 0.5) + 0.75) + 0.5) + 0.5) + 0.75) + 1.0) + 0.75) + 0.5) + 0.5) + 0.75) + 0.5) + 0.5); - _77._m0 = vec4(_702.x, _702.y, _702.z, _698.w); - _77._m0.w = 1.0; - _5 = _77._m0; + vec3 _22189 = _15539.xyz + (_7731 * 0.5); + vec4 _15541 = vec4(_22189.x, _22189.y, _22189.z, _15539.w); + _13863._m0 = _15541; + vec3 _13750 = _15541.xyz / vec3(((((((((((((0.0 + 0.5) + 0.5) + 0.75) + 0.5) + 0.5) + 0.75) + 1.0) + 0.75) + 0.5) + 0.5) + 0.75) + 0.5) + 0.5); + _13863._m0 = vec4(_13750.x, _13750.y, _13750.z, _15541.w); + _13863._m0.w = 1.0; + _4317 = _13863._m0; } diff --git a/reference/shaders/asm/geom/unroll-glposition-load.asm.geom b/reference/shaders/asm/geom/unroll-glposition-load.asm.geom index 39bc097d..99d4d2fd 100644 --- a/reference/shaders/asm/geom/unroll-glposition-load.asm.geom +++ b/reference/shaders/asm/geom/unroll-glposition-load.asm.geom @@ -21,12 +21,12 @@ void _main(vec4 positions[3], SceneOut OUT) void main() { - vec4 _35_unrolled[3]; + vec4 _48_unrolled[3]; for (int i = 0; i < int(3); i++) { - _35_unrolled[i] = gl_in[i].gl_Position; + _48_unrolled[i] = gl_in[i].gl_Position; } - vec4 positions[3] = _35_unrolled; + vec4 positions[3] = _48_unrolled; vec4 param[3] = positions; SceneOut param_1; _main(param, param_1); diff --git a/reference/shaders/asm/tese/unroll-input-array-load.asm.tese b/reference/shaders/asm/tese/unroll-input-array-load.asm.tese index 34970b82..e2d3b2e6 100644 --- a/reference/shaders/asm/tese/unroll-input-array-load.asm.tese +++ b/reference/shaders/asm/tese/unroll-input-array-load.asm.tese @@ -34,12 +34,12 @@ void main() _input.foo = input_foo; _input.bar = input_bar; vec2 uv = vec2(gl_TessCoord.xy); - ControlPoint _54_unrolled[4]; + ControlPoint _68_unrolled[4]; for (int i = 0; i < int(4); i++) { - _54_unrolled[i] = CPData[i]; + _68_unrolled[i] = CPData[i]; } - ControlPoint CPData_1[4] = _54_unrolled; + ControlPoint CPData_1[4] = _68_unrolled; HS_INPUT param = _input; vec2 param_1 = uv; ControlPoint param_2[4] = CPData_1; diff --git a/reference/shaders/asm/vert/invariant.asm.vert b/reference/shaders/asm/vert/invariant.asm.vert index c4c6ad6b..9bcfe0b3 100644 --- a/reference/shaders/asm/vert/invariant.asm.vert +++ b/reference/shaders/asm/vert/invariant.asm.vert @@ -9,7 +9,7 @@ vec4 _main() void main() { - vec4 _14 = _main(); - gl_Position = _14; + vec4 _17 = _main(); + gl_Position = _17; } diff --git a/reference/shaders/asm/vert/invariant.sso.asm.vert b/reference/shaders/asm/vert/invariant.sso.asm.vert index c486be18..e95338b0 100644 --- a/reference/shaders/asm/vert/invariant.sso.asm.vert +++ b/reference/shaders/asm/vert/invariant.sso.asm.vert @@ -14,7 +14,7 @@ vec4 _main() void main() { - vec4 _14 = _main(); - gl_Position = _14; + vec4 _17 = _main(); + gl_Position = _17; } diff --git a/reference/shaders/asm/vert/spec-constant-op-composite.asm.vk.vert b/reference/shaders/asm/vert/spec-constant-op-composite.asm.vk.vert index daf0071a..bc405c3a 100644 --- a/reference/shaders/asm/vert/spec-constant-op-composite.asm.vk.vert +++ b/reference/shaders/asm/vert/spec-constant-op-composite.asm.vk.vert @@ -3,33 +3,33 @@ #ifndef SPIRV_CROSS_CONSTANT_ID_201 #define SPIRV_CROSS_CONSTANT_ID_201 -10 #endif -const int _7 = SPIRV_CROSS_CONSTANT_ID_201; -const int _20 = (_7 + 2); +const int _13 = SPIRV_CROSS_CONSTANT_ID_201; +const int _15 = (_13 + 2); #ifndef SPIRV_CROSS_CONSTANT_ID_202 #define SPIRV_CROSS_CONSTANT_ID_202 100u #endif -const uint _8 = SPIRV_CROSS_CONSTANT_ID_202; -const uint _25 = (_8 % 5u); -const int _30 = _7 - (-3) * (_7 / (-3)); -const ivec4 _32 = ivec4(20, 30, _20, _30); -const ivec2 _34 = ivec2(_32.y, _32.x); -const int _35 = _32.y; +const uint _24 = SPIRV_CROSS_CONSTANT_ID_202; +const uint _26 = (_24 % 5u); +const int _61 = _13 - (-3) * (_13 / (-3)); +const ivec4 _36 = ivec4(20, 30, _15, _61); +const ivec2 _41 = ivec2(_36.y, _36.x); +const int _62 = _36.y; #ifndef SPIRV_CROSS_CONSTANT_ID_200 #define SPIRV_CROSS_CONSTANT_ID_200 3.141590118408203125 #endif -const float _9 = SPIRV_CROSS_CONSTANT_ID_200; +const float _57 = SPIRV_CROSS_CONSTANT_ID_200; -layout(location = 0) flat out int _4; +layout(location = 0) flat out int _58; void main() { vec4 pos = vec4(0.0); - pos.y += float(_20); - pos.z += float(_25); - pos += vec4(_32); - vec2 _58 = pos.xy + vec2(_34); - pos = vec4(_58.x, _58.y, pos.z, pos.w); + pos.y += float(_15); + pos.z += float(_26); + pos += vec4(_36); + vec2 _46 = pos.xy + vec2(_41); + pos = vec4(_46.x, _46.y, pos.z, pos.w); gl_Position = pos; - _4 = _35; + _58 = _62; } diff --git a/reference/shaders/asm/vert/spec-constant-op-composite.asm.vk.vert.vk b/reference/shaders/asm/vert/spec-constant-op-composite.asm.vk.vert.vk index 4cddf821..79fac9f8 100644 --- a/reference/shaders/asm/vert/spec-constant-op-composite.asm.vk.vert.vk +++ b/reference/shaders/asm/vert/spec-constant-op-composite.asm.vk.vert.vk @@ -1,30 +1,30 @@ #version 450 -layout(constant_id = 201) const int _7 = -10; -const int _20 = (_7 + 2); -layout(constant_id = 202) const uint _8 = 100u; -const uint _25 = (_8 % 5u); -const int _30 = _7 - (-3) * (_7 / (-3)); -const ivec4 _32 = ivec4(20, 30, _20, _30); -const ivec2 _34 = ivec2(_32.y, _32.x); -const int _35 = _32.y; -layout(constant_id = 200) const float _9 = 3.141590118408203125; +layout(constant_id = 201) const int _13 = -10; +const int _15 = (_13 + 2); +layout(constant_id = 202) const uint _24 = 100u; +const uint _26 = (_24 % 5u); +const int _61 = _13 - (-3) * (_13 / (-3)); +const ivec4 _36 = ivec4(20, 30, _15, _61); +const ivec2 _41 = ivec2(_36.y, _36.x); +const int _62 = _36.y; +layout(constant_id = 200) const float _57 = 3.141590118408203125; -layout(location = 0) flat out int _4; +layout(location = 0) flat out int _58; void main() { vec4 pos = vec4(0.0); - float _42 = float(_20); - pos.y += _42; - float _47 = float(_25); - pos.z += _47; - vec4 _52 = vec4(_32); - pos += _52; - vec2 _55 = vec2(_34); - vec2 _58 = pos.xy + _55; - pos = vec4(_58.x, _58.y, pos.z, pos.w); + float _16 = float(_15); + pos.y += _16; + float _27 = float(_26); + pos.z += _27; + vec4 _37 = vec4(_36); + pos += _37; + vec2 _43 = vec2(_41); + vec2 _46 = pos.xy + _43; + pos = vec4(_46.x, _46.y, pos.z, pos.w); gl_Position = pos; - _4 = _35; + _58 = _62; } diff --git a/reference/shaders/frag/image-load-store-uint-coord.asm.frag b/reference/shaders/frag/image-load-store-uint-coord.asm.frag index 414dd956..0406ede1 100644 --- a/reference/shaders/frag/image-load-store-uint-coord.asm.frag +++ b/reference/shaders/frag/image-load-store-uint-coord.asm.frag @@ -20,7 +20,7 @@ vec4 _main() void main() { - vec4 _45 = _main(); - _entryPointOutput = _45; + vec4 _62 = _main(); + _entryPointOutput = _62; } diff --git a/reference/shaders/vulkan/frag/demote-to-helper-forwarding.asm.vk.nocompat.frag.vk b/reference/shaders/vulkan/frag/demote-to-helper-forwarding.asm.vk.nocompat.frag.vk index 15316492..92209f2a 100644 --- a/reference/shaders/vulkan/frag/demote-to-helper-forwarding.asm.vk.nocompat.frag.vk +++ b/reference/shaders/vulkan/frag/demote-to-helper-forwarding.asm.vk.nocompat.frag.vk @@ -5,9 +5,9 @@ layout(location = 0) out vec4 FragColor; void main() { - bool _15 = helperInvocationEXT(); + bool _9 = helperInvocationEXT(); demote; - if (!_15) + if (!_9) { FragColor = vec4(1.0, 0.0, 0.0, 1.0); } diff --git a/test_shaders.py b/test_shaders.py index 6ae9c94a..7fa8b36f 100755 --- a/test_shaders.py +++ b/test_shaders.py @@ -211,7 +211,7 @@ def cross_compile_msl(shader, spirv, opt, iterations, paths): spirv_env = 'vulkan1.1' glslang_env = 'vulkan1.1' - spirv_cmd = [paths.spirv_as, '--target-env', spirv_env, '-o', spirv_path, shader] + spirv_cmd = [paths.spirv_as, '--preserve-numeric-ids', '--target-env', spirv_env, '-o', spirv_path, shader] if '.preserve.' in shader: spirv_cmd.append('--preserve-numeric-ids') @@ -482,7 +482,7 @@ def cross_compile_hlsl(shader, spirv, opt, force_no_external_validation, iterati spirv_env = 'vulkan1.1' glslang_env = 'vulkan1.1' - spirv_cmd = [paths.spirv_as, '--target-env', spirv_env, '-o', spirv_path, shader] + spirv_cmd = [paths.spirv_as, '--preserve-numeric-ids', '--target-env', spirv_env, '-o', spirv_path, shader] if '.preserve.' in shader: spirv_cmd.append('--preserve-numeric-ids') @@ -531,7 +531,7 @@ def cross_compile_reflect(shader, spirv, opt, iterations, paths): spirv_path = create_temporary() reflect_path = create_temporary(os.path.basename(shader)) - spirv_cmd = [paths.spirv_as, '--target-env', 'vulkan1.1', '-o', spirv_path, shader] + spirv_cmd = [paths.spirv_as, '--preserve-numeric-ids', '--target-env', 'vulkan1.1', '-o', spirv_path, shader] if '.preserve.' in shader: spirv_cmd.append('--preserve-numeric-ids') @@ -576,7 +576,7 @@ def cross_compile(shader, vulkan, spirv, invalid_spirv, eliminate, is_legacy, fo if vulkan or spirv: vulkan_glsl_path = create_temporary('vk' + os.path.basename(shader)) - spirv_cmd = [paths.spirv_as, '--target-env', spirv_env, '-o', spirv_path, shader] + spirv_cmd = [paths.spirv_as, '--preserve-numeric-ids', '--target-env', spirv_env, '-o', spirv_path, shader] if '.preserve.' in shader: spirv_cmd.append('--preserve-numeric-ids')