| Summary: | [WebGPU][WGSL] sampling a texture_external should expand to two samples | ||
|---|---|---|---|
| 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 | ||
Pull request: https://github.com/WebKit/WebKit/pull/13916 Committed 264141@main (6c82c6b0b152): <https://commits.webkit.org/264141@main> Reviewed commits have been landed. Closing PR #13916 and removing active labels. |
In WGSL if we have: texture_external t; vec4<f32> result = textureSampleBaseClampToEdge(t, sampler, normalizedCoordinates); or: texture_external t; vec4<f32> result = textureLoad(t, pixelCoordinates, levelOfDetail); we should expand this to: auto coords = t_UVRemapMatrix * normalizedCoordinates; auto y = t_FirstPlane.sample(sampler, coords).r; auto cbcr = t_SecondPlane.sample(sampler, coords).rg; auto ycbcr = float3(y, cbcr); float4 result = float4(t_ColorSpaceConversionMatrix * float4(ycbcr, 1), 1); or: auto coords = t_UVRemapMatrix * pixelCoordinates; auto y = t_FirstPlane.read(coords, levelOfDetail).r; auto cbcr = t_SecondPlane.read(sampler, levelOfDetail).rg; auto ycbcr = float3(y, cbcr); float4 result = float4(t_ColorSpaceConversionMatrix * float4(ycbcr, 1), 1);