blob: c421b97c44808544dfc648b0136d3077edd76f73 [file] [log] [blame]
SKIP: FAILED
../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Camera = struct @align(16) {
projection:mat4x4<f32> @offset(0)
inverseProjection:mat4x4<f32> @offset(64)
view:mat4x4<f32> @offset(128)
position:vec3<f32> @offset(192)
time:f32 @offset(204)
outputSize:vec2<f32> @offset(208)
zNear:f32 @offset(216)
zFar:f32 @offset(220)
}
VertexInput = struct @align(16) {
position:vec4<f32> @offset(0), @location(0)
normal:vec3<f32> @offset(16), @location(1)
tangent:vec4<f32> @offset(32), @location(2)
texcoord:vec2<f32> @offset(48), @location(3)
joints:vec4<u32> @offset(64), @location(6)
weights:vec4<f32> @offset(80), @location(7)
instance0:vec4<f32> @offset(96), @location(8)
instance1:vec4<f32> @offset(112), @location(9)
instance2:vec4<f32> @offset(128), @location(10)
instance3:vec4<f32> @offset(144), @location(11)
instanceColor:vec4<f32> @offset(160), @location(12)
}
Joints = struct @align(16) {
matrices:array<mat4x4<f32>> @offset(0)
}
VertexOutput = struct @align(16) {
position:vec4<f32> @offset(0), @builtin(position)
worldPos:vec3<f32> @offset(16), @location(0)
view:vec3<f32> @offset(32), @location(1)
texcoord:vec2<f32> @offset(48), @location(2)
texcoord2:vec2<f32> @offset(56), @location(3)
color:vec4<f32> @offset(64), @location(4)
instanceColor:vec4<f32> @offset(80), @location(5)
normal:vec3<f32> @offset(96), @location(6)
tangent:vec3<f32> @offset(112), @location(7)
bitangent:vec3<f32> @offset(128), @location(8)
}
$B1: { # root
%camera:ptr<uniform, Camera, read> = var @binding_point(0, 0)
%joint:ptr<storage, Joints, read> = var @binding_point(0, 1)
%inverseBind:ptr<storage, Joints, read> = var @binding_point(0, 2)
}
%getInstanceMatrix = func(%input:VertexInput):mat4x4<f32> {
$B2: {
%6:vec4<f32> = access %input, 6u
%7:vec4<f32> = access %input, 7u
%8:vec4<f32> = access %input, 8u
%9:vec4<f32> = access %input, 9u
%10:mat4x4<f32> = construct %6, %7, %8, %9
ret %10
}
}
%getSkinMatrix = func(%input_1:VertexInput):mat4x4<f32> { # %input_1: 'input'
$B3: {
%13:u32 = access %input_1, 4u, 0u
%14:ptr<storage, mat4x4<f32>, read> = access %joint, 0u, %13
%15:mat4x4<f32> = load %14
%16:u32 = access %input_1, 4u, 0u
%17:ptr<storage, mat4x4<f32>, read> = access %inverseBind, 0u, %16
%18:mat4x4<f32> = load %17
%19:mat4x4<f32> = mul %15, %18
%joint0:mat4x4<f32> = let %19
%21:u32 = access %input_1, 4u, 1u
%22:ptr<storage, mat4x4<f32>, read> = access %joint, 0u, %21
%23:mat4x4<f32> = load %22
%24:u32 = access %input_1, 4u, 1u
%25:ptr<storage, mat4x4<f32>, read> = access %inverseBind, 0u, %24
%26:mat4x4<f32> = load %25
%27:mat4x4<f32> = mul %23, %26
%joint1:mat4x4<f32> = let %27
%29:u32 = access %input_1, 4u, 2u
%30:ptr<storage, mat4x4<f32>, read> = access %joint, 0u, %29
%31:mat4x4<f32> = load %30
%32:u32 = access %input_1, 4u, 2u
%33:ptr<storage, mat4x4<f32>, read> = access %inverseBind, 0u, %32
%34:mat4x4<f32> = load %33
%35:mat4x4<f32> = mul %31, %34
%joint2:mat4x4<f32> = let %35
%37:u32 = access %input_1, 4u, 3u
%38:ptr<storage, mat4x4<f32>, read> = access %joint, 0u, %37
%39:mat4x4<f32> = load %38
%40:u32 = access %input_1, 4u, 3u
%41:ptr<storage, mat4x4<f32>, read> = access %inverseBind, 0u, %40
%42:mat4x4<f32> = load %41
%43:mat4x4<f32> = mul %39, %42
%joint3:mat4x4<f32> = let %43
%45:f32 = access %input_1, 5u, 0u
%46:mat4x4<f32> = mul %joint0, %45
%47:f32 = access %input_1, 5u, 1u
%48:mat4x4<f32> = mul %joint1, %47
%49:mat4x4<f32> = add %46, %48
%50:f32 = access %input_1, 5u, 2u
%51:mat4x4<f32> = mul %joint2, %50
%52:mat4x4<f32> = add %49, %51
%53:f32 = access %input_1, 5u, 3u
%54:mat4x4<f32> = mul %joint3, %53
%55:mat4x4<f32> = add %52, %54
%skinMatrix:mat4x4<f32> = let %55
ret %skinMatrix
}
}
%vertexMain = @vertex func(%input_2:VertexInput):VertexOutput { # %input_2: 'input'
$B4: {
%output:ptr<function, VertexOutput, read_write> = var
%60:mat4x4<f32> = call %getSkinMatrix, %input_2
%modelMatrix:mat4x4<f32> = let %60
%62:ptr<function, vec3<f32>, read_write> = access %output, 7u
%63:vec3<f32> = access %input_2, 1u
%64:vec4<f32> = construct %63, 0.0f
%65:vec4<f32> = mul %modelMatrix, %64
%66:vec3<f32> = swizzle %65, xyz
%67:vec3<f32> = normalize %66
store %62, %67
%68:ptr<function, vec3<f32>, read_write> = access %output, 8u
%69:vec4<f32> = access %input_2, 2u
%70:vec3<f32> = swizzle %69, xyz
%71:vec4<f32> = construct %70, 0.0f
%72:vec4<f32> = mul %modelMatrix, %71
%73:vec3<f32> = swizzle %72, xyz
%74:vec3<f32> = normalize %73
store %68, %74
%75:ptr<function, vec3<f32>, read_write> = access %output, 9u
%76:ptr<function, vec3<f32>, read_write> = access %output, 7u
%77:vec3<f32> = load %76
%78:ptr<function, vec3<f32>, read_write> = access %output, 8u
%79:vec3<f32> = load %78
%80:vec3<f32> = cross %77, %79
%81:f32 = access %input_2, 2u, 3u
%82:vec3<f32> = mul %80, %81
store %75, %82
%83:ptr<function, vec4<f32>, read_write> = access %output, 5u
store %83, vec4<f32>(1.0f)
%84:ptr<function, vec2<f32>, read_write> = access %output, 3u
%85:vec2<f32> = access %input_2, 3u
store %84, %85
%86:ptr<function, vec4<f32>, read_write> = access %output, 6u
%87:vec4<f32> = access %input_2, 10u
store %86, %87
%88:vec4<f32> = access %input_2, 0u
%89:vec4<f32> = mul %modelMatrix, %88
%modelPos:vec4<f32> = let %89
%91:ptr<function, vec3<f32>, read_write> = access %output, 1u
%92:vec3<f32> = swizzle %modelPos, xyz
store %91, %92
%93:ptr<function, vec3<f32>, read_write> = access %output, 2u
%94:ptr<uniform, vec3<f32>, read> = access %camera, 3u
%95:vec3<f32> = load %94
%96:vec3<f32> = swizzle %modelPos, xyz
%97:vec3<f32> = sub %95, %96
store %93, %97
%98:ptr<function, vec4<f32>, read_write> = access %output, 0u
%99:ptr<uniform, mat4x4<f32>, read> = access %camera, 0u
%100:mat4x4<f32> = load %99
%101:ptr<uniform, mat4x4<f32>, read> = access %camera, 2u
%102:mat4x4<f32> = load %101
%103:mat4x4<f32> = mul %100, %102
%104:vec4<f32> = mul %103, %modelPos
store %98, %104
%105:VertexOutput = load %output
ret %105
}
}
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. *
********************************************************************