Skip to content

Limits binding numbers to 65535 - #2286

Merged
Kangz merged 1 commit into
gpuweb:mainfrom
Kangz:binding-index
Nov 16, 2021
Merged

Kangz merged 1 commit into
gpuweb:mainfrom
Kangz:binding-index

Conversation

@Kangz

@Kangz Kangz commented Nov 10, 2021 •

Copy link
Copy Markdown
Contributor

This is done only at layout creation since it is sufficient to cover:

  • Layout creation
  • Default layouts (they go through validation)
  • Bind groups (since they must match the layout)
  • WGSL since a binding won't be usable without being matched with an
    entry in the layout.

Note that it lets developers write binding numbers in WGSL that are too
big, as long as they are unused.

Fixes #1783


Preview | Diff

This is done only at layout creation since it is sufficient to cover:

 - Layout creation
 - Default layouts (they go through validation)
 - Bind groups (since they must match the layout)
 - WGSL since a binding won't be usable without being matched with an
   entry in the layout.

Note that it lets developers write binding numbers in WGSL that are too
big, as long as they are unused.

Fixes gpuweb#1783
@Kangz
Kangz requested review from kainino0x and kvark November 10, 2021 15:57
@Kangz
Kangz merged commit 2836fd9 into gpuweb:main Nov 16, 2021
@Kangz
Kangz deleted the binding-index branch November 16, 2021 11:31
github-actions Bot added a commit that referenced this pull request Nov 16, 2021
SHA: 2836fd9
Reason: push, by @Kangz

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions Bot added a commit that referenced this pull request Nov 16, 2021
SHA: 2836fd9
Reason: push, by @Kangz

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions Bot added a commit that referenced this pull request Nov 16, 2021
SHA: 2836fd9
Reason: push, by @Kangz

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

Limit the binding number for resources

2 participants