WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
226408
[WebXR] Recommended framebuffer width incorrectly scaled
https://bugs.webkit.org/show_bug.cgi?id=226408
Summary
[WebXR] Recommended framebuffer width incorrectly scaled
Dean Jackson
Reported
2021-05-28 17:34:34 PDT
When WebXRWebGLLayer creates the WebXROpaqueFramebuffer, it asks the session for the recommended framebuffer size. It then multiplies the width by 2 - I assume because there are two eyes. However, the specification [1] says that it is a "best estimate of the WebGL framebuffer resolution large enough to contain all of the session’s XRViews". So it should be the session that makes account for the multiple views, not the framebuffer. Note also: "best estimate". Currently the dimensions of the framebuffer are set once as the WebGLLayer is created. I think it should be checked each frame. For example, the headset might be under load and start providing smaller textures for rendering.
Attachments
Patch
(3.43 KB, patch)
2021-05-28 17:46 PDT
,
Dean Jackson
thorton
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2021-05-28 17:34:45 PDT
<
rdar://problem/78638309
>
Dean Jackson
Comment 2
2021-05-28 17:46:31 PDT
Created
attachment 430080
[details]
Patch
Dean Jackson
Comment 3
2021-05-30 12:42:11 PDT
Committed
r278255
(
238292@main
): <
https://commits.webkit.org/238292@main
>
Imanol Fernandez
Comment 4
2021-05-31 02:22:37 PDT
> > Note also: "best estimate". Currently the dimensions of the framebuffer are > set once as the WebGLLayer is created. I think it should be checked each > frame. For example, the headset might be under load and start providing > smaller textures for rendering.
The spec supports Dynamic viewport scaling. The benefit is that you can change the resolution on a per-frame basis without reallocating the WebGLLayer framebuffer. Right now we return nullop in WebXRView::recommendedViewportScale, so always the full viewport is used. If you have a a heuristic to determine the recommended scale per frame you can implement it already on the cocoa platform. For this to work the underlying SDK should support setting the UV rect when submitting the frame to the headset.
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