blob: aa82d4db211928388dddffea641d1ae006e7e126 [file] [log] [blame]
SKIP: FAILED
../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: strided_arr = struct @align(4) {
el:f32 @offset(0)
}
buf1 = struct @align(4) {
x_GLF_uniform_float_values:array<strided_arr, 3> @offset(0)
}
strided_arr_1 = struct @align(4) {
el:i32 @offset(0)
}
buf2 = struct @align(4) {
x_GLF_uniform_int_values:array<strided_arr_1, 4> @offset(0)
}
buf3 = struct @align(4) {
three:i32 @offset(0)
}
strided_arr_2 = struct @align(4) {
el:u32 @offset(0)
}
buf0 = struct @align(4) {
x_GLF_uniform_uint_values:array<strided_arr_2, 1> @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_8:ptr<uniform, buf1, read> = var @binding_point(0, 1)
%x_GLF_color:ptr<private, vec4<f32>, read_write> = var
%x_12:ptr<uniform, buf2, read> = var @binding_point(0, 2)
%x_14:ptr<uniform, buf3, read> = var @binding_point(0, 3)
%x_16:ptr<uniform, buf0, read> = var @binding_point(0, 0)
}
%func0_ = func():void {
$B2: {
%tmp:ptr<function, vec4<f32>, read_write> = var
%9:f32 = load_vector_element %gl_FragCoord, 0u
%10:ptr<uniform, f32, read> = access %x_8, 0u, 1i, 0u
%11:f32 = load %10
%12:bool = gt %9, %11
if %12 [t: $B3] { # if_1
$B3: { # true
%13:vec4<f32> = load %x_GLF_color
store %tmp, %13
exit_if # if_1
}
}
%14:vec4<f32> = load %tmp
store %x_GLF_color, %14
ret
}
}
%func1_ = func():i32 {
$B4: {
%a:ptr<function, i32, read_write> = var
%17:ptr<uniform, i32, read> = access %x_12, 0u, 1i, 0u
%18:i32 = load %17
store %a, %18
loop [b: $B5, c: $B6] { # loop_1
$B5: { # body
%19:i32 = load %a
%20:ptr<uniform, i32, read> = access %x_12, 0u, 3i, 0u
%21:i32 = load %20
%22:bool = lt %19, %21
if %22 [t: $B7, f: $B8] { # if_2
$B7: { # true
exit_if # if_2
}
$B8: { # false
exit_loop # loop_1
}
}
%23:ptr<uniform, i32, read> = access %x_14, 0u
%24:i32 = load %23
%25:ptr<uniform, i32, read> = access %x_12, 0u, 1i, 0u
%26:i32 = load %25
%27:bool = gt %24, %26
if %27 [t: $B9, f: $B10] { # if_3
$B9: { # true
%28:void = call %func0_
%29:ptr<uniform, i32, read> = access %x_12, 0u, 3i, 0u
%30:i32 = load %29
store %a, %30
exit_if # if_3
}
$B10: { # false
%31:void = call %func0_
exit_if # if_3
}
}
continue # -> $B6
}
$B6: { # continuing
next_iteration # -> $B5
}
}
%32:i32 = load %a
%x_144:i32 = let %32
ret %x_144
}
}
%main_1 = func():void {
$B11: {
%a_1:ptr<function, i32, read_write> = var
%i:ptr<function, i32, read_write> = var
%j:ptr<function, i32, read_write> = var
%38:f32 = load_vector_element %gl_FragCoord, 0u
%39:ptr<uniform, f32, read> = access %x_8, 0u, 1i, 0u
%40:f32 = load %39
%41:bool = gt %38, %40
if %41 [t: $B12, f: $B13] { # if_4
$B12: { # true
%42:ptr<uniform, f32, read> = access %x_8, 0u, 0i, 0u
%43:f32 = load %42
%44:ptr<uniform, f32, read> = access %x_8, 0u, 1i, 0u
%45:f32 = load %44
%46:ptr<uniform, f32, read> = access %x_8, 0u, 0i, 0u
%47:f32 = load %46
%48:ptr<uniform, f32, read> = access %x_8, 0u, 2i, 0u
%49:f32 = load %48
%50:vec4<f32> = construct %43, %45, %47, %49
store %x_GLF_color, %50
exit_if # if_4
}
$B13: { # false
%51:ptr<uniform, u32, read> = access %x_16, 0u, 0i, 0u
%52:u32 = load %51
%53:vec4<f32> = unpack4x8snorm %52
store %x_GLF_color, %53
exit_if # if_4
}
}
%54:ptr<uniform, i32, read> = access %x_12, 0u, 2i, 0u
%55:i32 = load %54
store %a_1, %55
store %i, 0i
loop [b: $B14, c: $B15] { # loop_2
$B14: { # body
%56:i32 = load %i
%57:bool = lt %56, 5i
if %57 [t: $B16, f: $B17] { # if_5
$B16: { # true
exit_if # if_5
}
$B17: { # false
exit_loop # loop_2
}
}
store %j, 0i
loop [b: $B18, c: $B19] { # loop_3
$B18: { # body
%58:i32 = load %j
%59:bool = lt %58, 2i
if %59 [t: $B20, f: $B21] { # if_6
$B20: { # true
exit_if # if_6
}
$B21: { # false
exit_loop # loop_3
}
}
%60:i32 = call %func1_
%x_91:i32 = let %60
%62:i32 = load %a_1
%63:i32 = add %62, %x_91
store %a_1, %63
continue # -> $B19
}
$B19: { # continuing
%64:i32 = load %j
%65:i32 = add %64, 1i
store %j, %65
next_iteration # -> $B18
}
}
continue # -> $B15
}
$B15: { # continuing
%66:i32 = load %i
%67:i32 = add %66, 1i
store %i, %67
next_iteration # -> $B14
}
}
%68:i32 = load %a_1
%69:ptr<uniform, i32, read> = access %x_12, 0u, 0i, 0u
%70:i32 = load %69
%71:bool = eq %68, %70
if %71 [t: $B22] { # if_7
$B22: { # true
%72:f32 = load_vector_element %x_GLF_color, 2u
%73:ptr<uniform, f32, read> = access %x_8, 0u, 0i, 0u
%74:f32 = load %73
%75:f32 = sub %72, %74
store_vector_element %x_GLF_color, 2u, %75
exit_if # if_7
}
}
ret
}
}
%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out {
$B23: {
store %gl_FragCoord, %gl_FragCoord_param
%78:void = call %main_1
%79:vec4<f32> = load %x_GLF_color
%80:main_out = construct %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. *
********************************************************************