-
Notifications
You must be signed in to change notification settings - Fork 19
Allow UAs to enforce a max number of layers per render state #325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Addes a `maxRenderLayers` attribute to XrSession and updates the `updateRenderState` algorithm to throw if a render state is provided with too many layers specified.
|
Fixes #323 |
webxrlayers-1.bs
Outdated
| }; | ||
| </pre> | ||
|
|
||
| The <dfn attribute for="XRSession">maxRenderLayers</dfn> represents the maximum amount of layers that a session can render at a given time. It SHOULD be possible to create more than this number of layers at a given time, but they may not all be set via {{XRSession/updateRenderState()}} at once. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe more like "the maximum number of layers in the layers array in the renderstate that the compositor must handle".
The second sentence should be a NOTE
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I intended the second sentence to be normative to indicate that this statement does NOT indicate that UAs should reject layer creation requests once maxRenderLayers have been created.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Further tweaked your provided language, PTAL
webxrlayers-1.bs
Outdated
| }; | ||
| </pre> | ||
|
|
||
| The <dfn attribute for="XRSession">maxRenderLayers</dfn> represents the maximum number of layers that the compositor can handle, and thus the maximum size of any {{XRRenderStateInit}}'s {{XRRenderStateInit/layers}} array . It SHOULD be possible to create more than this number of layers at a given time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can -> MUST
of any -> of the
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO both of these are fine as is:
can -> MUST (assuming "compositor can handle" -> "compositor MUST handle") doesn't feel appropriate to me, because what the compositor can handle is what sets the value, so saying it MUST handle it reads a bit weird to me? But maybe that's just default spec language?
of any-> of the (assuming "maximum size of any XRRenderStateInit's layer array"->"maximum size of the XRRenderStateInit's layer array") I'm intending there to be a plural on XRRenderStateInit e.g. any XRRenderStateInit you create must have its layers array smaller than this. But again, maybe this is also an abnormal spec convention of language?
Let me know your thoughts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then again, I guess we want to allow compositors to change this number. Swapped to MUST and added more context to the non-normative note.
SHA: 0d61133 Reason: push, by cabanier Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Addes a
maxRenderLayersattribute to XrSession and updates theupdateRenderStatealgorithm to throw if a render state is provided with too many layers specified.Preview | Diff