Skip to content

wgpu-hal: Expose vulkan::PhysicalDeviceFeatures #7682

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

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

afishhh
Copy link

@afishhh afishhh commented May 10, 2025

Connections
Fixes #7681

Description
PhysicalDeviceFeatures is currently accessible through vulkan::Adapter::physical_device_features which is a public function. This structure seems required to be able to tell what Vulkan device features wgpu needs so it would be nice if it was accessible externally as otherwise it's impossible to create a wgpu Device from Vulkan objects safely.

Re-exporting the type is the workaround I used just to get what I was doing to succeed, alternatively the whole adapter module could be made public or glob re-exported, this would also expose PhysicalDeviceProperties which appears to have the same issue.

Testing
Call Adapter::physical_device_features, notice that you can't name this type due to it being private.

Squash or Rebase?
Any

Checklist

  • Run cargo fmt.
  • Run taplo format.
  • Run cargo clippy --tests. If applicable, add:
    • --target wasm32-unknown-unknown
  • Run cargo xtask test to run tests.
  • If this contains user-facing changes, add a CHANGELOG.md entry.

@afishhh afishhh requested a review from a team as a code owner May 10, 2025 15:15
@afishhh
Copy link
Author

afishhh commented May 10, 2025

Ah clippy complains because the documentation links to private items now, not sure what to do about this since the function it links to does indeed seem pretty internal.

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.

wgpu-hal: vulkan::adapter::PhysicalDeviceFeatures is private
1 participant