blob: 18ff9b4db604fed2d5371a03d314e504aad1749c [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_24:ptr<uniform, buf0, read> = var @binding_point(0, 0)
%x_GLF_color:ptr<private, vec4<f32>, read_write> = var
}
%cross2d_vf2_vf2_ = func(%a:ptr<function, vec2<f32>, read_write>, %b:ptr<function, vec2<f32>, read_write>):f32 -> %b2 {
%b2 = block {
%x_79:f32 = load_vector_element %a, 0u
%x_81:f32 = load_vector_element %b, 1u
%x_84:f32 = load_vector_element %b, 0u
%x_86:f32 = load_vector_element %a, 1u
%11:f32 = mul %x_79, %x_81
%12:f32 = mul %x_84, %x_86
%13:f32 = sub %11, %12
ret %13
}
}
%pointInTriangle_vf2_vf2_vf2_vf2_ = func(%p:ptr<function, vec2<f32>, read_write>, %a_1:ptr<function, vec2<f32>, read_write>, %b_1:ptr<function, vec2<f32>, read_write>, %c:ptr<function, vec2<f32>, read_write>):i32 -> %b3 {
%b3 = block {
%x_90:ptr<function, bool, read_write> = var, false
%x_91:ptr<function, i32, read_write> = var
%pab:ptr<function, f32, read_write> = var
%param:ptr<function, vec2<f32>, read_write> = var
%param_1:ptr<function, vec2<f32>, read_write> = var
%pbc:ptr<function, f32, read_write> = var
%param_2:ptr<function, vec2<f32>, read_write> = var
%param_3:ptr<function, vec2<f32>, read_write> = var
%pca:ptr<function, f32, read_write> = var
%param_4:ptr<function, vec2<f32>, read_write> = var
%param_5:ptr<function, vec2<f32>, read_write> = var
%x_140:ptr<function, bool, read_write> = var
%x_168:ptr<function, bool, read_write> = var
%x_141_phi:ptr<function, bool, read_write> = var
%x_169_phi:ptr<function, bool, read_write> = var
%x_173_phi:ptr<function, i32, read_write> = var
switch 0u [c: (default, %b4)] { # switch_1
%b4 = block { # case
%x_95:f32 = load_vector_element %p, 0u
%x_97:f32 = load_vector_element %a_1, 0u
%x_100:f32 = load_vector_element %p, 1u
%x_102:f32 = load_vector_element %a_1, 1u
%x_106:f32 = load_vector_element %b_1, 0u
%x_107:f32 = load_vector_element %a_1, 0u
%x_110:f32 = load_vector_element %b_1, 1u
%x_111:f32 = load_vector_element %a_1, 1u
%43:f32 = sub %x_95, %x_97
%44:f32 = sub %x_100, %x_102
%45:vec2<f32> = construct %43, %44
store %param, %45
%46:f32 = sub %x_106, %x_107
%47:f32 = sub %x_110, %x_111
%48:vec2<f32> = construct %46, %47
store %param_1, %48
%x_114:f32 = call %cross2d_vf2_vf2_, %param, %param_1
store %pab, %x_114
%x_115:f32 = load_vector_element %p, 0u
%x_116:f32 = load_vector_element %b_1, 0u
%x_118:f32 = load_vector_element %p, 1u
%x_119:f32 = load_vector_element %b_1, 1u
%x_123:f32 = load_vector_element %c, 0u
%x_124:f32 = load_vector_element %b_1, 0u
%x_127:f32 = load_vector_element %c, 1u
%x_128:f32 = load_vector_element %b_1, 1u
%58:f32 = sub %x_115, %x_116
%59:f32 = sub %x_118, %x_119
%60:vec2<f32> = construct %58, %59
store %param_2, %60
%61:f32 = sub %x_123, %x_124
%62:f32 = sub %x_127, %x_128
%63:vec2<f32> = construct %61, %62
store %param_3, %63
%x_131:f32 = call %cross2d_vf2_vf2_, %param_2, %param_3
store %pbc, %x_131
%65:bool = lt %x_114, 0.0f
%66:bool = lt %x_131, 0.0f
%x_134:bool = and %65, %66
store %x_141_phi, %x_134
%68:bool = eq %x_134, false
if %68 [t: %b5] { # if_1
%b5 = block { # true
%69:bool = gte %x_114, 0.0f
%70:bool = gte %x_131, 0.0f
%71:bool = and %69, %70
store %x_140, %71
%72:bool = load %x_140
store %x_141_phi, %72
exit_if # if_1
}
}
%x_141:bool = load %x_141_phi
%74:bool = eq %x_141, false
if %74 [t: %b6] { # if_2
%b6 = block { # true
store %x_90, true
store %x_91, 0i
store %x_173_phi, 0i
exit_switch # switch_1
}
}
%x_145:f32 = load_vector_element %p, 0u
%x_146:f32 = load_vector_element %c, 0u
%x_148:f32 = load_vector_element %p, 1u
%x_149:f32 = load_vector_element %c, 1u
%x_152:f32 = load_vector_element %a_1, 0u
%x_153:f32 = load_vector_element %c, 0u
%x_155:f32 = load_vector_element %a_1, 1u
%x_156:f32 = load_vector_element %c, 1u
%83:f32 = sub %x_145, %x_146
%84:f32 = sub %x_148, %x_149
%85:vec2<f32> = construct %83, %84
store %param_4, %85
%86:f32 = sub %x_152, %x_153
%87:f32 = sub %x_155, %x_156
%88:vec2<f32> = construct %86, %87
store %param_5, %88
%x_159:f32 = call %cross2d_vf2_vf2_, %param_4, %param_5
store %pca, %x_159
%90:bool = lt %x_114, 0.0f
%91:bool = lt %x_159, 0.0f
%x_162:bool = and %90, %91
store %x_169_phi, %x_162
%93:bool = eq %x_162, false
if %93 [t: %b7] { # if_3
%b7 = block { # true
%94:bool = gte %x_114, 0.0f
%95:bool = gte %x_159, 0.0f
%96:bool = and %94, %95
store %x_168, %96
%97:bool = load %x_168
store %x_169_phi, %97
exit_if # if_3
}
}
%x_169:bool = load %x_169_phi
%99:bool = eq %x_169, false
if %99 [t: %b8] { # if_4
%b8 = block { # true
store %x_90, true
store %x_91, 0i
store %x_173_phi, 0i
exit_switch # switch_1
}
}
store %x_90, true
store %x_91, 1i
store %x_173_phi, 1i
exit_switch # switch_1
}
}
%x_173:i32 = load %x_173_phi
ret %x_173
}
}
%main_1 = func():void -> %b9 {
%b9 = block {
%pos:ptr<function, vec2<f32>, read_write> = var
%param_6:ptr<function, vec2<f32>, read_write> = var
%param_7:ptr<function, vec2<f32>, read_write> = var
%param_8:ptr<function, vec2<f32>, read_write> = var
%param_9:ptr<function, vec2<f32>, read_write> = var
%x_67:vec4<f32> = load %gl_FragCoord
%108:ptr<uniform, vec2<f32>, read> = access %x_24, 0u
%x_70:vec2<f32> = load %108
%110:f32 = access %x_67, 0u
%111:f32 = access %x_67, 1u
%112:vec2<f32> = construct %110, %111
%x_71:vec2<f32> = div %112, %x_70
store %pos, %x_71
store %param_6, %x_71
store %param_7, vec2<f32>(0.69999998807907104492f, 0.30000001192092895508f)
store %param_8, vec2<f32>(0.5f, 0.89999997615814208984f)
store %param_9, vec2<f32>(0.10000000149011611938f, 0.40000000596046447754f)
%x_72:i32 = call %pointInTriangle_vf2_vf2_vf2_vf2_, %param_6, %param_7, %param_8, %param_9
%115:bool = eq %x_72, 1i
if %115 [t: %b10, f: %b11] { # if_5
%b10 = block { # true
store %x_GLF_color, vec4<f32>(1.0f, 0.0f, 0.0f, 1.0f)
exit_if # if_5
}
%b11 = block { # false
store %x_GLF_color, vec4<f32>(0.0f, 0.0f, 0.0f, 1.0f)
exit_if # if_5
}
}
ret
}
}
%tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out -> %b12 {
%b12 = block {
store %gl_FragCoord, %gl_FragCoord_param
%118:void = call %main_1
%119:vec4<f32> = load %x_GLF_color
%120:main_out = construct %119
ret %120
}
}
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. *
********************************************************************