blob: 16f1283cb8eea95fc2e817ac3549172496e44d40 [file] [log] [blame]
SKIP: FAILED
../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: buf1 = struct @align(8) {
injectionSwitch:vec2<f32> @offset(0)
}
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
%x_6:ptr<uniform, buf1, read> = var @binding_point(0, 1)
%x_9:ptr<uniform, buf0, read> = var @binding_point(0, 0)
%gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
%x_GLF_color:ptr<private, vec4<f32>, read_write> = var
%continue_execution:ptr<private, bool, read_write> = var, true
}
%main_1 = func():void {
$B2: {
%c:ptr<function, vec3<f32>, read_write> = var
%x_54:ptr<function, f32, read_write> = var
%x_58:ptr<function, f32, read_write> = var
%x_61:ptr<function, i32, read_write> = var
%x_59:ptr<function, f32, read_write> = var
%x_91:ptr<function, f32, read_write> = var
%x_92:ptr<function, f32, read_write> = var
%x_93:ptr<function, bool, read_write> = var
%x_95:ptr<function, f32, read_write> = var
%x_135:ptr<function, f32, read_write> = var
%x_136:ptr<function, f32, read_write> = var
%x_139:ptr<function, f32, read_write> = var
%x_146:ptr<function, i32, read_write> = var
store %c, vec3<f32>(7.0f, 8.0f, 9.0f)
%20:ptr<uniform, vec2<f32>, read> = access %x_9, 0u
%21:f32 = load_vector_element %20, 0u
%22:f32 = mul %21, 0.125f
%23:f32 = round %22
%x_52:f32 = let %23
%25:f32 = load_vector_element %gl_FragCoord, 0u
store %x_54, %25
switch 0u [c: (default, $B3)] { # switch_1
$B3: { # case
store %x_58, -0.5f
store %x_61, 1i
loop [b: $B4, c: $B5] { # loop_1
$B4: { # body
%x_71:ptr<function, f32, read_write> = var
%x_79:ptr<function, f32, read_write> = var
%x_62:ptr<function, i32, read_write> = var
store %x_91, 0.0f
%29:f32 = load %x_58
store %x_92, %29
store %x_93, false
%30:i32 = load %x_61
%31:bool = lt %30, 800i
if %31 [t: $B6, f: $B7] { # if_1
$B6: { # true
exit_if # if_1
}
$B7: { # false
exit_loop # loop_1
}
}
%x_78:ptr<function, f32, read_write> = var
%33:i32 = load %x_61
%34:i32 = call %tint_mod_i32, %33, 32i
%36:bool = eq %34, 0i
if %36 [t: $B8, f: $B9] { # if_2
$B8: { # true
%37:f32 = load %x_58
%38:f32 = add %37, 0.40000000596046447754f
store %x_71, %38
%39:f32 = load %x_71
store %x_59, %39
exit_if # if_2
}
$B9: { # false
%40:f32 = load %x_58
store %x_79, %40
%41:i32 = load %x_61
%42:f32 = convert %41
%43:f32 = let %42
%44:f32 = round %x_52
%45:f32 = let %44
%46:i32 = load %x_61
%47:f32 = convert %46
%48:f32 = let %47
%49:f32 = round %x_52
%50:f32 = div %48, %49
%51:f32 = floor %50
%52:f32 = mul %45, %51
%53:f32 = sub %43, %52
%54:bool = lte %53, 0.00999999977648258209f
if %54 [t: $B10] { # if_3
$B10: { # true
%55:f32 = load %x_58
%56:f32 = add %55, 100.0f
store %x_78, %56
%57:f32 = load %x_78
store %x_79, %57
exit_if # if_3
}
}
%58:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
%59:f32 = load_vector_element %58, 0u
%60:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
%61:f32 = load_vector_element %60, 1u
%62:bool = gt %59, %61
if %62 [t: $B11] { # if_4
$B11: { # true
store %continue_execution, false
exit_if # if_4
}
}
%63:f32 = load %x_79
store %x_59, %63
exit_if # if_2
}
}
%64:i32 = load %x_61
%65:f32 = convert %64
%66:f32 = load %x_54
%67:bool = gte %65, %66
if %67 [t: $B12] { # if_5
$B12: { # true
%68:f32 = load %x_59
store %x_91, %68
%69:f32 = load %x_59
store %x_92, %69
store %x_93, true
exit_loop # loop_1
}
}
continue # -> $B5
}
$B5: { # continuing
%70:i32 = load %x_61
%71:i32 = add %70, 1i
store %x_62, %71
%72:f32 = load %x_59
store %x_58, %72
%73:i32 = load %x_62
store %x_61, %73
next_iteration # -> $B4
}
}
%74:f32 = load %x_91
store %x_95, %74
%75:bool = load %x_93
if %75 [t: $B13] { # if_6
$B13: { # true
exit_switch # switch_1
}
}
%76:f32 = load %x_92
store %x_95, %76
exit_switch # switch_1
}
}
%x_98:ptr<function, f32, read_write> = var
%x_102:ptr<function, f32, read_write> = var
%x_105:ptr<function, i32, read_write> = var
%x_103:ptr<function, f32, read_write> = var
%x_137:ptr<function, bool, read_write> = var
%82:f32 = load %x_95
store_vector_element %c, 0u, %82
%83:f32 = load_vector_element %gl_FragCoord, 1u
store %x_98, %83
switch 0u [c: (default, $B14)] { # switch_2
$B14: { # case
store %x_102, -0.5f
store %x_105, 1i
loop [b: $B15, c: $B16] { # loop_2
$B15: { # body
%x_115:ptr<function, f32, read_write> = var
%x_123:ptr<function, f32, read_write> = var
%x_106:ptr<function, i32, read_write> = var
store %x_135, 0.0f
%87:f32 = load %x_102
store %x_136, %87
store %x_137, false
%88:i32 = load %x_105
%89:bool = lt %88, 800i
if %89 [t: $B17, f: $B18] { # if_7
$B17: { # true
exit_if # if_7
}
$B18: { # false
exit_loop # loop_2
}
}
%x_122:ptr<function, f32, read_write> = var
%91:i32 = load %x_105
%92:i32 = call %tint_mod_i32, %91, 32i
%93:bool = eq %92, 0i
if %93 [t: $B19, f: $B20] { # if_8
$B19: { # true
%94:f32 = load %x_102
%95:f32 = add %94, 0.40000000596046447754f
store %x_115, %95
%96:f32 = load %x_115
store %x_103, %96
exit_if # if_8
}
$B20: { # false
%97:f32 = load %x_102
store %x_123, %97
%98:i32 = load %x_105
%99:f32 = convert %98
%100:f32 = let %99
%101:f32 = round %x_52
%102:f32 = let %101
%103:i32 = load %x_105
%104:f32 = convert %103
%105:f32 = let %104
%106:f32 = round %x_52
%107:f32 = div %105, %106
%108:f32 = floor %107
%109:f32 = mul %102, %108
%110:f32 = sub %100, %109
%111:bool = lte %110, 0.00999999977648258209f
if %111 [t: $B21] { # if_9
$B21: { # true
%112:f32 = load %x_102
%113:f32 = add %112, 100.0f
store %x_122, %113
%114:f32 = load %x_122
store %x_123, %114
exit_if # if_9
}
}
%115:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
%116:f32 = load_vector_element %115, 0u
%117:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
%118:f32 = load_vector_element %117, 1u
%119:bool = gt %116, %118
if %119 [t: $B22] { # if_10
$B22: { # true
store %continue_execution, false
exit_if # if_10
}
}
%120:f32 = load %x_123
store %x_103, %120
exit_if # if_8
}
}
%121:i32 = load %x_105
%122:f32 = convert %121
%123:f32 = load %x_98
%124:bool = gte %122, %123
if %124 [t: $B23] { # if_11
$B23: { # true
%125:f32 = load %x_103
store %x_135, %125
%126:f32 = load %x_103
store %x_136, %126
store %x_137, true
exit_loop # loop_2
}
}
continue # -> $B16
}
$B16: { # continuing
%127:i32 = load %x_105
%128:i32 = add %127, 1i
store %x_106, %128
%129:f32 = load %x_103
store %x_102, %129
%130:i32 = load %x_106
store %x_105, %130
next_iteration # -> $B15
}
}
%131:f32 = load %x_135
store %x_139, %131
%132:bool = load %x_137
if %132 [t: $B24] { # if_12
$B24: { # true
exit_switch # switch_2
}
}
%133:f32 = load %x_136
store %x_139, %133
exit_switch # switch_2
}
}
%134:f32 = load %x_139
store_vector_element %c, 1u, %134
%135:f32 = load_vector_element %c, 0u
%136:f32 = load_vector_element %c, 1u
%137:f32 = add %135, %136
store_vector_element %c, 2u, %137
store %x_146, 0i
loop [b: $B25, c: $B26] { # loop_3
$B25: { # body
%x_147:ptr<function, i32, read_write> = var
%139:i32 = load %x_146
%140:bool = lt %139, 3i
if %140 [t: $B27, f: $B28] { # if_13
$B27: { # true
exit_if # if_13
}
$B28: { # false
exit_loop # loop_3
}
}
%141:i32 = load %x_146
%142:f32 = load_vector_element %c, %141
%143:bool = gte %142, 1.0f
if %143 [t: $B29] { # if_14
$B29: { # true
%144:i32 = load %x_146
%145:i32 = load %x_146
%146:f32 = load_vector_element %c, %145
%147:i32 = load %x_146
%148:f32 = load_vector_element %c, %147
%149:f32 = mul %146, %148
store_vector_element %c, %144, %149
%150:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
%151:f32 = load_vector_element %150, 0u
%152:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
%153:f32 = load_vector_element %152, 1u
%154:bool = gt %151, %153
if %154 [t: $B30] { # if_15
$B30: { # true
store %continue_execution, false
exit_if # if_15
}
}
exit_if # if_14
}
}
continue # -> $B26
}
$B26: { # continuing
%155:i32 = load %x_146
%156:i32 = add %155, 1i
store %x_147, %156
%157:i32 = load %x_147
store %x_146, %157
next_iteration # -> $B25
}
}
%158:vec3<f32> = load %c
%159:vec3<f32> = abs %158
%160:vec3<f32> = normalize %159
%x_169:vec3<f32> = let %160
%162:f32 = access %x_169, 0u
%163:f32 = access %x_169, 1u
%164:f32 = access %x_169, 2u
%165:vec4<f32> = construct %162, %163, %164, 1.0f
store %x_GLF_color, %165
ret
}
}
%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
$B31: {
store %gl_FragCoord, %gl_FragCoord_param
%168:void = call %main_1
%169:vec4<f32> = load %x_GLF_color
%170:main_out = construct %169
%171:bool = load %continue_execution
%172:bool = eq %171, false
if %172 [t: $B32] { # if_16
$B32: { # true
terminate_invocation
}
}
ret %170
}
}
%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
$B33: {
%175:bool = eq %rhs, 0i
%176:bool = eq %lhs, -2147483648i
%177:bool = eq %rhs, -1i
%178:bool = and %176, %177
%179:bool = or %175, %178
%180:i32 = select %rhs, 1i, %179
%181:i32 = let %180
%182:i32 = div %lhs, %181
%183:i32 = mul %182, %181
%184:i32 = sub %lhs, %183
ret %184
}
}
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. *
********************************************************************