blob: 132aa683c98050fe22ded74ac3ed99e6b460d64b [file] [log] [blame]
SKIP: FAILED
../../src/tint/lang/msl/writer/printer/printer.cc:500 internal compiler error: Scene = struct @align(16) {
lightViewProjMatrix:mat4x4<f32> @offset(0)
cameraViewProjMatrix:mat4x4<f32> @offset(64)
lightPos:vec3<f32> @offset(128)
}
FragmentInput = struct @align(16) {
shadowPos:vec3<f32> @offset(0), @location(0)
fragPos:vec3<f32> @offset(16), @location(1)
fragNorm:vec3<f32> @offset(32), @location(2)
}
$B1: { # root
%scene:ptr<uniform, Scene, read> = var @binding_point(0, 0)
%shadowMap:ptr<handle, texture_depth_2d, read> = var @binding_point(0, 1)
%shadowSampler:ptr<handle, sampler_comparison, read> = var @binding_point(0, 2)
}
%tint_symbol = @fragment func(%input:FragmentInput):vec4<f32> [@location(0)] {
$B2: {
%visibility:ptr<function, f32, read_write> = var, 0.0f
%oneOverShadowDepthTextureSize:f32 = let 0.0009765625f
loop [i: $B3, b: $B4, c: $B5] { # loop_1
$B3: { # initializer
%y:ptr<function, i32, read_write> = var, -1i
next_iteration # -> $B4
}
$B4: { # body
%9:i32 = load %y
%10:bool = lte %9, 1i
if %10 [t: $B6, f: $B7] { # if_1
$B6: { # true
exit_if # if_1
}
$B7: { # false
exit_loop # loop_1
}
}
loop [i: $B8, b: $B9, c: $B10] { # loop_2
$B8: { # initializer
%x:ptr<function, i32, read_write> = var, -1i
next_iteration # -> $B9
}
$B9: { # body
%12:i32 = load %x
%13:bool = lte %12, 1i
if %13 [t: $B11, f: $B12] { # if_2
$B11: { # true
exit_if # if_2
}
$B12: { # false
exit_loop # loop_2
}
}
%14:i32 = load %x
%15:f32 = convert %14
%16:f32 = mul %15, %oneOverShadowDepthTextureSize
%17:f32 = let %16
%18:i32 = load %y
%19:f32 = convert %18
%20:f32 = mul %19, %oneOverShadowDepthTextureSize
%21:vec2<f32> = construct %17, %20
%offset:vec2<f32> = let %21
%23:f32 = load %visibility
%24:f32 = let %23
%25:texture_depth_2d = load %shadowMap
%26:sampler_comparison = load %shadowSampler
%27:vec3<f32> = access %input, 0u
%28:vec2<f32> = swizzle %27, xy
%29:vec2<f32> = add %28, %offset
%30:f32 = access %input, 0u, 2u
%31:f32 = sub %30, 0.00700000021606683731f
%32:f32 = textureSampleCompare %25, %26, %29, %31
%33:f32 = add %24, %32
store %visibility, %33
continue # -> $B10
}
$B10: { # continuing
%34:i32 = load %x
%35:i32 = add %34, 1i
store %x, %35
next_iteration # -> $B9
}
}
continue # -> $B5
}
$B5: { # continuing
%36:i32 = load %y
%37:i32 = add %36, 1i
store %y, %37
next_iteration # -> $B4
}
}
%38:f32 = load %visibility
%39:f32 = div %38, 9.0f
store %visibility, %39
%40:ptr<uniform, vec3<f32>, read> = access %scene, 2u
%41:vec3<f32> = load %40
%42:vec3<f32> = access %input, 1u
%43:vec3<f32> = sub %41, %42
%44:vec3<f32> = normalize %43
%45:vec3<f32> = access %input, 2u
%46:f32 = dot %44, %45
%47:f32 = max %46, 0.0f
%lambertFactor:f32 = let %47
%49:f32 = load %visibility
%50:f32 = mul %49, %lambertFactor
%51:f32 = add 0.20000000298023223877f, %50
%52:f32 = min %51, 1.0f
%lightingFactor:f32 = let %52
%54:vec3<f32> = mul %lightingFactor, vec3<f32>(0.89999997615814208984f)
%55:vec4<f32> = construct %54, 1.0f
ret %55
}
}
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. *
********************************************************************