blob: 3a47ff9e5775a8d18038a09682c0f6e37b081d26 [file] [log] [blame]
SKIP: FAILED
../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: struct_base = struct @align(4) {
data:i32 @offset(0)
leftIndex:i32 @offset(4)
rightIndex:i32 @offset(8)
}
buf0 = struct @align(8) {
injectionSwitch:vec2<f32> @offset(0)
}
main_out = struct @align(16) {
x_GLF_color_1:vec4<f32> @offset(0), @location(0)
}
$B1: { # root
%struct_array:ptr<private, array<struct_base, 3>, read_write> = var
%x_8:ptr<uniform, buf0, read> = var @binding_point(0, 0)
%x_GLF_color:ptr<private, vec4<f32>, read_write> = var
}
%main_1 = func():void {
$B2: {
%index:ptr<function, i32, read_write> = var
store %struct_array, array<struct_base, 3>(struct_base(1i))
store %index, 1i
%6:ptr<private, i32, read_write> = access %struct_array, 1i, 2u
store %6, 1i
%7:ptr<private, i32, read_write> = access %struct_array, 1i, 1u
%8:i32 = load %7
%x_39:i32 = let %8
%10:bool = eq %x_39, 1i
if %10 [t: $B3, f: $B4] { # if_1
$B3: { # true
%11:ptr<uniform, vec2<f32>, read> = access %x_8, 0u
%12:f32 = load_vector_element %11, 0u
%x_45:f32 = let %12
%14:i32 = call %tint_f32_to_i32, %x_45
%16:ptr<private, i32, read_write> = access %struct_array, %14, 2u
%17:i32 = load %16
%x_48:i32 = let %17
store %index, %x_48
exit_if # if_1
}
$B4: { # false
%19:ptr<uniform, vec2<f32>, read> = access %x_8, 0u
%20:f32 = load_vector_element %19, 1u
%x_50:f32 = let %20
%22:i32 = call %tint_f32_to_i32, %x_50
%23:ptr<private, i32, read_write> = access %struct_array, %22, 1u
%24:i32 = load %23
%x_53:i32 = let %24
store %index, %x_53
exit_if # if_1
}
}
%26:ptr<private, i32, read_write> = access %struct_array, 1i, 1u
%27:i32 = load %26
%x_55:i32 = let %27
%29:bool = eq %x_55, 1i
if %29 [t: $B5, f: $B6] { # if_2
$B5: { # true
store %x_GLF_color, vec4<f32>(1.0f, 0.0f, 0.0f, 1.0f)
exit_if # if_2
}
$B6: { # false
store %x_GLF_color, vec4<f32>(1.0f)
exit_if # if_2
}
}
ret
}
}
%tint_symbol = @fragment func():main_out {
$B7: {
%31:void = call %main_1
%32:vec4<f32> = load %x_GLF_color
%33:main_out = construct %32
ret %33
}
}
%tint_f32_to_i32 = func(%value:f32):i32 {
$B8: {
%35:i32 = convert %value
%36:bool = gte %value, -2147483648.0f
%37:i32 = select -2147483648i, %35, %36
%38:bool = lte %value, 2147483520.0f
%39:i32 = select 2147483647i, %37, %38
ret %39
}
}
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. *
********************************************************************