Skip to content

Don't throw exception when getBindGroupLayout index > maxBindGroups - #3506

Merged
kainino0x merged 1 commit into
gpuweb:mainfrom
kainino0x:getbgl-limit
Oct 6, 2022
Merged

kainino0x merged 1 commit into
gpuweb:mainfrom
kainino0x:getbgl-limit

Conversation

@kainino0x

Copy link
Copy Markdown
Contributor

This can be handled by returning an invalid GPUBindGroupLayout instead, as we do if the index is past the end of the actual BGL list (just below in the device timeline validation steps).

Since getBindGroupLayout returns a new JS wrapper every time, there's no concern about that behavior in this case. I suspect that's why we had an exception to begin with.

This exception dates back to when we added getBindGroupLayout originally, in #543.

This can be handled by returning an invalid GPUBindGroupLayout instead,
as we do if the index is past the end of the actual BGL list (just
below in the device timeline validation steps).

Since getBindGroupLayout returns a new JS wrapper every time, there's no
concern about that behavior in this case. I suspect that's why we had an
exception to begin with.
@kainino0x kainino0x added the tacit resolution queue Editors have agreed and intend to land if no feedback is given label Oct 5, 2022
@kainino0x kainino0x added this to the V1.0 milestone Oct 5, 2022
@kainino0x
kainino0x requested review from Kangz and toji October 5, 2022 00:48
@github-actions

github-actions Bot commented Oct 5, 2022 •

Copy link
Copy Markdown
Contributor

Previews, as seen when this build job started (7708294):
WebGPU webgpu.idl | Explainer | Correspondence Reference
WGSL grammar.js | wgsl.lalr.txt

@toji toji left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kainino0x

Copy link
Copy Markdown
Contributor Author

Tacit resolution period is not over yet, but landing tentatively so I can keep editing with this landed.

@kainino0x
kainino0x merged commit 077e05b into gpuweb:main Oct 6, 2022
@kainino0x
kainino0x deleted the getbgl-limit branch October 6, 2022 20:58
@kainino0x kainino0x removed the tacit resolution queue Editors have agreed and intend to land if no feedback is given label Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants