blob: 2e2e81ff3d826c3198a67aee9fefe81e935ac4a0 [file] [log] [blame]
SKIP: FAILED
<dawn>/src/tint/lang/msl/writer/printer/printer.cc:355 internal compiler error: Scene = struct @align(16) {
vEyePosition:vec4<f32> @offset(0)
}
Material = struct @align(16) {
vDiffuseColor:vec4<f32> @offset(0)
vAmbientColor:vec3<f32> @offset(16)
placeholder:f32 @offset(28)
vEmissiveColor:vec3<f32> @offset(32)
placeholder2:f32 @offset(44)
}
Mesh = struct @align(4) {
visibility:f32 @offset(0)
}
main_out = struct @align(16) {
glFragColor_1:vec4<f32> @offset(0), @location(0)
}
%b1 = block { # root
%fClipDistance3:ptr<private, f32, read_write> = var
%fClipDistance4:ptr<private, f32, read_write> = var
%x_29:ptr<uniform, Scene, read> = var @binding_point(0, 0)
%x_49:ptr<uniform, Material, read> = var @binding_point(0, 1)
%x_137:ptr<uniform, Mesh, read> = var @binding_point(0, 2)
%glFragColor:ptr<private, vec4<f32>, read_write> = var
}
%main_1 = func():void -> %b2 {
%b2 = block {
%viewDirectionW:ptr<function, vec3<f32>, read_write> = var
%baseColor:ptr<function, vec4<f32>, read_write> = var
%diffuseColor:ptr<function, vec3<f32>, read_write> = var
%alpha:ptr<function, f32, read_write> = var
%normalW:ptr<function, vec3<f32>, read_write> = var
%uvOffset:ptr<function, vec2<f32>, read_write> = var
%baseAmbientColor:ptr<function, vec3<f32>, read_write> = var
%glossiness:ptr<function, f32, read_write> = var
%diffuseBase:ptr<function, vec3<f32>, read_write> = var
%shadow:ptr<function, f32, read_write> = var
%refractionColor:ptr<function, vec4<f32>, read_write> = var
%reflectionColor:ptr<function, vec4<f32>, read_write> = var
%emissiveColor:ptr<function, vec3<f32>, read_write> = var
%finalDiffuse:ptr<function, vec3<f32>, read_write> = var
%finalSpecular:ptr<function, vec3<f32>, read_write> = var
%color:ptr<function, vec4<f32>, read_write> = var
%x_9:f32 = load %fClipDistance3
%25:bool = gt %x_9, 0.0f
if %25 [t: %b3] { # if_1
%b3 = block { # true
discard
exit_if # if_1
}
}
%x_17:f32 = load %fClipDistance4
%27:bool = gt %x_17, 0.0f
if %27 [t: %b4] { # if_2
%b4 = block { # true
discard
exit_if # if_2
}
}
%28:ptr<uniform, vec4<f32>, read> = access %x_29, 0u
%x_34:vec4<f32> = load %28
%x_38:vec3<f32> = let vec3<f32>(0.0f)
%31:f32 = access %x_34, 0u
%32:f32 = access %x_34, 1u
%33:f32 = access %x_34, 2u
%34:vec3<f32> = construct %31, %32, %33
%35:vec3<f32> = sub %34, %x_38
%36:vec3<f32> = normalize %35
store %viewDirectionW, %36
store %baseColor, vec4<f32>(1.0f)
%37:ptr<uniform, vec4<f32>, read> = access %x_49, 0u
%x_52:vec4<f32> = load %37
%39:f32 = access %x_52, 0u
%40:f32 = access %x_52, 1u
%41:f32 = access %x_52, 2u
%42:vec3<f32> = construct %39, %40, %41
store %diffuseColor, %42
%43:ptr<uniform, vec4<f32>, read> = access %x_49, 0u
%x_60:f32 = load_vector_element %43, 3u
store %alpha, %x_60
%x_62:vec3<f32> = let vec3<f32>(0.0f)
%x_64:vec3<f32> = let vec3<f32>(0.0f)
store %uvOffset, vec2<f32>(0.0f)
%x_74:vec4<f32> = let vec4<f32>(0.0f)
%x_76:vec4<f32> = load %baseColor
%49:f32 = access %x_76, 0u
%50:f32 = access %x_76, 1u
%51:f32 = access %x_76, 2u
%52:vec3<f32> = construct %49, %50, %51
%53:f32 = access %x_74, 0u
%54:f32 = access %x_74, 1u
%55:f32 = access %x_74, 2u
%56:vec3<f32> = construct %53, %54, %55
%x_78:vec3<f32> = mul %52, %56
%x_79:vec4<f32> = load %baseColor
%59:f32 = access %x_78, 0u
%60:f32 = access %x_78, 1u
%61:f32 = access %x_78, 2u
%62:f32 = access %x_79, 3u
%63:vec4<f32> = construct %59, %60, %61, %62
store %baseColor, %63
store %baseAmbientColor, vec3<f32>(1.0f)
store %glossiness, 0.0f
store %diffuseBase, vec3<f32>(0.0f)
store %shadow, 1.0f
store %refractionColor, vec4<f32>(0.0f, 0.0f, 0.0f, 1.0f)
store %reflectionColor, vec4<f32>(0.0f, 0.0f, 0.0f, 1.0f)
%64:ptr<uniform, vec3<f32>, read> = access %x_49, 3u
%x_94:vec3<f32> = load %64
store %emissiveColor, %x_94
%x_96:vec3<f32> = load %diffuseBase
%x_97:vec3<f32> = load %diffuseColor
%x_99:vec3<f32> = load %emissiveColor
%69:ptr<uniform, vec3<f32>, read> = access %x_49, 1u
%x_103:vec3<f32> = load %69
%x_108:vec4<f32> = load %baseColor
%72:vec3<f32> = mul %x_96, %x_97
%73:vec3<f32> = add %72, %x_99
%74:vec3<f32> = add %73, %x_103
%75:vec3<f32> = clamp %74, vec3<f32>(0.0f), vec3<f32>(1.0f)
%76:f32 = access %x_108, 0u
%77:f32 = access %x_108, 1u
%78:f32 = access %x_108, 2u
%79:vec3<f32> = construct %76, %77, %78
%80:vec3<f32> = mul %75, %79
store %finalDiffuse, %80
store %finalSpecular, vec3<f32>(0.0f)
%x_113:vec3<f32> = load %finalDiffuse
%x_114:vec3<f32> = load %baseAmbientColor
%x_116:vec3<f32> = load %finalSpecular
%x_118:vec4<f32> = load %reflectionColor
%x_121:vec4<f32> = load %refractionColor
%86:vec3<f32> = mul %x_113, %x_114
%87:vec3<f32> = add %86, %x_116
%88:f32 = access %x_118, 0u
%89:f32 = access %x_118, 1u
%90:f32 = access %x_118, 2u
%91:vec3<f32> = construct %88, %89, %90
%92:vec3<f32> = add %87, %91
%93:f32 = access %x_121, 0u
%94:f32 = access %x_121, 1u
%95:f32 = access %x_121, 2u
%96:vec3<f32> = construct %93, %94, %95
%x_123:vec3<f32> = add %92, %96
%x_124:f32 = load %alpha
%99:f32 = access %x_123, 0u
%100:f32 = access %x_123, 1u
%101:f32 = access %x_123, 2u
%102:vec4<f32> = construct %99, %100, %101, %x_124
store %color, %102
%x_129:vec4<f32> = load %color
%104:f32 = access %x_129, 0u
%105:f32 = access %x_129, 1u
%106:f32 = access %x_129, 2u
%107:vec3<f32> = construct %104, %105, %106
%x_132:vec3<f32> = max %107, vec3<f32>(0.0f)
%x_133:vec4<f32> = load %color
%110:f32 = access %x_132, 0u
%111:f32 = access %x_132, 1u
%112:f32 = access %x_132, 2u
%113:f32 = access %x_133, 3u
%114:vec4<f32> = construct %110, %111, %112, %113
store %color, %114
%115:ptr<uniform, f32, read> = access %x_137, 0u
%x_140:f32 = load %115
%x_142:f32 = load_vector_element %color, 3u
%118:f32 = mul %x_142, %x_140
store_vector_element %color, 3u, %118
%x_147:vec4<f32> = load %color
store %glFragColor, %x_147
ret
}
}
%tint_symbol = @fragment func(%fClipDistance3_param:f32 [@location(2)], %fClipDistance4_param:f32 [@location(3)]):main_out -> %b5 {
%b5 = block {
store %fClipDistance3, %fClipDistance3_param
store %fClipDistance4, %fClipDistance4_param
%123:void = call %main_1
%124:vec4<f32> = load %glFragColor
%125:main_out = construct %124
ret %125
}
}
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. *
********************************************************************