Skip to content
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

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

Merged
merged 3 commits into from
Oct 6, 2022

Conversation

nical
Copy link
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

@nical nical force-pushed the binding-index-640 branch from 7379235 to 7602ee4 Compare August 12, 2022 14:21
Copy link
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 nical force-pushed the binding-index-640 branch from 7602ee4 to 8ec834b Compare August 30, 2022 10:16
@nical
Copy link
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
Member

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

@nical
Copy link
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
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
37 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