blob: f0cc3fa5038da5627725c15c2cc1d6436d4ece7f [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
%x_13: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
}
%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
%9:i32 = load %i
%10:bool = lt %9, 800i
if %10 [t: $B5, f: $B6] { # if_1
$B5: { # true
exit_if # if_1
}
$B6: { # false
exit_loop # loop_1
}
}
%11:i32 = load %i
%12:i32 = call %tint_mod_i32, %11, 32i
%14:bool = eq %12, 0i
if %14 [t: $B7, f: $B8] { # if_2
$B7: { # true
%15:f32 = load %result
%16:f32 = add %15, 0.40000000596046447754f
store %result, %16
exit_if # if_2
}
$B8: { # false
%17:f32 = load %thirty_two
%x_149:f32 = let %17
%19:i32 = load %i
%20:f32 = convert %19
%21:f32 = let %20
%22:f32 = round %x_149
%23:f32 = let %22
%24:i32 = load %i
%25:f32 = convert %24
%26:f32 = let %25
%27:f32 = round %x_149
%28:f32 = div %26, %27
%29:f32 = floor %28
%30:f32 = mul %23, %29
%31:f32 = sub %21, %30
%32:bool = lte %31, 0.00999999977648258209f
if %32 [t: $B9] { # if_3
$B9: { # true
%33:f32 = load %result
%34:f32 = add %33, 100.0f
store %result, %34
exit_if # if_3
}
}
exit_if # if_2
}
}
%35:i32 = load %i
%36:f32 = convert %35
%37:f32 = load %limit
%38:bool = gte %36, %37
if %38 [t: $B10] { # if_4
$B10: { # true
%39:f32 = load %result
%x_163:f32 = let %39
ret %x_163
}
}
continue # -> $B4
}
$B4: { # continuing
%41:i32 = load %i
%42:i32 = add %41, 1i
store %i, %42
next_iteration # -> $B3
}
}
%43:f32 = load %result
%x_166:f32 = let %43
ret %x_166
}
}
%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
%i_1:ptr<function, i32, read_write> = var
store %c, vec3<f32>(7.0f, 8.0f, 9.0f)
%53:ptr<uniform, vec2<f32>, read> = access %x_13, 0u
%54:f32 = load_vector_element %53, 0u
%55:f32 = div %54, 8.0f
%56:f32 = round %55
store %thirty_two_1, %56
%57:f32 = load_vector_element %gl_FragCoord, 0u
store %param, %57
%58:f32 = load %thirty_two_1
store %param_1, %58
%59:f32 = call %compute_value_f1_f1_, %param, %param_1
%x_69:f32 = let %59
store_vector_element %c, 0u, %x_69
%61:f32 = load_vector_element %gl_FragCoord, 1u
store %param_2, %61
%62:f32 = load %thirty_two_1
store %param_3, %62
%63:f32 = call %compute_value_f1_f1_, %param_2, %param_3
%x_74:f32 = let %63
store_vector_element %c, 1u, %x_74
%65:f32 = load_vector_element %c, 0u
%66:f32 = load_vector_element %c, 1u
%67:vec2<f32> = construct %65, %66
%68:vec2<f32> = let %67
%69:f32 = load_vector_element %c, 2u
%70:vec2<f32> = construct %69, 1.0f
%71:mat4x2<f32> = construct %68, %70, vec2<f32>(1.0f, 0.0f), vec2<f32>(1.0f, 0.0f)
%x_87:mat4x2<f32> = let %71
%73:vec3<f32> = load %c
%74:vec3<f32> = mul %73, mat3x3<f32>(vec3<f32>(1.0f, 0.0f, 0.0f), vec3<f32>(0.0f, 1.0f, 0.0f), vec3<f32>(0.0f, 0.0f, 1.0f))
%75:f32 = access %74, 0u
%76:f32 = let %75
%77:f32 = access %x_87, 0u, 0u
%78:f32 = access %x_87, 0u, 1u
%79:f32 = access %x_87, 1u, 0u
%80:vec3<f32> = construct %77, %78, %79
%81:f32 = access %80, 1u
%82:f32 = add %76, %81
store_vector_element %c, 2u, %82
store %i_1, 0i
loop [b: $B12, c: $B13] { # loop_2
$B12: { # body
%83:i32 = load %i_1
%84:bool = lt %83, 3i
if %84 [t: $B14, f: $B15] { # if_5
$B14: { # true
exit_if # if_5
}
$B15: { # false
exit_loop # loop_2
}
}
%85:i32 = load %i_1
%86:f32 = load_vector_element %c, %85
%87:bool = gte %86, 1.0f
if %87 [t: $B16] { # if_6
$B16: { # true
%88:i32 = load %i_1
%x_108:i32 = let %88
%90:i32 = load %i_1
%91:f32 = load_vector_element %c, %90
%92:i32 = load %i_1
%93:f32 = load_vector_element %c, %92
%94:f32 = mul %91, %93
store_vector_element %c, %x_108, %94
%95:f32 = load_vector_element %gl_FragCoord, 1u
%96:bool = lt %95, 0.0f
if %96 [t: $B17] { # if_7
$B17: { # true
exit_loop # loop_2
}
}
exit_if # if_6
}
}
continue # -> $B13
}
$B13: { # continuing
%97:i32 = load %i_1
%98:i32 = add %97, 1i
store %i_1, %98
next_iteration # -> $B12
}
}
%99:vec3<f32> = load %c
%100:vec3<f32> = abs %99
%101:vec3<f32> = normalize %100
%x_126:vec3<f32> = let %101
%103:f32 = access %x_126, 0u
%104:f32 = access %x_126, 1u
%105:f32 = access %x_126, 2u
%106:vec4<f32> = construct %103, %104, %105, 1.0f
store %x_GLF_color, %106
ret
}
}
%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
$B18: {
store %gl_FragCoord, %gl_FragCoord_param
%109:void = call %main_1
%110:vec4<f32> = load %x_GLF_color
%111:main_out = construct %110
ret %111
}
}
%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
$B19: {
%114:bool = eq %rhs, 0i
%115:bool = eq %lhs, -2147483648i
%116:bool = eq %rhs, -1i
%117:bool = and %115, %116
%118:bool = or %114, %117
%119:i32 = select %rhs, 1i, %118
%120:i32 = let %119
%121:i32 = div %lhs, %120
%122:i32 = mul %121, %120
%123:i32 = sub %lhs, %122
ret %123
}
}
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. *
********************************************************************