blob: cecd94743bed5c18633569c0587a5bb9e9a41dd1 [file] [log] [blame]
SKIP: FAILED
../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: buf0 = struct @align(8) {
resolution:vec2<f32> @offset(0)
}
main_out = struct @align(16) {
x_GLF_color_1:vec4<f32> @offset(0), @location(0)
}
$B1: { # root
%gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
%x_6:ptr<uniform, buf0, read> = var @binding_point(0, 0)
%x_GLF_color:ptr<private, vec4<f32>, read_write> = var
}
%main_1 = func():void {
$B2: {
%x_195:ptr<function, array<i32, 256>, read_write> = var
%x_196:ptr<function, array<i32, 256>, read_write> = var
%x_197:ptr<function, array<i32, 256>, read_write> = var
%x_209:ptr<function, vec2<i32>, read_write> = var
%x_241:ptr<function, vec4<f32>, read_write> = var
%x_243:ptr<function, vec4<f32>, read_write> = var
%x_213_phi:ptr<function, vec2<i32>, read_write> = var
%x_243_phi:ptr<function, vec4<f32>, read_write> = var
%x_244_phi:ptr<function, bool, read_write> = var
%x_246_phi:ptr<function, vec4<f32>, read_write> = var
%15:vec4<f32> = load %gl_FragCoord
%x_198:vec4<f32> = let %15
%17:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
%18:vec2<f32> = load %17
%x_201:vec2<f32> = let %18
%20:f32 = access %x_198, 0u
%21:f32 = access %x_198, 1u
%22:vec2<f32> = construct %20, %21
%23:vec2<f32> = div %22, %x_201
%x_202:vec2<f32> = let %23
%25:f32 = access %x_202, 0u
%26:f32 = mul %25, 256.0f
%27:i32 = call %tint_f32_to_i32, %26
%29:i32 = let %27
%30:f32 = access %x_202, 1u
%31:f32 = mul %30, 256.0f
%32:i32 = call %tint_f32_to_i32, %31
%33:vec2<i32> = construct %29, %32
store %x_209, %33
switch 0u [c: (default, $B3)] { # switch_1
$B3: { # case
%34:vec2<i32> = load %x_209
store %x_213_phi, %34
loop [b: $B4, c: $B5] { # loop_1
$B4: { # body
%x_230:ptr<function, bool, read_write> = var
%x_231_phi:ptr<function, bool, read_write> = var
%37:vec2<i32> = load %x_213_phi
%x_213:vec2<i32> = let %37
%39:i32 = access %x_213, 1u
%x_216:i32 = let %39
store %x_243_phi, vec4<f32>(0.0f)
store %x_244_phi, false
%41:bool = neq %x_216, 256i
if %41 [t: $B6, f: $B7] { # if_1
$B6: { # true
exit_if # if_1
}
$B7: { # false
exit_loop # loop_1
}
}
%42:i32 = access %x_213, 0u
%x_220:i32 = let %42
store %x_195, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
%44:ptr<function, i32, read_write> = access %x_195, %x_216
%45:i32 = load %44
%x_222:i32 = let %45
%47:i32 = add %x_222, 15i
%48:bool = lt %x_220, %47
%x_224:bool = let %48
store %x_231_phi, %x_224
if %x_224 [t: $B8] { # if_2
$B8: { # true
store %x_196, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
%50:ptr<function, i32, read_write> = access %x_196, %x_216
%51:i32 = load %50
%x_228:i32 = let %51
%53:i32 = sub %x_228, 15i
%54:bool = gt %x_220, %53
store %x_230, %54
%55:bool = load %x_230
store %x_231_phi, %55
exit_if # if_2
}
}
%56:bool = load %x_231_phi
%x_231:bool = let %56
if %x_231 [t: $B9] { # if_3
$B9: { # true
store %x_197, array<i32, 256>(115i, 133i, 150i, 164i, 176i, 184i, 190i, 192i, 191i, 187i, 181i, 172i, 163i, 153i, 143i, 134i, 126i, 120i, 116i, 114i, 114i, 117i, 121i, 127i, 134i, 141i, 148i, 154i, 159i, 162i, 163i, 161i, 157i, 151i, 143i, 134i, 124i, 113i, 103i, 94i, 87i, 82i, 79i, 80i, 84i, 91i, 101i, 114i, 130i, 146i, 164i, 182i, 199i, 215i, 229i, 240i, 249i, 254i, 256i, 254i, 250i, 243i, 233i, 223i, 212i, 200i, 190i, 180i, 172i, 166i, 163i, 161i, 162i, 164i, 169i, 174i, 179i, 185i, 190i, 193i, 195i, 195i, 192i, 188i, 180i, 171i, 161i, 149i, 137i, 125i, 114i, 105i, 97i, 93i, 91i, 93i, 98i, 106i, 117i, 130i, 145i, 161i, 177i, 193i, 208i, 221i, 231i, 239i, 243i, 244i, 242i, 236i, 228i, 218i, 207i, 194i, 181i, 169i, 158i, 148i, 141i, 135i, 132i, 131i, 132i, 135i, 138i, 143i, 147i, 151i, 154i, 155i, 155i, 152i, 146i, 139i, 129i, 118i, 106i, 93i, 80i, 68i, 58i, 49i, 43i, 40i, 41i, 44i, 51i, 61i, 73i, 87i, 103i, 119i, 134i, 149i, 162i, 173i, 181i, 186i, 188i, 186i, 181i, 174i, 164i, 153i, 141i, 128i, 116i, 104i, 94i, 86i, 81i, 77i, 76i, 77i, 80i, 84i, 89i, 94i, 98i, 102i, 104i, 104i, 102i, 98i, 92i, 83i, 73i, 62i, 50i, 38i, 26i, 16i, 8i, 2i, 0i, 0i, 4i, 11i, 21i, 33i, 48i, 64i, 81i, 98i, 114i, 129i, 141i, 151i, 158i, 161i, 161i, 158i, 152i, 144i, 134i, 123i, 112i, 100i, 90i, 81i, 73i, 68i, 65i, 65i, 67i, 70i, 75i, 81i, 87i, 92i, 97i, 101i, 103i, 102i, 100i, 95i, 88i, 79i, 69i, 58i, 47i, 36i, 26i, 18i, 13i, 11i, 11i, 15i, 22i, 32i, 45i, 60i, 77i, 94i)
%58:ptr<function, i32, read_write> = access %x_197, %x_216
%59:i32 = load %58
%x_235:i32 = let %59
%61:i32 = sub %x_220, %x_235
%62:f32 = convert %61
%63:f32 = abs %62
%64:f32 = sub 15.0f, %63
%65:f32 = mul %64, 0.06666667014360427856f
%x_240:f32 = let %65
%67:vec4<f32> = construct %x_240, %x_240, %x_240, 1.0f
store %x_241, %67
%68:vec4<f32> = load %x_241
store %x_243_phi, %68
store %x_244_phi, true
exit_loop # loop_1
}
}
%x_214_1:ptr<function, vec2<i32>, read_write> = var, %x_213
%70:i32 = add %x_216, 1i
store_vector_element %x_214_1, 1u, %70
%71:vec2<i32> = load %x_214_1
%x_214:vec2<i32> = let %71
continue # -> $B5
}
$B5: { # continuing
store %x_213_phi, %x_214
next_iteration # -> $B4
}
}
%73:vec4<f32> = load %x_243_phi
store %x_243, %73
%74:bool = load %x_244_phi
%x_244:bool = let %74
%76:vec4<f32> = load %x_243
store %x_246_phi, %76
if %x_244 [t: $B10] { # if_4
$B10: { # true
exit_switch # switch_1
}
}
store %x_246_phi, vec4<f32>(0.0f, 0.0f, 0.0f, 1.0f)
exit_switch # switch_1
}
}
%77:vec4<f32> = load %x_246_phi
%x_246:vec4<f32> = let %77
store %x_GLF_color, %x_246
ret
}
}
%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
$B11: {
store %gl_FragCoord, %gl_FragCoord_param
%81:void = call %main_1
%82:vec4<f32> = load %x_GLF_color
%83:main_out = construct %82
ret %83
}
}
%tint_f32_to_i32 = func(%value:f32):i32 {
$B12: {
%85:i32 = convert %value
%86:bool = gte %value, -2147483648.0f
%87:i32 = select -2147483648i, %85, %86
%88:bool = lte %value, 2147483520.0f
%89:i32 = select 2147483647i, %87, %88
ret %89
}
}
unhandled variable address space
********************************************************************
* The tint shader compiler has encountered an unexpected error. *
* *
* Please help us fix this issue by submitting a bug report at *
* crbug.com/tint with the source program that triggered the bug. *
********************************************************************