blob: 83eee8ea05dc02daf9121a38bedd9b7f3c974c0a [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_13:ptr<uniform, buf0, read> = var @binding_point(0, 0)
%gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
%x_19:ptr<uniform, buf1, read> = var @binding_point(0, 1)
%x_GLF_color:ptr<private, vec4<f32>, read_write> = var
}
%compute_value_f1_f1_ = func(%limit:ptr<function, f32, read_write>, %thirty_two:ptr<function, f32, read_write>):f32 {
$B2: {
%result:ptr<function, f32, read_write> = var
%i:ptr<function, i32, read_write> = var
store %result, -0.5f
store %i, 1i
loop [b: $B3, c: $B4] { # loop_1
$B3: { # body
%10:i32 = load %i
%11:bool = lt %10, 800i
if %11 [t: $B5, f: $B6] { # if_1
$B5: { # true
exit_if # if_1
}
$B6: { # false
exit_loop # loop_1
}
}
%12:i32 = load %i
%13:i32 = call %tint_mod_i32, %12, 32i
%15:bool = eq %13, 0i
if %15 [t: $B7, f: $B8] { # if_2
$B7: { # true
%16:f32 = load %result
%17:f32 = add %16, 0.40000000596046447754f
store %result, %17
exit_if # if_2
}
$B8: { # false
%18:f32 = load %thirty_two
%x_157:f32 = let %18
%20:i32 = load %i
%21:f32 = convert %20
%22:f32 = let %21
%23:f32 = round %x_157
%24:f32 = let %23
%25:i32 = load %i
%26:f32 = convert %25
%27:f32 = let %26
%28:f32 = round %x_157
%29:f32 = div %27, %28
%30:f32 = floor %29
%31:f32 = mul %24, %30
%32:f32 = sub %22, %31
%33:bool = lte %32, 0.00999999977648258209f
if %33 [t: $B9] { # if_3
$B9: { # true
%34:f32 = load %result
%35:f32 = add %34, 100.0f
store %result, %35
exit_if # if_3
}
}
exit_if # if_2
}
}
%36:i32 = load %i
%37:f32 = convert %36
%38:f32 = load %limit
%39:bool = gte %37, %38
if %39 [t: $B10] { # if_4
$B10: { # true
%40:f32 = load %result
%x_171:f32 = let %40
ret %x_171
}
}
continue # -> $B4
}
$B4: { # continuing
%42:i32 = load %i
%43:i32 = add %42, 1i
store %i, %43
next_iteration # -> $B3
}
}
%44:f32 = load %result
%x_174:f32 = let %44
ret %x_174
}
}
%main_1 = func():void {
$B11: {
%c:ptr<function, vec3<f32>, read_write> = var
%thirty_two_1:ptr<function, 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_61:ptr<function, vec3<f32>, read_write> = var
%i_1:ptr<function, i32, read_write> = var
%j:ptr<function, f32, read_write> = var
store %c, vec3<f32>(7.0f, 8.0f, 9.0f)
%56:ptr<uniform, vec2<f32>, read> = access %x_13, 0u
%57:f32 = load_vector_element %56, 0u
%58:f32 = div %57, 8.0f
%59:f32 = round %58
store %thirty_two_1, %59
%60:f32 = load_vector_element %gl_FragCoord, 0u
store %param, %60
%61:f32 = load %thirty_two_1
store %param_1, %61
%62:f32 = call %compute_value_f1_f1_, %param, %param_1
%x_69:f32 = let %62
store_vector_element %c, 0u, %x_69
%64:f32 = load_vector_element %gl_FragCoord, 1u
store %param_2, %64
%65:f32 = load %thirty_two_1
store %param_3, %65
%66:f32 = call %compute_value_f1_f1_, %param_2, %param_3
%x_74:f32 = let %66
store_vector_element %c, 1u, %x_74
%68:f32 = load_vector_element %c, 0u
%x_77:f32 = let %68
if true [t: $B12, f: $B13] { # if_5
$B12: { # true
%70:vec3<f32> = load %c
store %x_61, %70
exit_if # if_5
}
$B13: { # false
%71:vec3<f32> = load %c
%72:ptr<uniform, vec2<f32>, read> = access %x_19, 0u
%73:f32 = load_vector_element %72, 0u
%74:vec3<f32> = mul %71, %73
store %x_61, %74
exit_if # if_5
}
}
%75:f32 = load_vector_element %x_61, 1u
%76:f32 = add %x_77, %75
store_vector_element %c, 2u, %76
store %i_1, 0i
loop [b: $B14, c: $B15] { # loop_2
$B14: { # body
%77:i32 = load %i_1
%78:bool = lt %77, 3i
if %78 [t: $B16, f: $B17] { # if_6
$B16: { # true
exit_if # if_6
}
$B17: { # false
exit_loop # loop_2
}
}
%79:i32 = load %i_1
%80:f32 = load_vector_element %c, %79
%81:bool = gte %80, 1.0f
if %81 [t: $B18] { # if_7
$B18: { # true
%82:i32 = load %i_1
%x_103:i32 = let %82
%84:i32 = load %i_1
%85:f32 = load_vector_element %c, %84
%86:i32 = load %i_1
%87:f32 = load_vector_element %c, %86
%88:f32 = mul %85, %87
store_vector_element %c, %x_103, %88
exit_if # if_7
}
}
store %j, 0.0f
loop [b: $B19, c: $B20] { # loop_3
$B19: { # body
%89:ptr<uniform, vec2<f32>, read> = access %x_19, 0u
%90:f32 = load_vector_element %89, 0u
%91:ptr<uniform, vec2<f32>, read> = access %x_19, 0u
%92:f32 = load_vector_element %91, 1u
%93:bool = gt %90, %92
if %93 [t: $B21, f: $B22] { # if_8
$B21: { # true
exit_if # if_8
}
$B22: { # false
exit_loop # loop_3
}
}
%94:f32 = load %j
%95:ptr<uniform, vec2<f32>, read> = access %x_19, 0u
%96:f32 = load_vector_element %95, 0u
%97:bool = gte %94, %96
if %97 [t: $B23] { # if_9
$B23: { # true
exit_loop # loop_3
}
}
%98:f32 = load %j
%99:f32 = add %98, 1.0f
store %j, %99
continue # -> $B20
}
$B20: { # continuing
next_iteration # -> $B19
}
}
continue # -> $B15
}
$B15: { # continuing
%100:i32 = load %i_1
%101:i32 = add %100, 1i
store %i_1, %101
next_iteration # -> $B14
}
}
%102:vec3<f32> = load %c
%103:vec3<f32> = abs %102
%104:vec3<f32> = normalize %103
%x_134:vec3<f32> = let %104
%106:f32 = access %x_134, 0u
%107:f32 = access %x_134, 1u
%108:f32 = access %x_134, 2u
%109:vec4<f32> = construct %106, %107, %108, 1.0f
store %x_GLF_color, %109
ret
}
}
%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
$B24: {
store %gl_FragCoord, %gl_FragCoord_param
%112:void = call %main_1
%113:vec4<f32> = load %x_GLF_color
%114:main_out = construct %113
ret %114
}
}
%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
$B25: {
%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. *
********************************************************************