blob: c08c00b9b8d38df3789017c07592489f090bab99 [file] [log] [blame]
SKIP: FAILED
<dawn>/src/tint/lang/msl/writer/printer/printer.cc:355 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 = block { # root
%gl_FragCoord:ptr<private, vec4<f32>, read_write> = var
%x_20:ptr<uniform, buf0, read> = var @binding_point(0, 0)
%x_GLF_color:ptr<private, vec4<f32>, read_write> = var
%index:ptr<private, i32, read_write> = var
%state:ptr<private, array<i32, 16>, read_write> = var
}
%collision_vf2_vf4_ = func(%pos:ptr<function, vec2<f32>, read_write>, %quad:ptr<function, vec4<f32>, read_write>):bool -> %b2 {
%b2 = block {
%x_114:f32 = load_vector_element %pos, 0u
%x_116:f32 = load_vector_element %quad, 0u
%11:bool = lt %x_114, %x_116
if %11 [t: %b3] { # if_1
%b3 = block { # true
ret false
}
}
%x_121:f32 = load_vector_element %pos, 1u
%x_123:f32 = load_vector_element %quad, 1u
%14:bool = lt %x_121, %x_123
if %14 [t: %b4] { # if_2
%b4 = block { # true
ret false
}
}
%x_128:f32 = load_vector_element %pos, 0u
%x_130:f32 = load_vector_element %quad, 0u
%x_132:f32 = load_vector_element %quad, 2u
%18:f32 = add %x_130, %x_132
%19:bool = gt %x_128, %18
if %19 [t: %b5] { # if_3
%b5 = block { # true
ret false
}
}
%x_138:f32 = load_vector_element %pos, 1u
%x_140:f32 = load_vector_element %quad, 1u
%x_142:f32 = load_vector_element %quad, 3u
%23:f32 = add %x_140, %x_142
%24:bool = gt %x_138, %23
if %24 [t: %b6] { # if_4
%b6 = block { # true
ret false
}
}
ret true
}
}
%match_vf2_ = func(%pos_1:ptr<function, vec2<f32>, read_write>):vec4<f32> -> %b7 {
%b7 = block {
%res:ptr<function, vec4<f32>, read_write> = var
%i:ptr<function, i32, read_write> = var
%param:ptr<function, vec2<f32>, read_write> = var
%param_1:ptr<function, vec4<f32>, read_write> = var
%indexable:ptr<function, array<vec4<f32>, 8>, read_write> = var
%indexable_1:ptr<function, array<vec4<f32>, 8>, read_write> = var
%indexable_2:ptr<function, array<vec4<f32>, 8>, read_write> = var
%indexable_3:ptr<function, array<vec4<f32>, 16>, read_write> = var
store %res, vec4<f32>(0.5f, 0.5f, 1.0f, 1.0f)
store %i, 0i
loop [b: %b8, c: %b9] { # loop_1
%b8 = block { # body
%x_152:i32 = load %i
%36:bool = lt %x_152, 8i
if %36 [t: %b10, f: %b11] { # if_5
%b10 = block { # true
exit_if # if_5
}
%b11 = block { # false
exit_loop # loop_1
}
}
%x_155:i32 = load %i
%x_156:vec2<f32> = load %pos_1
store %param, %x_156
store %indexable, array<vec4<f32>, 8>(vec4<f32>(4.0f, 4.0f, 20.0f, 4.0f), vec4<f32>(4.0f, 4.0f, 4.0f, 20.0f), vec4<f32>(4.0f, 20.0f, 20.0f, 4.0f), vec4<f32>(20.0f, 4.0f, 4.0f, 8.0f), vec4<f32>(8.0f, 6.0f, 4.0f, 2.0f), vec4<f32>(2.0f, 12.0f, 2.0f, 4.0f), vec4<f32>(16.0f, 2.0f, 4.0f, 4.0f), vec4<f32>(12.0f, 22.0f, 4.0f, 4.0f))
%39:ptr<function, vec4<f32>, read_write> = access %indexable, %x_155
%x_158:vec4<f32> = load %39
store %param_1, %x_158
%x_159:bool = call %collision_vf2_vf4_, %param, %param_1
if %x_159 [t: %b12] { # if_6
%b12 = block { # true
%x_162:i32 = load %i
store %indexable_1, array<vec4<f32>, 8>(vec4<f32>(4.0f, 4.0f, 20.0f, 4.0f), vec4<f32>(4.0f, 4.0f, 4.0f, 20.0f), vec4<f32>(4.0f, 20.0f, 20.0f, 4.0f), vec4<f32>(20.0f, 4.0f, 4.0f, 8.0f), vec4<f32>(8.0f, 6.0f, 4.0f, 2.0f), vec4<f32>(2.0f, 12.0f, 2.0f, 4.0f), vec4<f32>(16.0f, 2.0f, 4.0f, 4.0f), vec4<f32>(12.0f, 22.0f, 4.0f, 4.0f))
%43:ptr<function, vec4<f32>, read_write> = access %indexable_1, %x_162
%x_164:f32 = load_vector_element %43, 0u
%x_166:i32 = load %i
store %indexable_2, array<vec4<f32>, 8>(vec4<f32>(4.0f, 4.0f, 20.0f, 4.0f), vec4<f32>(4.0f, 4.0f, 4.0f, 20.0f), vec4<f32>(4.0f, 20.0f, 20.0f, 4.0f), vec4<f32>(20.0f, 4.0f, 4.0f, 8.0f), vec4<f32>(8.0f, 6.0f, 4.0f, 2.0f), vec4<f32>(2.0f, 12.0f, 2.0f, 4.0f), vec4<f32>(16.0f, 2.0f, 4.0f, 4.0f), vec4<f32>(12.0f, 22.0f, 4.0f, 4.0f))
%46:ptr<function, vec4<f32>, read_write> = access %indexable_2, %x_166
%x_168:f32 = load_vector_element %46, 1u
%x_171:i32 = load %i
store %indexable_3, 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))
%49:i32 = convert %x_164
%50:i32 = convert %x_168
%51:i32 = mul %49, %50
%52:i32 = mul %x_171, 9i
%53:i32 = add %51, %52
%54:i32 = add %53, 11i
%55:i32 = mod %54, 16i
%56:ptr<function, vec4<f32>, read_write> = access %indexable_3, %55
%x_177:vec4<f32> = load %56
store %res, %x_177
exit_if # if_6
}
}
continue %b9
}
%b9 = block { # continuing
%x_178:i32 = load %i
%59:i32 = add %x_178, 1i
store %i, %59
next_iteration %b8
}
}
%x_180:vec4<f32> = load %res
ret %x_180
}
}
%main_1 = func():void -> %b13 {
%b13 = block {
%lin:ptr<function, vec2<f32>, read_write> = var
%param_2:ptr<function, vec2<f32>, read_write> = var
%x_102:vec4<f32> = load %gl_FragCoord
%65:ptr<uniform, vec2<f32>, read> = access %x_20, 0u
%x_105:vec2<f32> = load %65
%67:f32 = access %x_102, 0u
%68:f32 = access %x_102, 1u
%69:vec2<f32> = construct %67, %68
%70:vec2<f32> = div %69, %x_105
store %lin, %70
%x_107:vec2<f32> = load %lin
%72:vec2<f32> = mul %x_107, 32.0f
%73:vec2<f32> = floor %72
store %lin, %73
%x_110:vec2<f32> = load %lin
store %param_2, %x_110
%x_111:vec4<f32> = call %match_vf2_, %param_2
store %x_GLF_color, %x_111
ret
}
}
%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out -> %b14 {
%b14 = block {
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. *
********************************************************************