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

docs: mention primitive restart in the description of strip_index_format #5350

Merged
merged 2 commits into from
Mar 9, 2024
Merged

Conversation

cpsdqs
Copy link
Contributor

@cpsdqs cpsdqs commented Mar 5, 2024

Connections
Link to the issues addressed by this PR, or dependent PRs in other repositories
N/A

Description
Describe what problem this is solving, and how it's solved.
Currently, the wgpu documentation is rather unclear on why PrimitiveState::strip_index_format exists and what its purpose is, unless you’ve read the webgpu spec and know that it enables primitive restart. Since primitive restart is also never mentioned anywhere else in the documentation, I thought it would be nice to clarify this doc comment to include it here.

(Though, after a cursory look at the implementation, strip_index_format only seems to be actually required on Vulkan and DX12, as Metal has it always enabled? I’m not sure if that would be worth mentioning as an implementation quirk…)

Testing
Explain how this change is tested.
this PR contains no code changes, but all tests still pass!

Checklist

  • Run cargo fmt.
  • Run cargo clippy. If applicable, add:
    • --target wasm32-unknown-unknown
    • --target wasm32-unknown-emscripten
  • Run cargo xtask test to run tests.
  • Add change to CHANGELOG.md. See simple instructions inside file.

@cpsdqs cpsdqs requested a review from a team as a code owner March 5, 2024 23:28
Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

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

Thank you! Good to have that in here 👍

Though, after a cursory look at the implementation, strip_index_format only seems to be actually required on Vulkan and DX12, as Metal has it always enabled? I’m not sure if that would be worth mentioning as an implementation quirk…

That's an implementation detail, no point in mentioning it when it's actually important to the behavior. So good as is

@Wumpf Wumpf enabled auto-merge (squash) March 6, 2024 09:14
Copy link
Member

@Wumpf Wumpf left a comment

Choose a reason for hiding this comment

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

oops, forgot to actually approve the PR which is why it didn't get auto-merged. Apologies!

@Wumpf Wumpf merged commit 5e12273 into gfx-rs:trunk Mar 9, 2024
27 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