blob: 29ae2663915cbc469d6c965073605cfa3bb0ee49 [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_71:ptr<function, i32, read_write> = var
%x_71_phi:ptr<function, i32, read_write> = var
%x_74_phi:ptr<function, i32, read_write> = var
%9:vec4<f32> = load %gl_FragCoord
%x_54:vec4<f32> = let %9
%11:f32 = access %x_54, 0u
%12:f32 = access %x_54, 1u
%13:vec2<f32> = construct %11, %12
%x_55:vec2<f32> = let %13
%15:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
%16:vec2<f32> = load %15
%x_58:vec2<f32> = let %16
%18:vec2<f32> = div %x_55, %x_58
%19:vec2<f32> = mul %18, 8.0f
%x_61:vec2<f32> = let %19
%21:vec2<f32> = floor %x_61
%x_62:vec2<f32> = let %21
%23:f32 = access %x_62, 0u
%24:i32 = call %tint_f32_to_i32, %23
%26:i32 = mul %24, 8i
%27:i32 = let %26
%28:f32 = access %x_62, 1u
%29:i32 = call %tint_f32_to_i32, %28
%30:i32 = add %27, %29
%x_69:i32 = let %30
store %x_71_phi, 0i
store %x_74_phi, %x_69
loop [b: $B3, c: $B4] { # loop_1
$B3: { # body
%x_85:ptr<function, i32, read_write> = var
%x_86:ptr<function, i32, read_write> = var
%x_75_phi:ptr<function, i32, read_write> = var
%35:i32 = load %x_71_phi
store %x_71, %35
%36:i32 = load %x_74_phi
%x_74:i32 = let %36
%38:bool = gt %x_74, 1i
if %38 [t: $B5, f: $B6] { # if_1
$B5: { # true
exit_if # if_1
}
$B6: { # false
exit_loop # loop_1
}
}
%39:i32 = and %x_74, 1i
%40:bool = eq %39, 1i
if %40 [t: $B7, f: $B8] { # if_2
$B7: { # true
%41:i32 = mul 3i, %x_74
%42:i32 = add %41, 1i
store %x_85, %42
%43:i32 = load %x_85
store %x_75_phi, %43
exit_if # if_2
}
$B8: { # false
%44:i32 = call %tint_div_i32, %x_74, 2i
store %x_86, %44
%46:i32 = load %x_86
store %x_75_phi, %46
exit_if # if_2
}
}
%47:i32 = load %x_75_phi
%x_75:i32 = let %47
continue # -> $B4
}
$B4: { # continuing
%49:i32 = load %x_71
%50:i32 = add %49, 1i
%51:i32 = bitcast %50
store %x_71_phi, %51
store %x_74_phi, %x_75
next_iteration # -> $B3
}
}
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))
%52:array<vec4<f32>, 16> = load %indexable
%x_88:array<vec4<f32>, 16> = let %52
store %indexable, array<vec4<f32>, 16>(vec4<f32>(0.0f))
store %indexable, %x_88
%54:array<vec4<f32>, 16> = construct vec4<f32>(0.0f, 0.0f, 0.5f, 1.0f), vec4<f32>(1.0f, 0.0f, 1.0f, 1.0f), vec4<f32>(0.0f, 0.5f, 0.5f, 1.0f), vec4<f32>(0.0f, 1.0f, 1.0f, 1.0f), vec4<f32>(1.0f), vec4<f32>(0.0f, 0.5f, 0.5f, 1.0f), vec4<f32>(0.0f, 0.5f, 0.5f, 1.0f), vec4<f32>(0.5f, 0.0f, 0.5f, 1.0f), vec4<f32>(1.0f, 1.0f, 0.0f, 1.0f), %x_54, vec4<f32>(0.0f, 0.0f, 0.5f, 1.0f), vec4<f32>(0.5f, 0.5f, 0.0f, 1.0f), vec4<f32>(0.0f, 0.5f, 0.0f, 1.0f), vec4<f32>(0.5f, 0.0f, 0.0f, 1.0f), vec4<f32>(0.0f, 1.0f, 0.0f, 1.0f), vec4<f32>(1.0f, 0.0f, 0.0f, 1.0f)
%55:vec4<f32> = access %54, 1u
%x_89:vec4<f32> = let %55
%57:vec4<f32> = construct 0.0f, 8.0f, %x_55
%58:vec4<f32> = let %57
%59:vec4<f32> = construct %x_61, 0.5f, 1.0f
%60:array<vec4<f32>, 16> = construct vec4<f32>(0.5f, 0.0f, 0.5f, 1.0f), vec4<f32>(0.5f, 0.0f, 0.5f, 1.0f), vec4<f32>(0.0f, 1.0f, 0.0f, 1.0f), vec4<f32>(0.0f, 0.0f, 0.0f, 1.0f), vec4<f32>(0.5f, 0.0f, 0.5f, 1.0f), vec4<f32>(0.5f, 0.5f, 0.5f, 1.0f), vec4<f32>(1.0f, 0.0f, 1.0f, 1.0f), vec4<f32>(0.0f, 0.0f, 0.0f, 1.0f), vec4<f32>(0.0f, 1.0f, 0.0f, 1.0f), %58, vec4<f32>(0.0f, 0.0f, 0.5f, 1.0f), vec4<f32>(0.0f, 0.5f, 0.5f, 1.0f), vec4<f32>(0.5f, 0.0f, 0.5f, 1.0f), vec4<f32>(1.0f, 1.0f, 0.0f, 1.0f), vec4<f32>(1.0f, 0.0f, 1.0f, 1.0f), %59
%x_90:array<vec4<f32>, 16> = let %60
%62:i32 = load %x_71
%63:i32 = call %tint_mod_i32, %62, 16i
%65:i32 = bitcast %63
%66:ptr<function, vec4<f32>, read_write> = access %indexable, %65
%67:vec4<f32> = load %66
%x_92:vec4<f32> = let %67
store %x_GLF_color, %x_92
ret
}
}
%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
$B9: {
store %gl_FragCoord, %gl_FragCoord_param
%71:void = call %main_1
%72:vec4<f32> = load %x_GLF_color
%73:main_out = construct %72
ret %73
}
}
%tint_div_i32 = func(%lhs:i32, %rhs:i32):i32 {
$B10: {
%76:bool = eq %rhs, 0i
%77:bool = eq %lhs, -2147483648i
%78:bool = eq %rhs, -1i
%79:bool = and %77, %78
%80:bool = or %76, %79
%81:i32 = select %rhs, 1i, %80
%82:i32 = div %lhs, %81
ret %82
}
}
%tint_mod_i32 = func(%lhs_1:i32, %rhs_1:i32):i32 { # %lhs_1: 'lhs', %rhs_1: 'rhs'
$B11: {
%85:bool = eq %rhs_1, 0i
%86:bool = eq %lhs_1, -2147483648i
%87:bool = eq %rhs_1, -1i
%88:bool = and %86, %87
%89:bool = or %85, %88
%90:i32 = select %rhs_1, 1i, %89
%91:i32 = let %90
%92:i32 = div %lhs_1, %91
%93:i32 = mul %92, %91
%94:i32 = sub %lhs_1, %93
ret %94
}
}
%tint_f32_to_i32 = func(%value:f32):i32 {
$B12: {
%96:i32 = convert %value
%97:bool = gte %value, -2147483648.0f
%98:i32 = select -2147483648i, %96, %97
%99:bool = lte %value, 2147483520.0f
%100:i32 = select 2147483647i, %98, %99
ret %100
}
}
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. *
********************************************************************