blob: 546198ed12111f1334009fe6235888834ccaa644 [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_77:ptr<function, vec2<i32>, read_write> = var
%x_80:ptr<function, i32, read_write> = var
%x_110:ptr<function, vec2<i32>, read_write> = var
%x_111:ptr<function, vec2<i32>, read_write> = var
%x_113:ptr<function, vec2<i32>, read_write> = var
%x_116: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_60:vec2<f32> = let %16
%18:f32 = access %x_60, 0u
%19:f32 = mul %18, 8.0f
%20:i32 = call %tint_f32_to_i32, %19
%x_63:i32 = let %20
%23:f32 = access %x_60, 1u
%24:f32 = mul %23, 8.0f
%25:i32 = call %tint_f32_to_i32, %24
%x_66:i32 = let %25
%27:i32 = and %x_63, 5i
%28:i32 = and %x_66, 10i
%29:i32 = or %27, %28
%30:i32 = mul %29, 8i
%31:i32 = and %x_66, 5i
%32:i32 = and %x_63, 10i
%33:i32 = or %31, %32
%34:i32 = add %30, %33
%35:vec2<i32> = construct %34, 0i
store %x_77, %35
store %x_80, 0i
loop [b: $B3, c: $B4] { # loop_1
$B3: { # body
%x_91:ptr<function, vec2<i32>, read_write> = var
%x_92:ptr<function, vec2<i32>, read_write> = var
%x_99:ptr<function, vec2<i32>, read_write> = var
%x_100:ptr<function, vec2<i32>, read_write> = var
%x_81:ptr<function, i32, read_write> = var
%41:i32 = load %x_80
%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_77
store %x_92, %43
%44:i32 = load_vector_element %x_77, 0u
%45:bool = gt %44, 0i
if %45 [t: $B7] { # if_2
$B7: { # true
%46:vec2<i32> = load %x_77
store %x_91, %46
%47:i32 = load_vector_element %x_77, 1u
%48:i32 = sub %47, 1i
store_vector_element %x_91, 1u, %48
%49:vec2<i32> = load %x_91
store %x_92, %49
exit_if # if_2
}
}
%50:vec2<i32> = load %x_92
store %x_100, %50
%51:i32 = load_vector_element %x_92, 0u
%52:bool = lt %51, 0i
if %52 [t: $B8] { # if_3
$B8: { # true
%53:vec2<i32> = load %x_92
store %x_99, %53
%54:i32 = load_vector_element %x_92, 1u
%55:i32 = add %54, 1i
store_vector_element %x_99, 1u, %55
%56:vec2<i32> = load %x_99
store %x_100, %56
exit_if # if_3
}
}
%57:vec2<i32> = load %x_100
%x_78_1:ptr<function, vec2<i32>, read_write> = var, %57
%59:i32 = load_vector_element %x_100, 0u
%60:i32 = let %59
%61:i32 = load_vector_element %x_100, 1u
%62:i32 = call %tint_div_i32, %61, 2i
%64:i32 = add %60, %62
store_vector_element %x_78_1, 0u, %64
%65:vec2<i32> = load %x_78_1
%x_78:vec2<i32> = let %65
continue # -> $B4
}
$B4: { # continuing
%67:i32 = load %x_80
%68:i32 = add %67, 1i
store %x_81, %68
store %x_77, %x_78
%69:i32 = load %x_81
store %x_80, %69
next_iteration # -> $B3
}
}
%70:i32 = load_vector_element %x_77, 0u
%x_105:i32 = let %70
%72:vec2<i32> = load %x_77
store %x_111, %72
%73:bool = lt %x_105, 0i
if %73 [t: $B9] { # if_4
$B9: { # true
store %x_110, vec2<i32>(0i)
%74:i32 = negation %x_105
store_vector_element %x_110, 0u, %74
%75:vec2<i32> = load %x_110
store %x_111, %75
exit_if # if_4
}
}
%76:vec2<i32> = load %x_111
store %x_113, %76
loop [b: $B10, c: $B11] { # loop_2
$B10: { # body
%x_114:ptr<function, vec2<i32>, read_write> = var
%78:i32 = load_vector_element %x_113, 0u
store %x_116, %78
%79:i32 = load %x_116
%80:bool = gt %79, 15i
if %80 [t: $B12, f: $B13] { # if_5
$B12: { # true
exit_if # if_5
}
$B13: { # false
exit_loop # loop_2
}
}
continue # -> $B11
}
$B11: { # continuing
store %x_114, vec2<i32>(0i)
%81:i32 = load %x_116
%82:i32 = sub %81, 16i
store_vector_element %x_114, 0u, %82
%83:vec2<i32> = load %x_114
store %x_113, %83
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))
%84:i32 = load %x_116
%85:ptr<function, vec4<f32>, read_write> = access %indexable, %84
%86:vec4<f32> = load %85
store %x_GLF_color, %86
ret
}
}
%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
$B14: {
store %gl_FragCoord, %gl_FragCoord_param
%89:void = call %main_1
%90:vec4<f32> = load %x_GLF_color
%91:main_out = construct %90
ret %91
}
}
%tint_div_i32 = func(%lhs:i32, %rhs:i32):i32 {
$B15: {
%94:bool = eq %rhs, 0i
%95:bool = eq %lhs, -2147483648i
%96:bool = eq %rhs, -1i
%97:bool = and %95, %96
%98:bool = or %94, %97
%99:i32 = select %rhs, 1i, %98
%100:i32 = div %lhs, %99
ret %100
}
}
%tint_f32_to_i32 = func(%value:f32):i32 {
$B16: {
%102:i32 = convert %value
%103:bool = gte %value, -2147483648.0f
%104:i32 = select -2147483648i, %102, %103
%105:bool = lte %value, 2147483520.0f
%106:i32 = select 2147483647i, %104, %105
ret %106
}
}
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. *
********************************************************************