blob: d7e5bf3bbe8a713c909e2470f04b620258ce1435 [file] [log] [blame]
SKIP: FAILED
../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: buf0 = struct @align(4) {
one:f32 @offset(0)
}
main_out = struct @align(16) {
x_GLF_color_1:vec4<f32> @offset(0), @location(0)
}
$B1: { # root
%x_8: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_68:ptr<function, bool, read_write> = var, false
%x_29:ptr<function, i32, read_write> = var
%x_30:ptr<function, i32, read_write> = var
%x_31:ptr<function, i32, read_write> = var
%globalNumbers:ptr<function, array<i32, 10>, read_write> = var
%x_17:ptr<function, i32, read_write> = var
%acc:ptr<function, i32, read_write> = var
%i_1:ptr<function, i32, read_write> = var
%localNumbers:ptr<function, array<i32, 2>, read_write> = var
%param:ptr<function, i32, read_write> = var
%x_24:ptr<function, i32, read_write> = var
%x_23:ptr<function, i32, read_write> = var
store %acc, 0i
store %i_1, 0i
store %x_24, 0i
store %x_23, 0i
loop [b: $B3, c: $B4] { # loop_1
$B3: { # body
%x_76:ptr<function, bool, read_write> = var
%x_33:ptr<function, i32, read_write> = var
%x_92:ptr<function, i32, read_write> = var
%x_34:ptr<function, i32, read_write> = var
%x_25:ptr<function, i32, read_write> = var
%x_16:ptr<function, i32, read_write> = var
%22:i32 = load %x_23
%23:bool = lt %22, 4i
if %23 [t: $B5, f: $B6] { # if_1
$B5: { # true
exit_if # if_1
}
$B6: { # false
exit_loop # loop_1
}
}
store %x_68, false
store %x_76, false
loop [b: $B7] { # loop_2
$B7: { # body
%x_81:ptr<function, bool, read_write> = var
%x_32:ptr<function, i32, read_write> = var
%x_90:ptr<function, bool, read_write> = var
store %x_30, 0i
%27:bool = load %x_76
store %x_81, %27
store %x_32, 0i
loop [b: $B8] { # loop_3
$B8: { # body
%28:ptr<uniform, f32, read> = access %x_8, 0u
%29:f32 = load %28
%x_86:f32 = let %29
store %x_33, 0i
%31:bool = load %x_81
store %x_90, %31
%32:i32 = load %x_32
%33:i32 = let %32
%34:i32 = call %tint_f32_to_i32, %x_86
%36:bool = lt %33, %34
if %36 [t: $B9, f: $B10] { # if_2
$B9: { # true
exit_if # if_2
}
$B10: { # false
exit_loop # loop_3
}
}
store %x_68, true
%37:i32 = load %x_32
store %x_29, %37
%38:i32 = load %x_32
store %x_33, %38
store %x_90, true
exit_loop # loop_3
}
}
%39:i32 = load %x_33
store %x_34, %39
%40:bool = load %x_90
if %40 [t: $B11] { # if_3
$B11: { # true
exit_loop # loop_2
}
}
store %x_92, 0i
store %x_68, true
%41:i32 = load %x_92
store %x_29, %41
%42:i32 = load %x_92
store %x_34, %42
exit_loop # loop_2
}
}
%43:i32 = load %x_34
store %x_31, %43
%44:i32 = load %x_31
%x_93:i32 = let %44
%46:array<i32, 2> = load %localNumbers
%x_21:array<i32, 2> = let %46
%x_22_1:ptr<function, array<i32, 2>, read_write> = var, %x_21
%49:ptr<function, i32, read_write> = access %x_22_1, 1u
store %49, %x_93
%50:array<i32, 2> = load %x_22_1
%x_22:array<i32, 2> = let %50
%52:array<i32, 2> = load %x_22_1
store %localNumbers, %52
%53:ptr<function, i32, read_write> = access %globalNumbers, 0i
store %53, 0i
%54:i32 = access %x_22, 1u
%x_13:i32 = let %54
store %param, %x_13
store %x_17, 0i
store %x_25, 0i
loop [b: $B12, c: $B13] { # loop_4
$B12: { # body
%x_19:ptr<function, i32, read_write> = var
%57:i32 = load %x_25
%58:bool = lte %57, %x_13
if %58 [t: $B14, f: $B15] { # if_4
$B14: { # true
exit_if # if_4
}
$B15: { # false
exit_loop # loop_4
}
}
%x_102_save:i32 = let %x_13
%60:ptr<function, i32, read_write> = access %globalNumbers, %x_13
%61:i32 = load %60
%62:bool = lte %61, 1i
if %62 [t: $B16] { # if_5
$B16: { # true
%63:ptr<function, i32, read_write> = access %globalNumbers, %x_102_save
store %63, 1i
exit_if # if_5
}
}
continue # -> $B13
}
$B13: { # continuing
%64:i32 = load %x_25
%65:i32 = add %64, 1i
store %x_19, %65
%66:i32 = load %x_19
store %x_17, %66
%67:i32 = load %x_19
store %x_25, %67
next_iteration # -> $B12
}
}
%68:i32 = load %x_24
%69:i32 = let %68
%70:ptr<uniform, f32, read> = access %x_8, 0u
%71:f32 = load %70
%72:i32 = call %tint_f32_to_i32, %71
%73:i32 = sub %72, 1i
%74:ptr<function, i32, read_write> = access %globalNumbers, %73
%75:i32 = load %74
%76:i32 = add %69, %75
%x_15:i32 = let %76
store %acc, %x_15
continue # -> $B4
}
$B4: { # continuing
%78:i32 = load %x_23
%79:i32 = add %78, 1i
store %x_16, %79
%80:i32 = load %x_16
store %i_1, %80
store %x_24, %x_15
%81:i32 = load %x_16
store %x_23, %81
next_iteration # -> $B3
}
}
%82:i32 = load %x_24
%83:bool = eq %82, 4i
if %83 [t: $B17, f: $B18] { # if_6
$B17: { # true
store %x_GLF_color, vec4<f32>(1.0f, 0.0f, 0.0f, 1.0f)
exit_if # if_6
}
$B18: { # false
store %x_GLF_color, vec4<f32>(0.0f, 0.0f, 0.0f, 1.0f)
exit_if # if_6
}
}
ret
}
}
%tint_symbol = @fragment func():main_out {
$B19: {
%85:void = call %main_1
%86:vec4<f32> = load %x_GLF_color
%87:main_out = construct %86
ret %87
}
}
%yieldsZero_ = func():i32 {
$B20: {
%x_116:ptr<function, bool, read_write> = var, false
%x_20:ptr<function, i32, read_write> = var
%i:ptr<function, i32, read_write> = var
%x_118:ptr<function, bool, read_write> = var
%x_26:ptr<function, i32, read_write> = var
%x_134:ptr<function, i32, read_write> = var
%x_27:ptr<function, i32, read_write> = var
store %x_118, false
loop [b: $B21] { # loop_5
$B21: { # body
%x_123:ptr<function, bool, read_write> = var
%x_28:ptr<function, i32, read_write> = var
%x_132:ptr<function, bool, read_write> = var
store %i, 0i
%99:bool = load %x_118
store %x_123, %99
store %x_28, 0i
loop [b: $B22] { # loop_6
$B22: { # body
%100:ptr<uniform, f32, read> = access %x_8, 0u
%101:f32 = load %100
%x_128:f32 = let %101
store %x_26, 0i
%103:bool = load %x_123
store %x_132, %103
%104:i32 = load %x_28
%105:i32 = let %104
%106:i32 = call %tint_f32_to_i32, %x_128
%107:bool = lt %105, %106
if %107 [t: $B23, f: $B24] { # if_7
$B23: { # true
exit_if # if_7
}
$B24: { # false
exit_loop # loop_6
}
}
store %x_116, true
%108:i32 = load %x_28
store %x_20, %108
%109:i32 = load %x_28
store %x_26, %109
store %x_132, true
exit_loop # loop_6
}
}
%110:i32 = load %x_26
store %x_27, %110
%111:bool = load %x_132
if %111 [t: $B25] { # if_8
$B25: { # true
exit_loop # loop_5
}
}
store %x_134, 0i
store %x_116, true
%112:i32 = load %x_134
store %x_20, %112
%113:i32 = load %x_134
store %x_27, %113
exit_loop # loop_5
}
}
%114:i32 = load %x_27
ret %114
}
}
%tint_f32_to_i32 = func(%value:f32):i32 {
$B26: {
%116:i32 = convert %value
%117:bool = gte %value, -2147483648.0f
%118:i32 = select -2147483648i, %116, %117
%119:bool = lte %value, 2147483520.0f
%120:i32 = select 2147483647i, %118, %119
ret %120
}
}
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. *
********************************************************************