Bug 263393

Summary: [WGSL] frag_depth on return value does not generate depth(any) attribution
Product: WebKit Reporter: Mike Wyrzykowski <mwyrzykowski>
Component: WebGPUAssignee: Tadeu Zagallo <tzagallo>
Status: RESOLVED FIXED    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Mike Wyrzykowski
Reported 2023-10-19 13:04:14 PDT
Given the following shader: @group(0) @binding(0) var inputTexture: texture_2d<f32>; @fragment fn main(@builtin(position) fragcoord : vec4<f32>) -> @builtin(frag_depth) f32 { var depthValue : vec4<f32> = textureLoad(inputTexture, vec2<i32>(fragcoord.xy), 0); return depthValue.x; } @builtin(frag_depth) appears to be ignored when the metal code is generated: [[fragment]] float function0(vec<float, 4> parameter0 [[position]], constant __ArgumentBufferT_0& __ArgumentBuffer_0 [[buffer(0)]]) { texture2d<float, access::sample> global0 = __ArgumentBuffer_0.global0; vec<float, 4> local0 = global0.read(uint2(vec<int, 2>(parameter0.xy)), 0); return local0.x; }
Attachments
Radar WebKit Bug Importer
Comment 1 2023-10-19 13:04:37 PDT
Tadeu Zagallo
Comment 2 2023-10-27 06:05:20 PDT
EWS
Comment 3 2023-10-30 09:42:20 PDT
Committed 269950@main (fbd53e5fa81a): <https://commits.webkit.org/269950@main> Reviewed commits have been landed. Closing PR #19635 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.