#version 450 // 1: Use original code path // 0: Use functionally equivalent code path which does not cause the hang #define HANG_GPU 0 layout(local_size_x = 16, local_size_y = 16, local_size_z = 1) in; layout(constant_id = 810) const bool cb0_bound = true; layout(constant_id = 840) const bool t0_bound = true; layout(constant_id = 968) const bool u0_bound = true; layout(set = 0, binding = 810, std140) uniform struct_cb0 { vec4 m[23]; } cb0; layout(set = 0, binding = 840) uniform texture2D t0; layout(set = 0, binding = 968) uniform writeonly image2D u0; uniform sampler SPIRV_Cross_DummySampler; vec4 r0; vec4 r1; vec4 r2; vec4 r3; vec4 r4; vec4 r5; vec4 r6; vec4 r7; vec4 r8; void cs_main() { vec2 _43 = uintBitsToFloat(gl_GlobalInvocationID.xy); r0 = vec4(_43.x, _43.y, r0.z, r0.w); vec2 _49 = uintBitsToFloat(uvec2(0u)); r0 = vec4(r0.x, r0.y, _49.x, _49.y); vec4 _52 = r0; ivec4 _55 = floatBitsToInt(_52); vec4 _69; if (t0_bound) { _69 = texelFetch(sampler2D(t0, SPIRV_Cross_DummySampler), _55.xy, _55.w); } else { _69 = vec4(0.0); } r0 = _69; vec2 _73 = uintBitsToFloat(uvec2(0u)); r1 = vec4(r1.x, r1.y, _73.x, _73.y); vec4 _79 = r2; _79.y = uintBitsToFloat(0u); r2 = _79; r3 = r0; vec4 _84 = r2; _84.w = uintBitsToFloat(4294967293u); r2 = _84; for (;;) { vec4 _100 = r4; _100.x = uintBitsToFloat((int(3u) < floatBitsToInt(r2.w)) ? 4294967295u : 0u); r4 = _100; if (floatBitsToUint(r4.x) != 0u) { break; } vec4 _119 = r4; _119.x = uintBitsToFloat((floatBitsToInt(r2.w) == int(0u)) ? 4294967295u : 0u); r4 = _119; r5 = r3; vec4 _124 = r4; _124.y = uintBitsToFloat(4294967293u); r4 = _124; #if HANG_GPU // Original loop header, causes GPU hang for (;;) { #else // Modified loop header, does NOT hang. // r4.y stores the original loop counter. for (int i = -3; i <= 3; i++) { r4.y = intBitsToFloat(i); #endif vec4 _140 = r4; _140.z = uintBitsToFloat((int(3u) < floatBitsToInt(r4.y)) ? 4294967295u : 0u); r4 = _140; if (floatBitsToUint(r4.z) != 0u) { break; } vec4 _159 = r4; _159.z = uintBitsToFloat((floatBitsToInt(r4.y) == int(0u)) ? 4294967295u : 0u); r4 = _159; vec4 _169 = r4; _169.z = uintBitsToFloat(floatBitsToUint(r4.z) & floatBitsToUint(r4.x)); r4 = _169; if (floatBitsToUint(r4.z) != 0u) { vec4 _181 = r4; _181.y = uintBitsToFloat(1u); r4 = _181; continue; } else { vec4 _186 = r2; _186.z = r4.y; r2 = _186; } vec2 _194 = intBitsToFloat(floatBitsToInt(r2.wz) + ivec2(gl_GlobalInvocationID.xy)); r1 = vec4(_194.x, _194.y, r1.z, r1.w); vec2 _211 = uintBitsToFloat(mix(uvec2(0u), uvec2(4294967295u), greaterThanEqual(floatBitsToInt(r1.xy), ivec2(uvec2(0u))))); r4 = vec4(r4.x, r4.y, _211.x, _211.y); vec4 _230; if (cb0_bound) { _230 = cb0.m[16]; } else { _230 = vec4(0.0); } vec2 _239 = uintBitsToFloat(mix(uvec2(0u), uvec2(4294967295u), lessThan(floatBitsToInt(r1.xy), floatBitsToInt(_230.zw)))); r6 = vec4(_239.x, _239.y, r6.z, r6.w); vec2 _249 = uintBitsToFloat(floatBitsToUint(r4.zw) & floatBitsToUint(r6.xy)); r4 = vec4(r4.x, r4.y, _249.x, _249.y); vec4 _261 = r4; _261.z = uintBitsToFloat(floatBitsToUint(r4.w) & floatBitsToUint(r4.z)); r4 = _261; if (floatBitsToUint(r4.z) == 0u) { vec4 _278 = r4; _278.y = intBitsToFloat(floatBitsToInt(r2.z) + int(1u)); r4 = _278; continue; } else { } vec4 _280 = r1; ivec4 _281 = floatBitsToInt(_280); vec4 _294; if (t0_bound) { _294 = texelFetch(sampler2D(t0, SPIRV_Cross_DummySampler), _281.xy, _281.w); } else { _294 = vec4(0.0); } r6 = _294; vec4 _309; if (cb0_bound) { _309 = cb0.m[22]; } else { _309 = vec4(0.0); } vec2 _311 = r6.zw * _309.zz; r1 = vec4(_311.x, _311.y, r1.z, r1.w); vec4 _320 = r4; _320.z = dot(r1.xy, r1.xy); r4 = _320; vec4 _327 = r4; _327.w = r4.z + uintBitsToFloat(841731191u); r4 = _327; vec4 _335 = r4; _335.w = intBitsToFloat(floatBitsToInt(r4.w) >> int(1u)); r4 = _335; vec4 _345 = r4; _345.w = intBitsToFloat((-floatBitsToInt(r4.w)) + int(1597463007u)); r4 = _345; vec4 _352 = r2; _352.x = r4.w * r4.z; r2 = _352; vec2 _357 = r1.xy * r4.ww; r7 = vec4(_357.x, _357.y, r7.z, r7.w); vec4 _368 = r1; _368.x = abs(r7.y) + abs(r7.x); r1 = _368; vec2 _377 = fma(r1.xx, uintBitsToFloat(uvec2(1065185444u)), r2.xy); r1 = vec4(_377.x, _377.y, r1.z, r1.w); vec2 _383 = vec2(floatBitsToInt(r2.wz)); r4 = vec4(r4.x, r4.y, _383.x, _383.y); vec4 _392 = r8; _392.x = dot(r7.xy, r4.zw); r8 = _392; vec4 _397 = r7; _397.z = -r7.y; r7 = _397; vec4 _404 = r8; _404.y = dot(r7.zx, r4.zw); r8 = _404; vec2 _416 = uintBitsToFloat(mix(uvec2(0u), uvec2(4294967295u), lessThan(abs(r8.xy), r1.xy))); r1 = vec4(_416.x, _416.y, r1.z, r1.w); vec4 _428 = r1; _428.x = uintBitsToFloat(floatBitsToUint(r1.y) & floatBitsToUint(r1.x)); r1 = _428; vec4 _435 = r1; _435.y = dot(r5.xy, r5.xy); r1 = _435; vec4 _442 = r2; _442.x = dot(r6.xy, r6.xy); r2 = _442; vec4 _453 = r1; _453.y = uintBitsToFloat((r1.y < r2.x) ? 4294967295u : 0u); r1 = _453; vec2 _464 = mix(r6.xy, r5.xy, notEqual(floatBitsToUint(r1.yy), uvec2(0u))); r7 = vec4(_464.x, _464.y, r7.z, r7.w); vec4 _473 = r1; _473.y = dot(r5.zw, r5.zw); r1 = _473; vec4 _480 = r2; _480.x = dot(r6.zw, r6.zw); r2 = _480; vec4 _491 = r1; _491.y = uintBitsToFloat((r2.x < r1.y) ? 4294967295u : 0u); r1 = _491; vec2 _502 = mix(r6.zw, r5.zw, notEqual(floatBitsToUint(r1.yy), uvec2(0u))); r7 = vec4(r7.x, r7.y, _502.x, _502.y); r5 = mix(r5, r7, notEqual(floatBitsToUint(r1.xxxx), uvec4(0u))); vec4 _524 = r4; _524.y = intBitsToFloat(floatBitsToInt(r2.z) + int(1u)); r4 = _524; continue; } r3 = r5; vec4 _534 = r2; _534.w = intBitsToFloat(floatBitsToInt(r2.w) + int(1u)); r2 = _534; continue; } vec4 _549; if (cb0_bound) { _549 = cb0.m[16]; } else { _549 = vec4(0.0); } vec2 _558 = uintBitsToFloat(mix(uvec2(0u), uvec2(4294967295u), lessThan(gl_GlobalInvocationID.xy, floatBitsToUint(_549.zw)))); r0 = vec4(_558.x, _558.y, r0.z, r0.w); vec4 _570 = r0; _570.x = uintBitsToFloat(floatBitsToUint(r0.y) & floatBitsToUint(r0.x)); r0 = _570; if (floatBitsToUint(r0.x) != 0u) { imageStore(u0, ivec2(gl_GlobalInvocationID.xy), r3); } else { } } void main() { cs_main(); }