blob: 0c551b80303ad6b8db2a5a1a86aacc39265c378c [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)
}
buf1 = struct @align(8) {
injectionSwitch:vec2<f32> @offset(0)
}
main_out = struct @align(16) {
x_GLF_color_1:vec4<f32> @offset(0), @location(0)
}
$B1: { # root
%x_10:ptr<uniform, buf0, read> = var @binding_point(0, 0)
%gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
%x_16:ptr<uniform, buf1, read> = var @binding_point(0, 1)
%x_GLF_color:ptr<private, vec4<f32>, read_write> = var
%continue_execution:ptr<private, bool, read_write> = var, true
}
%compute_value_f1_f1_ = func(%limit:ptr<function, f32, read_write>, %thirty_two:ptr<function, f32, read_write>):f32 {
$B2: {
%x_104:ptr<function, f32, read_write> = var
%x_107:ptr<function, i32, read_write> = var
store %x_104, -0.5f
store %x_107, 1i
loop [b: $B3, c: $B4] { # loop_1
$B3: { # body
%x_126:ptr<function, f32, read_write> = var
%x_125:ptr<function, f32, read_write> = var
%x_105:ptr<function, f32, read_write> = var
%x_108:ptr<function, i32, read_write> = var
%15:i32 = load %x_107
%16:bool = lt %15, 800i
if %16 [t: $B5, f: $B6] { # if_1
$B5: { # true
exit_if # if_1
}
$B6: { # false
exit_loop # loop_1
}
}
%x_124:ptr<function, f32, read_write> = var
%18:i32 = load %x_107
%19:i32 = call %tint_mod_i32, %18, 32i
%21:bool = eq %19, 0i
if %21 [t: $B7, f: $B8] { # if_2
$B7: { # true
%22:f32 = load %x_104
%23:f32 = add %22, 0.40000000596046447754f
store %x_126, %23
%24:f32 = load %x_126
store %x_105, %24
exit_if # if_2
}
$B8: { # false
%25:f32 = load %thirty_two
%x_118:f32 = let %25
%27:f32 = load %x_104
store %x_125, %27
%28:i32 = load %x_107
%29:f32 = convert %28
%30:f32 = let %29
%31:f32 = round %x_118
%32:f32 = let %31
%33:i32 = load %x_107
%34:f32 = convert %33
%35:f32 = let %34
%36:f32 = round %x_118
%37:f32 = div %35, %36
%38:f32 = floor %37
%39:f32 = mul %32, %38
%40:f32 = sub %30, %39
%41:bool = lte %40, 0.00999999977648258209f
if %41 [t: $B9] { # if_3
$B9: { # true
%42:f32 = load %x_104
%43:f32 = add %42, 100.0f
store %x_124, %43
%44:f32 = load %x_124
store %x_125, %44
exit_if # if_3
}
}
%45:f32 = load %x_125
store %x_105, %45
exit_if # if_2
}
}
%46:i32 = load %x_107
%47:f32 = convert %46
%48:f32 = load %limit
%49:bool = gte %47, %48
if %49 [t: $B10] { # if_4
$B10: { # true
%50:f32 = load %x_105
ret %50
}
}
continue # -> $B4
}
$B4: { # continuing
%51:i32 = load %x_107
%52:i32 = add %51, 1i
store %x_108, %52
%53:f32 = load %x_105
store %x_104, %53
%54:i32 = load %x_108
store %x_107, %54
next_iteration # -> $B3
}
}
%55:f32 = load %x_104
ret %55
}
}
%main_1 = func():void {
$B11: {
%c:ptr<function, vec3<f32>, read_write> = var
%param:ptr<function, f32, read_write> = var
%param_1:ptr<function, f32, read_write> = var
%param_2:ptr<function, f32, read_write> = var
%param_3:ptr<function, f32, read_write> = var
%x_54:ptr<function, vec3<f32>, read_write> = var
%x_74:ptr<function, i32, read_write> = var
store %c, vec3<f32>(7.0f, 8.0f, 9.0f)
%64:ptr<uniform, vec2<f32>, read> = access %x_10, 0u
%65:f32 = load_vector_element %64, 0u
%66:f32 = mul %65, 0.125f
%67:f32 = round %66
%x_58:f32 = let %67
%69:f32 = load_vector_element %gl_FragCoord, 0u
store %param, %69
store %param_1, %x_58
%70:f32 = call %compute_value_f1_f1_, %param, %param_1
%x_61:f32 = let %70
store_vector_element %c, 0u, %x_61
%72:f32 = load_vector_element %gl_FragCoord, 1u
store %param_2, %72
store %param_3, %x_58
%73:f32 = call %compute_value_f1_f1_, %param_2, %param_3
%x_65:f32 = let %73
store_vector_element %c, 1u, %x_65
%75:f32 = load_vector_element %c, 0u
%x_67:f32 = let %75
%77:vec3<f32> = load %c
store %x_54, %77
%78:f32 = load_vector_element %x_54, 1u
%79:f32 = add %x_67, %78
store_vector_element %c, 2u, %79
store %x_74, 0i
loop [b: $B12, c: $B13] { # loop_2
$B12: { # body
%x_75:ptr<function, i32, read_write> = var
%81:i32 = load %x_74
%82:bool = lt %81, 3i
if %82 [t: $B14, f: $B15] { # if_5
$B14: { # true
exit_if # if_5
}
$B15: { # false
exit_loop # loop_2
}
}
%83:i32 = load %x_74
%84:f32 = load_vector_element %c, %83
%85:bool = gte %84, 1.0f
if %85 [t: $B16] { # if_6
$B16: { # true
%86:ptr<uniform, vec2<f32>, read> = access %x_16, 0u
%87:f32 = load_vector_element %86, 0u
%88:ptr<uniform, vec2<f32>, read> = access %x_16, 0u
%89:f32 = load_vector_element %88, 1u
%90:bool = gt %87, %89
if %90 [t: $B17] { # if_7
$B17: { # true
store %continue_execution, false
exit_if # if_7
}
}
%91:i32 = load %x_74
%92:i32 = load %x_74
%93:f32 = load_vector_element %c, %92
%94:i32 = load %x_74
%95:f32 = load_vector_element %c, %94
%96:f32 = mul %93, %95
store_vector_element %c, %91, %96
exit_if # if_6
}
}
continue # -> $B13
}
$B13: { # continuing
%97:i32 = load %x_74
%98:i32 = add %97, 1i
store %x_75, %98
%99:i32 = load %x_75
store %x_74, %99
next_iteration # -> $B12
}
}
%100:vec3<f32> = load %c
%101:vec3<f32> = abs %100
%102:vec3<f32> = normalize %101
%x_97:vec3<f32> = let %102
%104:f32 = access %x_97, 0u
%105:f32 = access %x_97, 1u
%106:f32 = access %x_97, 2u
%107:vec4<f32> = construct %104, %105, %106, 1.0f
store %x_GLF_color, %107
ret
}
}
%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
$B18: {
store %gl_FragCoord, %gl_FragCoord_param
%110:void = call %main_1
%111:vec4<f32> = load %x_GLF_color
%112:main_out = construct %111
%113:bool = load %continue_execution
%114:bool = eq %113, false
if %114 [t: $B19] { # if_8
$B19: { # true
terminate_invocation
}
}
ret %112
}
}
%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
$B20: {
%117:bool = eq %rhs, 0i
%118:bool = eq %lhs, -2147483648i
%119:bool = eq %rhs, -1i
%120:bool = and %118, %119
%121:bool = or %117, %120
%122:i32 = select %rhs, 1i, %121
%123:i32 = let %122
%124:i32 = div %lhs, %123
%125:i32 = mul %124, %123
%126:i32 = sub %lhs, %125
ret %126
}
}
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. *
********************************************************************