WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
315274
WebGPU+WebXR on visionOS: setScissorRect unusable on XR projection layer
https://bugs.webkit.org/show_bug.cgi?id=315274
Summary
WebGPU+WebXR on visionOS: setScissorRect unusable on XR projection layer
Martin
Reported
2026-05-21 05:00:25 PDT
### Environment - WebXR (immersive-vr) + WebGPU via XRGPUBinding ### Bug Creating a projection layer yields: - colorTexture (attachment) extent: e.g. 1888×1792 - subImage.viewport: e.g. 4338×3478 (larger than the attachment) setViewport works fine with either size — including the oversized view extent. setScissorRect cannot be used at all: - setScissorRect(0, 0, 1888, 1792) // attachment size → renders only into top-left ~1/3 of the eye ❌ - setScissorRect(0, 0, 4338, 3478) // view size → WebGPU validation error (scissor must fit attachment) ❌ - no setScissorRect call // default → renders full eye ✅ Per WebGPU spec, scissor starts at the full attachment, so the attachment-sized call should be a no-op equivalent to omitting it. On visionOS the explicit call appears to be interpreted as a positional hint for the compositor's mapping of the layer texture to the eye display. ### Impact WebGPU engines that call setScissorRect as part of standard pass setup (PlayCanvas in this case) render into a sub-rectangle of the eye on AVP. Engines/samples that happen not to call it (Toji's vr-barebones, webgpu-metaballs) render correctly. Current workaround: suppress setScissorRect entirely on the XR path. ### Repro WebXR-Samples vr-barebones.html with one added setScissorRect call before the draw reproduces it.
https://github.com/immersive-web/webxr-samples
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2026-05-21 16:39:06 PDT
<
rdar://problem/177664498
>
Mike Wyrzykowski
Comment 2
2026-05-24 13:47:57 PDT
setScissorRect(0, 0, 1888, 1792) // attachment size is correct based on the WebGPU specification as x, y, width, height are in pixels - I will fix this up
Mike Wyrzykowski
Comment 3
2026-05-25 12:17:24 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/65631
EWS
Comment 4
2026-05-27 15:19:11 PDT
Committed
314005@main
(eda478cddb5d): <
https://commits.webkit.org/314005@main
> Reviewed commits have been landed. Closing PR #65631 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug