godotengine / godotengine/godot

SubViewports do not function in Chrome on the Mac when the Metal ANGLE backend is used (now default)

Open
#95,206 6 comments 0 reactions 0 assignees View on GitHub
bug confirmed platform:macos platform:web topic:platforms topic:rendering topic:thirdparty
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

- Reproducible in 4.3rc2
- Tested on a MacBook Air M1 and MacBook Pro 14 (M1 Pro)

### System information

MacOs 14.5, Chrome 127.0.6533.89

### Issue description

When a `SubViewport` under a `SubViewportContainer` is visible in a scene, on a Mac that is using the "new" Metal ANGLE backend by default, Chrome's GL context immediately crashes and logs a bunch of errors: https://gist.github.com/tetious/48c29263af9202fac48049c04f1b160c

This only occurs when the ANGLE graphics backend is set to **Metal** or left to the default (at least for my two test Macs) in chrome://flags. If the backend is set to OpenGL, it works normally.

### Steps to reproduce

Run the attached MRP on a Mac with Chrome by using the "Remote Debug" -> Run in browser feature. It should fail immediately.

- Make the `SubViewportContainer` invisible -> does not fail (but viewport doesn't show)
- Set the ANGLE graphics backend to OpenGL in chrome://flags with visible viewport -> works as expected

### Minimal reproduction project (MRP)

[subviewtest.zip](https://github.com/user-attachments/files/16514081/subviewtest.zip)
Repro URL: https://orcling.com/subview-godot/

Contributor guide

Open the contributing guide

Research direction

Start with the attached subviewtest.zip or the repro URL and run it through Remote Debug → Run in browser on macOS Chrome with the ANGLE backend set to Metal. Compare the failing visible SubViewportContainer case with the invisible and OpenGL cases. Done means the visible SubViewport works without a Chrome GL context crash under Metal while the existing OpenGL behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.