Allow UAs to enforce a max number of layers per render state#325
Allow UAs to enforce a max number of layers per render state#325
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.
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.
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.
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.
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.
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