blob: bdc7c2e5bc1c6c3c07d5ac4185f5a1bb427e973d [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
%9:bool = eq %8, 1i
if %9 [t: $B3, f: $B4] { # if_1
$B3: { # true
%10:ptr<uniform, vec2<f32>, read> = access %x_8, 0u
%11:f32 = load_vector_element %10, 0u
%12:i32 = call %tint_f32_to_i32, %11
%14:ptr<private, i32, read_write> = access %struct_array, %12, 2u
%15:i32 = load %14
store %index, %15
exit_if # if_1
}
$B4: { # false
%16:ptr<uniform, vec2<f32>, read> = access %x_8, 0u
%17:f32 = load_vector_element %16, 1u
%18:i32 = call %tint_f32_to_i32, %17
%19:ptr<private, i32, read_write> = access %struct_array, %18, 1u
%20:i32 = load %19
store %index, %20
exit_if # if_1
}
}
%21:ptr<private, i32, read_write> = access %struct_array, 1i, 1u
%22:i32 = load %21
%23:bool = eq %22, 1i
if %23 [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: {
%25:void = call %main_1
%26:vec4<f32> = load %x_GLF_color
%27:main_out = construct %26
ret %27
}
}
%tint_f32_to_i32 = func(%value:f32):i32 {
$B8: {
%29:i32 = convert %value
%30:bool = gte %value, -2147483648.0f
%31:i32 = select -2147483648i, %29, %30
%32:bool = lte %value, 2147483520.0f
%33:i32 = select 2147483647i, %31, %32
ret %33
}
}
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. *
********************************************************************