blob: bef05c14121c657f8b059b2e862f76e91942dd64 [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_65:ptr<function, i32, read_write> = var
%x_68:ptr<function, i32, read_write> = var
%8:vec4<f32> = load %gl_FragCoord
%9:vec2<f32> = swizzle %8, xy
%10:ptr<uniform, vec2<f32>, read> = access %x_6, 0u
%11:vec2<f32> = load %10
%12:vec2<f32> = div %9, %11
%13:vec2<f32> = mul %12, 8.0f
%14:vec2<f32> = floor %13
%x_57:vec2<f32> = let %14
%16:f32 = access %x_57, 0u
%17:i32 = call %tint_f32_to_i32, %16
%19:i32 = mul %17, 8i
%20:i32 = let %19
%21:f32 = access %x_57, 1u
%22:i32 = call %tint_f32_to_i32, %21
%23:i32 = add %20, %22
%x_63:i32 = let %23
store %x_65, 0i
store %x_68, %x_63
loop [b: $B3, c: $B4] { # loop_1
$B3: { # body
%x_79:ptr<function, i32, read_write> = var
%x_80:ptr<function, i32, read_write> = var
%x_69:ptr<function, i32, read_write> = var
%28:i32 = load %x_68
%29:bool = gt %28, 1i
if %29 [t: $B5, f: $B6] { # if_1
$B5: { # true
exit_if # if_1
}
$B6: { # false
exit_loop # loop_1
}
}
%30:i32 = load %x_68
%31:i32 = and %30, 1i
%32:bool = eq %31, 1i
if %32 [t: $B7, f: $B8] { # if_2
$B7: { # true
%33:i32 = load %x_68
%34:i32 = mul 3i, %33
%35:i32 = add %34, 1i
store %x_79, %35
%36:i32 = load %x_79
store %x_69, %36
exit_if # if_2
}
$B8: { # false
%37:i32 = load %x_68
%38:i32 = call %tint_div_i32, %37, 2i
store %x_80, %38
%40:i32 = load %x_80
store %x_69, %40
exit_if # if_2
}
}
continue # -> $B4
}
$B4: { # continuing
%41:i32 = load %x_65
%42:i32 = add %41, 1i
store %x_65, %42
%43:i32 = load %x_69
store %x_68, %43
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))
%44:i32 = load %x_65
%45:i32 = call %tint_mod_i32, %44, 16i
%47:ptr<function, vec4<f32>, read_write> = access %indexable, %45
%48:vec4<f32> = load %47
store %x_GLF_color, %48
ret
}
}
%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
$B9: {
store %gl_FragCoord, %gl_FragCoord_param
%51:void = call %main_1
%52:vec4<f32> = load %x_GLF_color
%53:main_out = construct %52
ret %53
}
}
%tint_div_i32 = func(%lhs:i32, %rhs:i32):i32 {
$B10: {
%56:bool = eq %rhs, 0i
%57:bool = eq %lhs, -2147483648i
%58:bool = eq %rhs, -1i
%59:bool = and %57, %58
%60:bool = or %56, %59
%61:i32 = select %rhs, 1i, %60
%62:i32 = div %lhs, %61
ret %62
}
}
%tint_mod_i32 = func(%lhs_1:i32, %rhs_1:i32):i32 { # %lhs_1: 'lhs', %rhs_1: 'rhs'
$B11: {
%65:bool = eq %rhs_1, 0i
%66:bool = eq %lhs_1, -2147483648i
%67:bool = eq %rhs_1, -1i
%68:bool = and %66, %67
%69:bool = or %65, %68
%70:i32 = select %rhs_1, 1i, %69
%71:i32 = let %70
%72:i32 = div %lhs_1, %71
%73:i32 = mul %72, %71
%74:i32 = sub %lhs_1, %73
ret %74
}
}
%tint_f32_to_i32 = func(%value:f32):i32 {
$B12: {
%76:i32 = convert %value
%77:bool = gte %value, -2147483648.0f
%78:i32 = select -2147483648i, %76, %77
%79:bool = lte %value, 2147483520.0f
%80:i32 = select 2147483647i, %78, %79
ret %80
}
}
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. *
********************************************************************