blob: 4e9bd9c37026fe7aaad3fd26f2cc944d0971f11e [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_17:ptr<uniform, buf0, read> = var @binding_point(0, 0)
%x_GLF_color:ptr<private, vec4<f32>, read_write> = var
}
%pointInTriangle_vf2_vf2_vf2_vf2_ = func(%p:ptr<function, vec2<f32>, read_write>, %a:ptr<function, vec2<f32>, read_write>, %b:ptr<function, vec2<f32>, read_write>, %c:ptr<function, vec2<f32>, read_write>):i32 -> %b2 {
%b2 = block {
%x_66:ptr<function, f32, read_write> = var
%x_67:ptr<function, f32, read_write> = var
%x_68:ptr<function, f32, read_write> = var
%param:ptr<function, vec2<f32>, read_write> = var
%param_1:ptr<function, vec2<f32>, read_write> = var
%param_2:ptr<function, vec2<f32>, read_write> = var
%param_3:ptr<function, vec2<f32>, read_write> = var
%param_4:ptr<function, vec2<f32>, read_write> = var
%param_5:ptr<function, vec2<f32>, read_write> = var
%x_135:ptr<function, bool, read_write> = var
%x_172:ptr<function, bool, read_write> = var
%x_136_phi:ptr<function, bool, read_write> = var
%x_173_phi:ptr<function, bool, read_write> = var
%x_70:f32 = load_vector_element %p, 0u
%x_72:f32 = load_vector_element %a, 0u
%x_75:f32 = load_vector_element %p, 1u
%x_77:f32 = load_vector_element %a, 1u
%x_81:f32 = load_vector_element %b, 0u
%x_82:f32 = load_vector_element %a, 0u
%x_85:f32 = load_vector_element %b, 1u
%x_86:f32 = load_vector_element %a, 1u
%30:f32 = sub %x_70, %x_72
%31:f32 = sub %x_75, %x_77
%32:vec2<f32> = construct %30, %31
store %param, %32
%33:f32 = sub %x_81, %x_82
%34:f32 = sub %x_85, %x_86
%35:vec2<f32> = construct %33, %34
store %param_1, %35
%x_90:f32 = load_vector_element %param, 0u
%x_92:f32 = load_vector_element %param_1, 1u
%x_95:f32 = load_vector_element %param_1, 0u
%x_97:f32 = load_vector_element %param, 1u
%40:f32 = mul %x_90, %x_92
%41:f32 = mul %x_95, %x_97
%x_99:f32 = sub %40, %41
store %x_68, %x_99
%x_100:f32 = load_vector_element %p, 0u
%x_101:f32 = load_vector_element %b, 0u
%x_103:f32 = load_vector_element %p, 1u
%x_104:f32 = load_vector_element %b, 1u
%x_108:f32 = load_vector_element %c, 0u
%x_109:f32 = load_vector_element %b, 0u
%x_112:f32 = load_vector_element %c, 1u
%x_113:f32 = load_vector_element %b, 1u
%51:f32 = sub %x_100, %x_101
%52:f32 = sub %x_103, %x_104
%53:vec2<f32> = construct %51, %52
store %param_2, %53
%54:f32 = sub %x_108, %x_109
%55:f32 = sub %x_112, %x_113
%56:vec2<f32> = construct %54, %55
store %param_3, %56
%x_117:f32 = load_vector_element %param_2, 0u
%x_119:f32 = load_vector_element %param_3, 1u
%x_122:f32 = load_vector_element %param_3, 0u
%x_124:f32 = load_vector_element %param_2, 1u
%61:f32 = mul %x_117, %x_119
%62:f32 = mul %x_122, %x_124
%x_126:f32 = sub %61, %62
store %x_67, %x_126
%x_127:bool = lt %x_99, 0.0f
%65:bool = lt %x_126, 0.0f
%x_129:bool = and %x_127, %65
store %x_136_phi, %x_129
%67:bool = eq %x_129, false
if %67 [t: %b3] { # if_1
%b3 = block { # true
%68:bool = gte %x_99, 0.0f
%69:bool = gte %x_126, 0.0f
%70:bool = and %68, %69
store %x_135, %70
%71:bool = load %x_135
store %x_136_phi, %71
exit_if # if_1
}
}
%x_136:bool = load %x_136_phi
%73:bool = eq %x_136, false
if %73 [t: %b4] { # if_2
%b4 = block { # true
ret 0i
}
}
%x_140:f32 = load_vector_element %p, 0u
%x_141:f32 = load_vector_element %c, 0u
%x_143:f32 = load_vector_element %p, 1u
%x_144:f32 = load_vector_element %c, 1u
%x_147:f32 = load_vector_element %a, 0u
%x_148:f32 = load_vector_element %c, 0u
%x_150:f32 = load_vector_element %a, 1u
%x_151:f32 = load_vector_element %c, 1u
%82:f32 = sub %x_140, %x_141
%83:f32 = sub %x_143, %x_144
%84:vec2<f32> = construct %82, %83
store %param_4, %84
%85:f32 = sub %x_147, %x_148
%86:f32 = sub %x_150, %x_151
%87:vec2<f32> = construct %85, %86
store %param_5, %87
%x_155:f32 = load_vector_element %param_4, 0u
%x_157:f32 = load_vector_element %param_5, 1u
%x_160:f32 = load_vector_element %param_5, 0u
%x_162:f32 = load_vector_element %param_4, 1u
%92:f32 = mul %x_155, %x_157
%93:f32 = mul %x_160, %x_162
%x_164:f32 = sub %92, %93
store %x_66, %x_164
%95:bool = lt %x_164, 0.0f
%x_166:bool = and %x_127, %95
store %x_173_phi, %x_166
%97:bool = eq %x_166, false
if %97 [t: %b5] { # if_3
%b5 = block { # true
%98:bool = gte %x_99, 0.0f
%99:bool = gte %x_164, 0.0f
%100:bool = and %98, %99
store %x_172, %100
%101:bool = load %x_172
store %x_173_phi, %101
exit_if # if_3
}
}
%x_173:bool = load %x_173_phi
%103:bool = eq %x_173, false
if %103 [t: %b6] { # if_4
%b6 = block { # true
ret 0i
}
}
ret 1i
}
}
%main_1 = func():void -> %b7 {
%b7 = block {
%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_55:vec4<f32> = load %gl_FragCoord
%110:ptr<uniform, vec2<f32>, read> = access %x_17, 0u
%x_58:vec2<f32> = load %110
%112:f32 = access %x_55, 0u
%113:f32 = access %x_55, 1u
%114:vec2<f32> = construct %112, %113
%115:vec2<f32> = div %114, %x_58
store %param_6, %115
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_60:i32 = call %pointInTriangle_vf2_vf2_vf2_vf2_, %param_6, %param_7, %param_8, %param_9
%117:bool = eq %x_60, 1i
if %117 [t: %b8, f: %b9] { # if_5
%b8 = block { # true
store %x_GLF_color, vec4<f32>(1.0f, 0.0f, 0.0f, 1.0f)
exit_if # if_5
}
%b9 = 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 -> %b10 {
%b10 = block {
store %gl_FragCoord, %gl_FragCoord_param
%120:void = call %main_1
%121:vec4<f32> = load %x_GLF_color
%122:main_out = construct %121
ret %122
}
}
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. *
********************************************************************