Bug 263393
| Summary: | [WGSL] frag_depth on return value does not generate depth(any) attribution | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Mike Wyrzykowski <mwyrzykowski> |
| Component: | WebGPU | Assignee: | 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
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/117221582>
Tadeu Zagallo
Pull request: https://github.com/WebKit/WebKit/pull/19635
EWS
Committed 269950@main (fbd53e5fa81a): <https://commits.webkit.org/269950@main>
Reviewed commits have been landed. Closing PR #19635 and removing active labels.