blob: f6a7a73f99d70a6dd5450990896acf246ef53fa6 [file] [log] [blame]
SKIP: FAILED
../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: buf0 = struct @align(4) {
one:i32 @offset(0)
}
S = struct @align(4) {
a:i32 @offset(0)
b:i32 @offset(4)
c:i32 @offset(8)
}
main_out = struct @align(16) {
x_GLF_color_1:vec4<f32> @offset(0), @location(0)
}
$B1: { # root
%x_10:ptr<uniform, buf0, read> = var @binding_point(0, 0)
%x_GLF_color:ptr<private, vec4<f32>, read_write> = var
}
%main_1 = func():void {
$B2: {
%x_43:ptr<function, i32, read_write> = var
%x_44:ptr<function, bool, read_write> = var, false
%arr:ptr<function, array<S, 2>, read_write> = var
%param:ptr<function, S, read_write> = var
%param_1:ptr<function, i32, read_write> = var
loop [b: $B3] { # loop_1
$B3: { # body
%x_50:ptr<function, i32, read_write> = var
%10:ptr<uniform, i32, read> = access %x_10, 0u
%11:i32 = load %10
store %x_50, %11
%12:i32 = load %x_50
%13:ptr<function, i32, read_write> = access %arr, %12, 0u
store %13, 2i
%14:ptr<function, i32, read_write> = access %arr, 1i, 0u
%15:i32 = load %14
%x_53:i32 = let %15
%17:bool = lt %x_53, 1i
if %17 [t: $B4, f: $B5] { # if_1
$B4: { # true
store %x_GLF_color, vec4<f32>(0.0f)
store %x_44, true
exit_loop # loop_1
}
$B5: { # false
%18:ptr<function, S, read_write> = access %arr, 1i
%19:S = load %18
%x_60:S = let %19
store %param, %x_60
%21:i32 = load %x_50
%22:i32 = bitcast %21
%23:i32 = add 2i, %22
store %param_1, %23
%24:i32 = load %param_1
%x_61:i32 = let %24
%26:S = load %param
%x_63:S = let %26
%x_64_1:ptr<function, S, read_write> = var, %x_63
%29:ptr<function, i32, read_write> = access %x_64_1, 0u
store %29, %x_61
%30:S = load %x_64_1
%x_64:S = let %30
store %param, %x_64
%32:S = load %param
%x_65:S = let %32
%34:i32 = access %x_65, 0u
%35:bool = eq %34, 2i
if %35 [t: $B6] { # if_2
$B6: { # true
%36:S = load %param
%x_70:S = let %36
%x_71_1:ptr<function, S, read_write> = var, %x_70
%39:ptr<function, i32, read_write> = access %x_71_1, 0u
store %39, 9i
%40:S = load %x_71_1
%x_71:S = let %40
store %param, %x_71
exit_if # if_2
}
}
%42:i32 = load %param_1
%x_72:i32 = let %42
%44:S = load %param
%x_75:S = let %44
%x_76_1:ptr<function, S, read_write> = var, %x_75
%47:ptr<function, i32, read_write> = access %x_76_1, 1u
%48:i32 = add %x_72, 1i
store %47, %48
%49:S = load %x_76_1
%x_76:S = let %49
store %param, %x_76
%51:i32 = load %param_1
%x_77:i32 = let %51
%53:S = load %param
%x_80:S = let %53
%x_81_1:ptr<function, S, read_write> = var, %x_80
%56:ptr<function, i32, read_write> = access %x_81_1, 2u
%57:i32 = add %x_77, 2i
store %56, %57
%58:S = load %x_81_1
%x_81:S = let %58
store %param, %x_81
%60:S = load %param
%x_82:S = let %60
%62:i32 = access %x_82, 1u
%63:bool = eq %62, 2i
if %63 [t: $B7] { # if_3
$B7: { # true
%64:S = load %param
%x_87:S = let %64
%x_88_1:ptr<function, S, read_write> = var, %x_87
%67:ptr<function, i32, read_write> = access %x_88_1, 1u
store %67, 7i
%68:S = load %x_88_1
%x_88:S = let %68
store %param, %x_88
exit_if # if_3
}
}
%70:S = load %param
%x_89:S = let %70
%72:S = load %param
%x_91:S = let %72
%74:S = load %param
%x_94:S = let %74
%76:i32 = access %x_89, 0u
%77:i32 = access %x_91, 1u
%78:i32 = add %76, %77
%79:i32 = access %x_94, 2u
%80:i32 = add %78, %79
store %x_43, %80
%81:i32 = load %x_43
%x_97:i32 = let %81
%83:bool = eq %x_97, 12i
if %83 [t: $B8, f: $B9] { # if_4
$B8: { # true
store %x_GLF_color, vec4<f32>(1.0f, 0.0f, 0.0f, 1.0f)
exit_if # if_4
}
$B9: { # false
store %x_GLF_color, vec4<f32>(0.0f)
exit_if # if_4
}
}
exit_if # if_1
}
}
store %x_44, true
exit_loop # loop_1
}
}
ret
}
}
%tint_symbol = @fragment func():main_out {
$B10: {
%85:void = call %main_1
%86:vec4<f32> = load %x_GLF_color
%87:main_out = construct %86
ret %87
}
}
%func_struct_S_i1_i1_i11_i1_ = func(%s:ptr<function, S, read_write>, %x:ptr<function, i32, read_write>):i32 {
$B11: {
%91:i32 = load %x
%x_103:i32 = let %91
%93:ptr<function, i32, read_write> = access %s, 0u
store %93, %x_103
%94:ptr<function, i32, read_write> = access %s, 0u
%95:i32 = load %94
%x_105:i32 = let %95
%97:bool = eq %x_105, 2i
if %97 [t: $B12] { # if_5
$B12: { # true
%98:ptr<function, i32, read_write> = access %s, 0u
store %98, 9i
exit_if # if_5
}
}
%99:i32 = load %x
%x_109:i32 = let %99
%101:ptr<function, i32, read_write> = access %s, 1u
%102:i32 = add %x_109, 1i
store %101, %102
%103:i32 = load %x
%x_112:i32 = let %103
%105:ptr<function, i32, read_write> = access %s, 2u
%106:i32 = add %x_112, 2i
store %105, %106
%107:ptr<function, i32, read_write> = access %s, 1u
%108:i32 = load %107
%x_115:i32 = let %108
%110:bool = eq %x_115, 2i
if %110 [t: $B13] { # if_6
$B13: { # true
%111:ptr<function, i32, read_write> = access %s, 1u
store %111, 7i
exit_if # if_6
}
}
%112:ptr<function, i32, read_write> = access %s, 0u
%113:i32 = load %112
%x_119:i32 = let %113
%115:ptr<function, i32, read_write> = access %s, 1u
%116:i32 = load %115
%x_120:i32 = let %116
%118:ptr<function, i32, read_write> = access %s, 2u
%119:i32 = load %118
%x_122:i32 = let %119
%121:i32 = add %x_119, %x_120
%122:i32 = add %121, %x_122
ret %122
}
}
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. *
********************************************************************