| SKIP: FAILED |
| |
| ../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: buf1 = struct @align(8) { |
| resolution:vec2<f32> @offset(0) |
| } |
| |
| buf0 = struct @align(8) { |
| injectionSwitch:vec2<f32> @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_9:ptr<uniform, buf1, read> = var @binding_point(0, 1) |
| %x_13:ptr<uniform, buf0, read> = var @binding_point(0, 0) |
| %x_GLF_color:ptr<private, vec4<f32>, read_write> = var |
| } |
| |
| %checkSwap_f1_f1_ = func(%a:ptr<function, f32, read_write>, %b:ptr<function, f32, read_write>):bool { |
| $B2: { |
| %x_147:ptr<function, bool, read_write> = var |
| %x_158:ptr<function, f32, read_write> = var |
| %x_159:ptr<function, f32, read_write> = var |
| %x_179:ptr<function, f32, read_write> = var |
| %x_178:ptr<function, f32, read_write> = var |
| %x_185:ptr<function, f32, read_write> = var |
| %x_184:ptr<function, f32, read_write> = var |
| %x_160_phi:ptr<function, f32, read_write> = var |
| %x_180_phi:ptr<function, f32, read_write> = var |
| %x_186_phi:ptr<function, f32, read_write> = var |
| %18:f32 = load_vector_element %gl_FragCoord, 1u |
| %x_149:f32 = let %18 |
| %20:ptr<uniform, vec2<f32>, read> = access %x_9, 0u |
| %21:f32 = load_vector_element %20, 1u |
| %x_151:f32 = let %21 |
| %23:f32 = div %x_151, 2.0f |
| %24:bool = lt %x_149, %23 |
| %x_153:bool = let %24 |
| if %x_153 [t: $B3, f: $B4] { # if_1 |
| $B3: { # true |
| %26:f32 = load %a |
| store %x_158, %26 |
| %27:f32 = load %x_158 |
| store %x_160_phi, %27 |
| exit_if # if_1 |
| } |
| $B4: { # false |
| store %x_159, 0.0f |
| %28:f32 = load %x_159 |
| store %x_160_phi, %28 |
| exit_if # if_1 |
| } |
| } |
| %x_166:ptr<function, f32, read_write> = var |
| %x_167:ptr<function, f32, read_write> = var |
| %x_168_phi:ptr<function, f32, read_write> = var |
| %32:f32 = load %x_160_phi |
| %x_160:f32 = let %32 |
| %guard155:ptr<function, bool, read_write> = var, true |
| if false [t: $B5, f: $B6] { # if_2 |
| $B5: { # true |
| exit_if # if_2 |
| } |
| $B6: { # false |
| %35:bool = load %guard155 |
| if %35 [t: $B7] { # if_3 |
| $B7: { # true |
| if %x_153 [t: $B8, f: $B9] { # if_4 |
| $B8: { # true |
| %36:f32 = load %b |
| store %x_166, %36 |
| %37:f32 = load %x_166 |
| store %x_168_phi, %37 |
| exit_if # if_4 |
| } |
| $B9: { # false |
| store %x_167, 0.0f |
| %38:f32 = load %x_167 |
| store %x_168_phi, %38 |
| exit_if # if_4 |
| } |
| } |
| %39:f32 = load %x_168_phi |
| %x_168:f32 = let %39 |
| %41:bool = gt %x_160, %x_168 |
| %x_169:bool = let %41 |
| if %x_153 [t: $B10] { # if_5 |
| $B10: { # true |
| store %x_147, %x_169 |
| exit_if # if_5 |
| } |
| } |
| if true [t: $B11, f: $B12] { # if_6 |
| $B11: { # true |
| exit_if # if_6 |
| } |
| $B12: { # false |
| store %guard155, false |
| exit_if # if_6 |
| } |
| } |
| %43:bool = load %guard155 |
| if %43 [t: $B13] { # if_7 |
| $B13: { # true |
| store %guard155, false |
| exit_if # if_7 |
| } |
| } |
| exit_if # if_3 |
| } |
| } |
| exit_if # if_2 |
| } |
| } |
| if %x_153 [t: $B14, f: $B15] { # if_8 |
| $B14: { # true |
| store %x_179, 0.0f |
| %44:f32 = load %x_179 |
| store %x_180_phi, %44 |
| exit_if # if_8 |
| } |
| $B15: { # false |
| %45:f32 = load %a |
| store %x_178, %45 |
| %46:f32 = load %x_178 |
| store %x_180_phi, %46 |
| exit_if # if_8 |
| } |
| } |
| %47:f32 = load %x_180_phi |
| %x_180:f32 = let %47 |
| if %x_153 [t: $B16, f: $B17] { # if_9 |
| $B16: { # true |
| store %x_185, 0.0f |
| %49:f32 = load %x_185 |
| store %x_186_phi, %49 |
| exit_if # if_9 |
| } |
| $B17: { # false |
| %50:f32 = load %b |
| store %x_184, %50 |
| %51:f32 = load %x_184 |
| store %x_186_phi, %51 |
| exit_if # if_9 |
| } |
| } |
| %52:f32 = load %x_186_phi |
| %x_186:f32 = let %52 |
| if %x_153 [t: $B18, f: $B19] { # if_10 |
| $B18: { # true |
| exit_if # if_10 |
| } |
| $B19: { # false |
| %54:bool = lt %x_180, %x_186 |
| store %x_147, %54 |
| exit_if # if_10 |
| } |
| } |
| %55:bool = load %x_147 |
| %x_191:bool = let %55 |
| ret %x_191 |
| } |
| } |
| %main_1 = func():void { |
| $B20: { |
| %i:ptr<function, i32, read_write> = var |
| %data:ptr<function, array<f32, 10>, read_write> = var |
| %i_1:ptr<function, i32, read_write> = var |
| %j:ptr<function, i32, read_write> = var |
| %doSwap:ptr<function, bool, read_write> = var |
| %param:ptr<function, f32, read_write> = var |
| %param_1:ptr<function, f32, read_write> = var |
| %temp:ptr<function, f32, read_write> = var |
| store %i, 0i |
| loop [b: $B21, c: $B22] { # loop_1 |
| $B21: { # body |
| %66:i32 = load %i |
| %x_59:i32 = let %66 |
| %68:bool = lt %x_59, 10i |
| if %68 [t: $B23, f: $B24] { # if_11 |
| $B23: { # true |
| exit_if # if_11 |
| } |
| $B24: { # false |
| exit_loop # loop_1 |
| } |
| } |
| %69:i32 = load %i |
| %x_62:i32 = let %69 |
| %71:i32 = load %i |
| %x_63:i32 = let %71 |
| %73:ptr<uniform, vec2<f32>, read> = access %x_13, 0u |
| %74:f32 = load_vector_element %73, 1u |
| %x_67:f32 = let %74 |
| %76:ptr<function, f32, read_write> = access %data, %x_62 |
| %77:i32 = sub 10i, %x_63 |
| %78:f32 = convert %77 |
| %79:f32 = mul %78, %x_67 |
| store %76, %79 |
| continue # -> $B22 |
| } |
| $B22: { # continuing |
| %80:i32 = load %i |
| %x_70:i32 = let %80 |
| %82:i32 = add %x_70, 1i |
| store %i, %82 |
| next_iteration # -> $B21 |
| } |
| } |
| store %i_1, 0i |
| loop [b: $B25, c: $B26] { # loop_2 |
| $B25: { # body |
| %83:i32 = load %i_1 |
| %x_76:i32 = let %83 |
| %85:bool = lt %x_76, 9i |
| if %85 [t: $B27, f: $B28] { # if_12 |
| $B27: { # true |
| exit_if # if_12 |
| } |
| $B28: { # false |
| exit_loop # loop_2 |
| } |
| } |
| store %j, 0i |
| loop [b: $B29, c: $B30] { # loop_3 |
| $B29: { # body |
| %86:i32 = load %j |
| %x_83:i32 = let %86 |
| %88:bool = lt %x_83, 10i |
| if %88 [t: $B31, f: $B32] { # if_13 |
| $B31: { # true |
| exit_if # if_13 |
| } |
| $B32: { # false |
| exit_loop # loop_3 |
| } |
| } |
| %89:i32 = load %j |
| %x_86:i32 = let %89 |
| %91:i32 = load %i_1 |
| %x_87:i32 = let %91 |
| %93:i32 = add %x_87, 1i |
| %94:bool = lt %x_86, %93 |
| if %94 [t: $B33] { # if_14 |
| $B33: { # true |
| continue # -> $B30 |
| } |
| } |
| %95:i32 = load %i_1 |
| %x_92:i32 = let %95 |
| %97:i32 = load %j |
| %x_93:i32 = let %97 |
| %99:ptr<function, f32, read_write> = access %data, %x_92 |
| %100:f32 = load %99 |
| %x_95:f32 = let %100 |
| store %param, %x_95 |
| %102:ptr<function, f32, read_write> = access %data, %x_93 |
| %103:f32 = load %102 |
| %x_97:f32 = let %103 |
| store %param_1, %x_97 |
| %105:bool = call %checkSwap_f1_f1_, %param, %param_1 |
| %x_98:bool = let %105 |
| store %doSwap, %x_98 |
| %107:bool = load %doSwap |
| %x_99:bool = let %107 |
| if %x_99 [t: $B34] { # if_15 |
| $B34: { # true |
| %109:i32 = load %i_1 |
| %x_102:i32 = let %109 |
| %111:ptr<function, f32, read_write> = access %data, %x_102 |
| %112:f32 = load %111 |
| %x_104:f32 = let %112 |
| store %temp, %x_104 |
| %114:i32 = load %i_1 |
| %x_105:i32 = let %114 |
| %116:i32 = load %j |
| %x_106:i32 = let %116 |
| %118:ptr<function, f32, read_write> = access %data, %x_106 |
| %119:f32 = load %118 |
| %x_108:f32 = let %119 |
| %121:ptr<function, f32, read_write> = access %data, %x_105 |
| store %121, %x_108 |
| %122:i32 = load %j |
| %x_110:i32 = let %122 |
| %124:f32 = load %temp |
| %x_111:f32 = let %124 |
| %126:ptr<function, f32, read_write> = access %data, %x_110 |
| store %126, %x_111 |
| exit_if # if_15 |
| } |
| } |
| continue # -> $B30 |
| } |
| $B30: { # continuing |
| %127:i32 = load %j |
| %x_113:i32 = let %127 |
| %129:i32 = add %x_113, 1i |
| store %j, %129 |
| next_iteration # -> $B29 |
| } |
| } |
| continue # -> $B26 |
| } |
| $B26: { # continuing |
| %130:i32 = load %i_1 |
| %x_115:i32 = let %130 |
| %132:i32 = add %x_115, 1i |
| store %i_1, %132 |
| next_iteration # -> $B25 |
| } |
| } |
| %133:f32 = load_vector_element %gl_FragCoord, 0u |
| %x_118:f32 = let %133 |
| %135:ptr<uniform, vec2<f32>, read> = access %x_9, 0u |
| %136:f32 = load_vector_element %135, 0u |
| %x_120:f32 = let %136 |
| %138:f32 = div %x_120, 2.0f |
| %139:bool = lt %x_118, %138 |
| if %139 [t: $B35, f: $B36] { # if_16 |
| $B35: { # true |
| %140:ptr<function, f32, read_write> = access %data, 0i |
| %141:f32 = load %140 |
| %x_127:f32 = let %141 |
| %143:ptr<function, f32, read_write> = access %data, 5i |
| %144:f32 = load %143 |
| %x_130:f32 = let %144 |
| %146:ptr<function, f32, read_write> = access %data, 9i |
| %147:f32 = load %146 |
| %x_133:f32 = let %147 |
| %149:f32 = div %x_127, 10.0f |
| %150:f32 = div %x_130, 10.0f |
| %151:f32 = div %x_133, 10.0f |
| %152:vec4<f32> = construct %149, %150, %151, 1.0f |
| store %x_GLF_color, %152 |
| exit_if # if_16 |
| } |
| $B36: { # false |
| %153:ptr<function, f32, read_write> = access %data, 5i |
| %154:f32 = load %153 |
| %x_137:f32 = let %154 |
| %156:ptr<function, f32, read_write> = access %data, 9i |
| %157:f32 = load %156 |
| %x_140:f32 = let %157 |
| %159:ptr<function, f32, read_write> = access %data, 0i |
| %160:f32 = load %159 |
| %x_143:f32 = let %160 |
| %162:f32 = div %x_137, 10.0f |
| %163:f32 = div %x_140, 10.0f |
| %164:f32 = div %x_143, 10.0f |
| %165:vec4<f32> = construct %162, %163, %164, 1.0f |
| store %x_GLF_color, %165 |
| exit_if # if_16 |
| } |
| } |
| ret |
| } |
| } |
| %tint_symbol = @fragment func(%gl_FragCoord_param:vec4<f32> [@position]):main_out { |
| $B37: { |
| store %gl_FragCoord, %gl_FragCoord_param |
| %168:void = call %main_1 |
| %169:vec4<f32> = load %x_GLF_color |
| %170:main_out = construct %169 |
| ret %170 |
| } |
| } |
| |
| 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. * |
| ******************************************************************** |