Bug 288962

Summary: [WebGPU] External texture reads do not take into account size differences between different planes
Product: WebKit Reporter: llyzs.vic
Component: WebGPUAssignee: Mike Wyrzykowski <mwyrzykowski>
Status: RESOLVED FIXED    
Severity: Normal CC: mwyrzykowski, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari Technology Preview   
Hardware: Mac (Apple Silicon)   
OS: macOS 15   
Attachments:
Description Flags
Test page
none
fixed none

llyzs.vic
Reported 2025-03-03 03:07:34 PST
Created attachment 474395 [details] Test page When loading from a VideoFrame generated by H264 decoder in WebGPU compute shader, the output has distorted green color. But sampling from fragment shader is fine. Attached is a html test that can reproduce the issue. After pressing the "Test" button in the test page, four frames will be decoded and drawn on screen.
Attachments
Test page (128.40 KB, text/html)
2025-03-03 03:07 PST, llyzs.vic
no flags
fixed (1013.97 KB, image/png)
2025-03-03 09:49 PST, Mike Wyrzykowski
no flags
Radar WebKit Bug Importer
Comment 1 2025-03-03 07:42:36 PST
Mike Wyrzykowski
Comment 2 2025-03-03 09:44:30 PST
UV mapping on textureRead is incorrect for external textures in WebKit.
Mike Wyrzykowski
Comment 3 2025-03-03 09:49:19 PST
Mike Wyrzykowski
Comment 4 2025-03-03 09:49:36 PST
That looks better
Mike Wyrzykowski
Comment 5 2025-03-03 09:49:50 PST
Thank you for the bug report
Mike Wyrzykowski
Comment 6 2025-03-03 10:04:56 PST
fyi, using textureSampleBaseClampToEdge https://www.w3.org/TR/WGSL/#textureSampleBaseClampToEdge would workaround in WebKit. But I will make a PR to fix momentarily
Mike Wyrzykowski
Comment 7 2025-03-03 10:52:41 PST
EWS
Comment 8 2025-03-03 16:27:38 PST
Committed 291536@main (89aef49ed9b1): <https://commits.webkit.org/291536@main> Reviewed commits have been landed. Closing PR #41782 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.