Skip to content

validation: Fix type compatibility for streams vs. vertex inputs #7600

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

Merged
merged 1 commit into from
Apr 25, 2025

Conversation

magcius
Copy link
Collaborator

@magcius magcius commented Apr 23, 2025

The old is_compatible_with handled scalar/scalar, scalar/vector, vector/vector, but was missing vector/scalar.

Since is_compatible_with is only used by vertex shader inputs, and vertex shader inputs can't be matrices (only scalars and vectors), we can actually simplify this by removing the other match and just only checking the kind.

Fixes #7568

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.

@magcius magcius requested a review from a team as a code owner April 23, 2025 03:45
The old is_compatible_with handled scalar/scalar, scalar/vector, vector/vector, but was missing vector/scalar.

Since is_compatible_with is only used by vertex shader inputs, and vertex shader inputs can't be matrices (only scalars and vectors), we can actually simplify this by removing the other match and just only checking the kind.

Fixes gfx-rs#7568
@teoxoy teoxoy self-assigned this Apr 23, 2025
Copy link
Member

@teoxoy teoxoy left a comment

Choose a reason for hiding this comment

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

Makes sense, thanks!

@teoxoy teoxoy merged commit 38b6663 into gfx-rs:trunk Apr 25, 2025
37 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.

wgpu needs vertex buffers and shaders to match
2 participants