blob: 10601ee30d3edcc6c8a556104f1e1aa597f804ba [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
%gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
%x_6:ptr<uniform, buf0, read> = var @binding_point(0, 0)
%x_GLF_color:ptr<private, vec4<f32>, read_write> = var
}
%main_1 = func():void {
$B2: {
%indexable:ptr<function, array<vec4<f32>, 16>, read_write> = var
%x_80:ptr<function, vec2<i32>, read_write> = var
%x_83:ptr<function, i32, read_write> = var
%x_113:ptr<function, vec2<i32>, read_write> = var
%x_114:ptr<function, vec2<i32>, read_write> = var
%x_116:ptr<function, vec2<i32>, read_write> = var
%x_119:ptr<function, i32, read_write> = var
%12:vec4<f32> = load %gl_FragCoord
%13:vec2<f32> = swizzle %12, xy
%14:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
%15:vec2<f32> = load %14
%16:vec2<f32> = div %13, %15
%x_62:vec2<f32> = let %16
%18:f32 = access %x_62, 0u
%19:f32 = mul %18, 8.0f
%20:i32 = call %tint_f32_to_i32, %19
%x_65:i32 = let %20
%23:f32 = access %x_62, 1u
%24:f32 = mul %23, 8.0f
%25:i32 = call %tint_f32_to_i32, %24
%x_69:i32 = let %25
%27:i32 = and %x_65, 5i
%28:i32 = and %x_69, 10i
%29:i32 = or %27, %28
%30:i32 = mul %29, 8i
%31:i32 = and %x_69, 5i
%32:i32 = and %x_65, 10i
%33:i32 = or %31, %32
%34:i32 = add %30, %33
%35:vec2<i32> = construct %34, 0i
store %x_80, %35
store %x_83, 0i
loop [b: $B3, c: $B4] { # loop_1
$B3: { # body
%x_94:ptr<function, vec2<i32>, read_write> = var
%x_95:ptr<function, vec2<i32>, read_write> = var
%x_102:ptr<function, vec2<i32>, read_write> = var
%x_103:ptr<function, vec2<i32>, read_write> = var
%x_84:ptr<function, i32, read_write> = var
%41:i32 = load %x_83
%42:bool = lt %41, 100i
if %42 [t: $B5, f: $B6] { # if_1
$B5: { # true
exit_if # if_1
}
$B6: { # false
exit_loop # loop_1
}
}
%43:vec2<i32> = load %x_80
store %x_95, %43
%44:i32 = load_vector_element %x_80, 0u
%45:bool = gt %44, 0i
if %45 [t: $B7] { # if_2
$B7: { # true
%46:vec2<i32> = load %x_80
store %x_94, %46
%47:i32 = load_vector_element %x_80, 1u
%48:i32 = sub %47, 1i
store_vector_element %x_94, 1u, %48
%49:vec2<i32> = load %x_94
store %x_95, %49
exit_if # if_2
}
}
%50:vec2<i32> = load %x_95
store %x_103, %50
%51:i32 = load_vector_element %x_95, 0u
%52:bool = lt %51, 0i
if %52 [t: $B8] { # if_3
$B8: { # true
%53:vec2<i32> = load %x_95
store %x_102, %53
%54:i32 = load_vector_element %x_95, 1u
%55:i32 = add %54, 1i
store_vector_element %x_102, 1u, %55
%56:vec2<i32> = load %x_102
store %x_103, %56
exit_if # if_3
}
}
%57:vec2<i32> = load %x_103
%x_81_1:ptr<function, vec2<i32>, read_write> = var, %57
%59:i32 = load_vector_element %x_103, 0u
%60:i32 = let %59
%61:i32 = load_vector_element %x_103, 1u
%62:i32 = call %tint_div_i32, %61, 2i
%64:i32 = add %60, %62
store_vector_element %x_81_1, 0u, %64
%65:vec2<i32> = load %x_81_1
%x_81:vec2<i32> = let %65
continue # -> $B4
}
$B4: { # continuing
%67:i32 = load %x_83
%68:i32 = add %67, 1i
store %x_84, %68
store %x_80, %x_81
%69:i32 = load %x_84
store %x_83, %69
next_iteration # -> $B3
}
}
%70:i32 = load_vector_element %x_80, 0u
%x_108:i32 = let %70
%72:vec2<i32> = load %x_80
store %x_114, %72
%73:bool = lt %x_108, 0i
if %73 [t: $B9] { # if_4
$B9: { # true
%74:vec2<i32> = load %x_80
store %x_113, %74
%75:i32 = negation %x_108
store_vector_element %x_113, 0u, %75
%76:vec2<i32> = load %x_113
store %x_114, %76
exit_if # if_4
}
}
%77:vec2<i32> = load %x_114
store %x_116, %77
loop [b: $B10, c: $B11] { # loop_2
$B10: { # body
%x_117:ptr<function, vec2<i32>, read_write> = var
%79:i32 = load_vector_element %x_116, 0u
store %x_119, %79
%80:i32 = load %x_119
%81:bool = gt %80, 15i
if %81 [t: $B12, f: $B13] { # if_5
$B12: { # true
exit_if # if_5
}
$B13: { # false
exit_loop # loop_2
}
}
continue # -> $B11
}
$B11: { # continuing
%82:vec2<i32> = load %x_116
store %x_117, %82
%83:i32 = load %x_119
%84:i32 = sub %83, 16i
store_vector_element %x_117, 0u, %84
%85:vec2<i32> = load %x_117
store %x_116, %85
next_iteration # -> $B10
}
}
store %indexable, array<vec4<f32>, 16>(vec4<f32>(0.0f, 0.0f, 0.0f, 1.0f), vec4<f32>(0.5f, 0.0f, 0.0f, 1.0f), vec4<f32>(0.0f, 0.5f, 0.0f, 1.0f), vec4<f32>(0.5f, 0.5f, 0.0f, 1.0f), vec4<f32>(0.0f, 0.0f, 0.5f, 1.0f), vec4<f32>(0.5f, 0.0f, 0.5f, 1.0f), vec4<f32>(0.0f, 0.5f, 0.5f, 1.0f), vec4<f32>(0.5f, 0.5f, 0.5f, 1.0f), vec4<f32>(0.0f, 0.0f, 0.0f, 1.0f), vec4<f32>(1.0f, 0.0f, 0.0f, 1.0f), vec4<f32>(0.0f, 1.0f, 0.0f, 1.0f), vec4<f32>(1.0f, 1.0f, 0.0f, 1.0f), vec4<f32>(0.0f, 0.0f, 1.0f, 1.0f), vec4<f32>(1.0f, 0.0f, 1.0f, 1.0f), vec4<f32>(0.0f, 1.0f, 1.0f, 1.0f), vec4<f32>(1.0f))
%86:i32 = load %x_119
%87:ptr<function, vec4<f32>, read_write> = access %indexable, %86
%88:vec4<f32> = load %87
store %x_GLF_color, %88
ret
}
}
%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
$B14: {
store %gl_FragCoord, %gl_FragCoord_param
%91:void = call %main_1
%92:vec4<f32> = load %x_GLF_color
%93:main_out = construct %92
ret %93
}
}
%tint_div_i32 = func(%lhs:i32, %rhs:i32):i32 {
$B15: {
%96:bool = eq %rhs, 0i
%97:bool = eq %lhs, -2147483648i
%98:bool = eq %rhs, -1i
%99:bool = and %97, %98
%100:bool = or %96, %99
%101:i32 = select %rhs, 1i, %100
%102:i32 = div %lhs, %101
ret %102
}
}
%tint_f32_to_i32 = func(%value:f32):i32 {
$B16: {
%104:i32 = convert %value
%105:bool = gte %value, -2147483648.0f
%106:i32 = select -2147483648i, %104, %105
%107:bool = lte %value, 2147483520.0f
%108:i32 = select 2147483647i, %106, %107
ret %108
}
}
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. *
********************************************************************