blob: aa30f09a37d22c685074154c3bea1aceb9fbba60 [file] [log] [blame]
SKIP: FAILED
../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: buf1 = struct @align(8) {
v1:vec2<f32> @offset(0)
}
strided_arr = struct @align(4) {
el:i32 @offset(0)
}
buf0 = struct @align(4) {
x_GLF_uniform_int_values:array<strided_arr, 5> @offset(0)
}
S = struct @align(4) {
data:i32 @offset(0)
}
main_out = struct @align(16) {
x_GLF_color_1:vec4<f32> @offset(0), @location(0)
}
$B1: { # root
%x_8:ptr<uniform, buf1, read> = var @binding_point(0, 1)
%x_10:ptr<uniform, buf0, read> = var @binding_point(0, 0)
%x_GLF_color:ptr<private, vec4<f32>, read_write> = var
%continue_execution:ptr<private, bool, read_write> = var, true
}
%func_struct_S_i11_ = func(%s:ptr<function, S, read_write>):void {
$B2: {
loop [b: $B3] { # loop_1
$B3: { # body
%7:ptr<uniform, vec2<f32>, read> = access %x_8, 0u
%8:f32 = load_vector_element %7, 0u
%9:ptr<uniform, vec2<f32>, read> = access %x_8, 0u
%10:f32 = load_vector_element %9, 1u
%11:bool = gt %8, %10
if %11 [t: $B4, f: $B5] { # if_1
$B4: { # true
exit_if # if_1
}
$B5: { # false
exit_loop # loop_1
}
}
ret
}
}
%12:ptr<function, i32, read_write> = access %s, 0u
%13:ptr<uniform, i32, read> = access %x_10, 0u, 0i, 0u
%14:i32 = load %13
store %12, %14
ret
}
}
%main_1 = func():void {
$B6: {
%i:ptr<function, i32, read_write> = var
%arr:ptr<function, array<S, 3>, read_write> = var
%i_1:ptr<function, i32, read_write> = var
%param:ptr<function, S, read_write> = var
%j:ptr<function, i32, read_write> = var
%x_136:ptr<function, bool, read_write> = var
%x_137:ptr<function, bool, read_write> = var
%x_146:ptr<function, bool, read_write> = var
%x_147:ptr<function, bool, read_write> = var
%25:ptr<uniform, i32, read> = access %x_10, 0u, 2i, 0u
%26:i32 = load %25
store %i, %26
loop [b: $B7, c: $B8] { # loop_2
$B7: { # body
%27:i32 = load %i
%28:ptr<uniform, i32, read> = access %x_10, 0u, 1i, 0u
%29:i32 = load %28
%30:bool = lt %27, %29
if %30 [t: $B9, f: $B10] { # if_2
$B9: { # true
exit_if # if_2
}
$B10: { # false
exit_loop # loop_2
}
}
%31:i32 = load %i
%x_56:i32 = let %31
%33:ptr<function, i32, read_write> = access %arr, %x_56, 0u
%34:i32 = load %i
store %33, %34
continue # -> $B8
}
$B8: { # continuing
%35:i32 = load %i
%36:i32 = add %35, 1i
store %i, %36
next_iteration # -> $B7
}
}
%37:ptr<uniform, i32, read> = access %x_10, 0u, 2i, 0u
%38:i32 = load %37
store %i_1, %38
loop [b: $B11, c: $B12] { # loop_3
$B11: { # body
%39:i32 = load %i_1
%40:ptr<uniform, i32, read> = access %x_10, 0u, 1i, 0u
%41:i32 = load %40
%42:bool = lt %39, %41
if %42 [t: $B13, f: $B14] { # if_3
$B13: { # true
exit_if # if_3
}
$B14: { # false
exit_loop # loop_3
}
}
%43:ptr<uniform, vec2<f32>, read> = access %x_8, 0u
%44:f32 = load_vector_element %43, 0u
%45:ptr<uniform, vec2<f32>, read> = access %x_8, 0u
%46:f32 = load_vector_element %45, 1u
%47:bool = gt %44, %46
if %47 [t: $B15] { # if_4
$B15: { # true
exit_loop # loop_3
}
}
%48:i32 = load %i_1
%49:ptr<function, i32, read_write> = access %arr, %48, 0u
%50:i32 = load %49
%51:ptr<uniform, i32, read> = access %x_10, 0u, 0i, 0u
%52:i32 = load %51
%53:bool = eq %50, %52
if %53 [t: $B16, f: $B17] { # if_5
$B16: { # true
%54:i32 = load %i_1
%x_88:i32 = let %54
%56:i32 = max %x_88, 0i
%57:i32 = min %56, 3i
%58:ptr<function, i32, read_write> = access %arr, %57, 0u
%59:ptr<uniform, i32, read> = access %x_10, 0u, 3i, 0u
%60:i32 = load %59
store %58, %60
%61:ptr<function, S, read_write> = access %arr, 2i
%62:S = load %61
store %param, %62
%63:void = call %func_struct_S_i11_, %param
%64:ptr<function, S, read_write> = access %arr, 2i
%65:S = load %param
store %64, %65
exit_if # if_5
}
$B17: { # false
%66:ptr<uniform, i32, read> = access %x_10, 0u, 2i, 0u
%67:i32 = load %66
store %j, %67
loop [b: $B18, c: $B19] { # loop_4
$B18: { # body
%68:i32 = load %j
%69:ptr<uniform, i32, read> = access %x_10, 0u, 1i, 0u
%70:i32 = load %69
%71:bool = lt %68, %70
if %71 [t: $B20, f: $B21] { # if_6
$B20: { # true
exit_if # if_6
}
$B21: { # false
exit_loop # loop_4
}
}
%72:i32 = load %j
%73:ptr<function, i32, read_write> = access %arr, %72, 0u
%74:i32 = load %73
%75:ptr<uniform, i32, read> = access %x_10, 0u, 4i, 0u
%76:i32 = load %75
%77:bool = gt %74, %76
if %77 [t: $B22] { # if_7
$B22: { # true
store %continue_execution, false
exit_if # if_7
}
}
continue # -> $B19
}
$B19: { # continuing
%78:i32 = load %j
%79:i32 = add %78, 1i
store %j, %79
next_iteration # -> $B18
}
}
exit_if # if_5
}
}
continue # -> $B12
}
$B12: { # continuing
%80:i32 = load %i_1
%81:i32 = add %80, 1i
store %i_1, %81
next_iteration # -> $B11
}
}
%82:ptr<uniform, i32, read> = access %x_10, 0u, 2i, 0u
%83:i32 = load %82
%84:ptr<function, i32, read_write> = access %arr, %83, 0u
%85:i32 = load %84
%86:ptr<uniform, i32, read> = access %x_10, 0u, 2i, 0u
%87:i32 = load %86
%88:bool = eq %85, %87
%x_127:bool = let %88
store %x_137, %x_127
if %x_127 [t: $B23] { # if_8
$B23: { # true
%90:ptr<uniform, i32, read> = access %x_10, 0u, 0i, 0u
%91:i32 = load %90
%92:ptr<function, i32, read_write> = access %arr, %91, 0u
%93:i32 = load %92
%94:ptr<uniform, i32, read> = access %x_10, 0u, 3i, 0u
%95:i32 = load %94
%96:bool = eq %93, %95
store %x_136, %96
%97:bool = load %x_136
store %x_137, %97
exit_if # if_8
}
}
%98:bool = load %x_137
store %x_147, %98
%99:bool = load %x_137
if %99 [t: $B24] { # if_9
$B24: { # true
%100:ptr<uniform, i32, read> = access %x_10, 0u, 3i, 0u
%101:i32 = load %100
%102:ptr<function, i32, read_write> = access %arr, %101, 0u
%103:i32 = load %102
%104:ptr<uniform, i32, read> = access %x_10, 0u, 0i, 0u
%105:i32 = load %104
%106:bool = eq %103, %105
store %x_146, %106
%107:bool = load %x_146
store %x_147, %107
exit_if # if_9
}
}
%108:bool = load %x_147
if %108 [t: $B25, f: $B26] { # if_10
$B25: { # true
%109:ptr<uniform, i32, read> = access %x_10, 0u, 0i, 0u
%110:i32 = load %109
%111:f32 = convert %110
%112:f32 = let %111
%113:ptr<uniform, i32, read> = access %x_10, 0u, 2i, 0u
%114:i32 = load %113
%115:f32 = convert %114
%116:f32 = let %115
%117:ptr<uniform, i32, read> = access %x_10, 0u, 2i, 0u
%118:i32 = load %117
%119:f32 = convert %118
%120:f32 = let %119
%121:ptr<uniform, i32, read> = access %x_10, 0u, 0i, 0u
%122:i32 = load %121
%123:f32 = convert %122
%124:vec4<f32> = construct %112, %116, %120, %123
store %x_GLF_color, %124
exit_if # if_10
}
$B26: { # false
%125:ptr<uniform, i32, read> = access %x_10, 0u, 2i, 0u
%126:i32 = load %125
%127:f32 = convert %126
%128:vec4<f32> = construct %127
store %x_GLF_color, %128
exit_if # if_10
}
}
ret
}
}
%tint_symbol = @fragment func():main_out {
$B27: {
%130:void = call %main_1
%131:vec4<f32> = load %x_GLF_color
%132:main_out = construct %131
%133:bool = load %continue_execution
%134:bool = eq %133, false
if %134 [t: $B28] { # if_11
$B28: { # true
terminate_invocation
}
}
ret %132
}
}
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. *
********************************************************************