blob: b09e012576af75941021d08618a5376b189d5c30 [file] [log] [blame]
SKIP: FAILED
../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: strided_arr = struct @align(4) {
el:i32 @offset(0)
}
buf0 = struct @align(4) {
x_GLF_uniform_int_values:array<strided_arr, 5> @offset(0)
}
main_out = struct @align(16) {
x_GLF_color_1:vec4<f32> @offset(0), @location(0)
}
$B1: { # root
%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: {
%a:ptr<function, i32, read_write> = var
%i:ptr<function, i32, read_write> = var
%indexable:ptr<function, array<i32, 9>, read_write> = var
%7:ptr<uniform, i32, read> = access %x_6, 0u, 2i, 0u
%8:i32 = load %7
store %a, %8
%9:ptr<uniform, i32, read> = access %x_6, 0u, 3i, 0u
%10:i32 = load %9
store %i, %10
loop [b: $B3, c: $B4] { # loop_1
$B3: { # body
%11:i32 = load %i
%12:ptr<uniform, i32, read> = access %x_6, 0u, 0i, 0u
%13:i32 = load %12
%14:bool = lt %11, %13
if %14 [t: $B5, f: $B6] { # if_1
$B5: { # true
exit_if # if_1
}
$B6: { # false
exit_loop # loop_1
}
}
%15:i32 = load %i
%x_50:i32 = let %15
%17:ptr<uniform, i32, read> = access %x_6, 0u, 4i, 0u
%18:i32 = load %17
%x_52:i32 = let %18
store %indexable, array<i32, 9>(1i, 2i, 3i, 4i, 5i, 6i, 7i, 8i, 9i)
%20:i32 = load %a
%21:i32 = let %20
%22:i32 = call %tint_mod_i32, %x_50, %x_52
%24:ptr<function, i32, read_write> = access %indexable, %22
%25:i32 = load %24
%26:i32 = add %21, %25
store %a, %26
continue # -> $B4
}
$B4: { # continuing
%27:i32 = load %i
%28:i32 = add %27, 1i
store %i, %28
next_iteration # -> $B3
}
}
%29:i32 = load %a
%30:ptr<uniform, i32, read> = access %x_6, 0u, 1i, 0u
%31:i32 = load %30
%32:bool = eq %29, %31
if %32 [t: $B7, f: $B8] { # if_2
$B7: { # true
%33:ptr<uniform, i32, read> = access %x_6, 0u, 2i, 0u
%34:i32 = load %33
%35:f32 = convert %34
%36:f32 = let %35
%37:ptr<uniform, i32, read> = access %x_6, 0u, 3i, 0u
%38:i32 = load %37
%39:f32 = convert %38
%40:f32 = let %39
%41:ptr<uniform, i32, read> = access %x_6, 0u, 3i, 0u
%42:i32 = load %41
%43:f32 = convert %42
%44:f32 = let %43
%45:ptr<uniform, i32, read> = access %x_6, 0u, 2i, 0u
%46:i32 = load %45
%47:f32 = convert %46
%48:vec4<f32> = construct %36, %40, %44, %47
store %x_GLF_color, %48
exit_if # if_2
}
$B8: { # false
%49:ptr<uniform, i32, read> = access %x_6, 0u, 3i, 0u
%50:i32 = load %49
%51:f32 = convert %50
%52:vec4<f32> = construct %51
store %x_GLF_color, %52
exit_if # if_2
}
}
ret
}
}
%tint_symbol = @fragment func():main_out {
$B9: {
%54:void = call %main_1
%55:vec4<f32> = load %x_GLF_color
%56:main_out = construct %55
ret %56
}
}
%tint_mod_i32 = func(%lhs:i32, %rhs:i32):i32 {
$B10: {
%59:bool = eq %rhs, 0i
%60:bool = eq %lhs, -2147483648i
%61:bool = eq %rhs, -1i
%62:bool = and %60, %61
%63:bool = or %59, %62
%64:i32 = select %rhs, 1i, %63
%65:i32 = let %64
%66:i32 = div %lhs, %65
%67:i32 = mul %66, %65
%68:i32 = sub %lhs, %67
ret %68
}
}
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. *
********************************************************************