Skip to content

WebGPU XR on Apple Vision Pro: scissor workaround in place pending WebKit fix #8755

Description

@mvaligursky

On Apple Vision Pro (visionOS Safari), any passEncoder.setScissorRect(...) call issued during a WebGPU XR render pass causes the rendered content to be clipped into a sub-rectangle of the eye instead of mapping across the full FOV — even when the scissor value equals the WebGPU pass-start default (= full attachment).

Per the WebGPU spec, an explicit scissor at the attachment extent should be a no-op equivalent to not calling it at all. On visionOS it isn't: the explicit call appears to be interpreted as a positional hint by the compositor.

setViewport is not affected.

Workaround

WebgpuGraphicsDevice#setViewport and #setScissor early-return without issuing the underlying passEncoder.setViewport / setScissorRect calls when the backbuffer is bound to an XR projection-layer texture (this.xrColorTexture is set). The render pass then keeps the default viewport / scissor (= full attachment), which renders correctly on AVP and remains spec-correct on every other WebXR-capable platform.

Upstream bug

https://bugs.webkit.org/show_bug.cgi?id=315274

We should remove the workaround once WebKit ships a fix.

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions