Skip to content

Update native limits (fixes #507)#575

Merged
cwfitzgerald merged 6 commits intogfx-rs:trunkfrom
lisyarus:update-native-limits
Apr 11, 2026
Merged

Update native limits (fixes #507)#575
cwfitzgerald merged 6 commits intogfx-rs:trunkfrom
lisyarus:update-native-limits

Conversation

@lisyarus
Copy link
Copy Markdown
Contributor

@lisyarus lisyarus commented Apr 11, 2026

Updated the WGPUNativeLimits struct to reflect the changes in wgpu-core and webgpu-headers. Specifically,

  • Removed maxImmediateSize, as it is now part of WGPULimits
  • Added maxBindingArraySamplerElementsPerShaderStage and maxMultiviewViewCount

I've omitted the limits related to mesh shaders & ray query acceleration structres, as afaik the corresponding API is currently not exposed in wgpu-native anyway.

I've also fixed the immediates and texture_arrays examples. The latter one is what sparked this PR in the first place; it had to be reworked a bit, as texture arrays cannot be present in the same bind group as buffers with dynamic offsets, thus I've split the bound group into two.

I've took the liberty of introducing a WGPU_NATIVE_LIMITS_INIT macro that mimicks the WGPU_LIMITS_INIT macro from webgpu.h.

Checklist

  • cargo clippy reports no issues
  • cargo doc reports no issues
  • cargo deny issues have been fixed or added to deny.toml
  • Human-readable change descriptions added to CHANGELOG.md under the "Unreleased" heading.
    • If the change does not affect the user (or is a process change), preface the change with "Internal:"
    • Add credit to yourself for each change: Added new functionality. @githubname

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.

Amazing thanks for this!

Good thought on adding the init macro!

@cwfitzgerald cwfitzgerald merged commit e44a0c7 into gfx-rs:trunk Apr 11, 2026
34 checks passed
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.

2 participants