Skip to content

Shrink the default max binding index to 640 and expose it in Limits.#2957

Merged
jimblandy merged 3 commits intogfx-rs:masterfrom
nical:binding-index-640
Oct 6, 2022
Merged

Shrink the default max binding index to 640 and expose it in Limits.#2957
jimblandy merged 3 commits intogfx-rs:masterfrom
nical:binding-index-640

Conversation

@nical
Copy link
Copy Markdown
Contributor

@nical nical commented Aug 12, 2022

Following the corresponding changes happening in WebGPU.

Checklist

  • Run cargo clippy.
  • Add change to CHANGELOG.md. See simple instructions inside file.
  • web-sys updated

Connections

Description

The max binding index is reduced to 640 to avoid issues with wgpu's vulkan backend, for which binding indices map directly to the indices in vkCreateDescriptorSetLayout.
640 is the new default limit advertised by the spec, but technically non-vukan backends rename all of the bindings so they aren't affected by the same issue and can continue using 65535 (the previous limit) if requested.

This PR also exposes the limit in Limits.

We don't have to merge this right away since the change has not made it into the WebGPU spec yet.

Testing

None

Copy link
Copy Markdown
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

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

G2G once spec is clear and web_sys is ready.

@nical
Copy link
Copy Markdown
Contributor Author

nical commented Aug 30, 2022

Updated the PR to align with the terminology that made it into the spec. I will get to the web-sys update soon.

@jimblandy
Copy link
Copy Markdown
Member

@nical @cwfitzgerald I think web-sys 0.3.60 should include Nical's update.

@nical
Copy link
Copy Markdown
Contributor Author

nical commented Sep 19, 2022

This needs #2954

Looks like web-sys makes non-breaking version bumps when there are breaking changes in unstable APIs so sticking to specific versions should avoid unnecessary breakage.
Following the corresponding changes happening in WebGPU.
@nical
Copy link
Copy Markdown
Contributor Author

nical commented Sep 21, 2022

This should be good to go.

@jimblandy jimblandy merged commit f68a095 into gfx-rs:master Oct 6, 2022
@nical nical deleted the binding-index-640 branch October 7, 2022 07:55
@teoxoy teoxoy mentioned this pull request Dec 21, 2022
36 tasks
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