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

Fix HLSL single scalar loads #7104

Merged
merged 5 commits into from
Feb 12, 2025
Merged

Fix HLSL single scalar loads #7104

merged 5 commits into from
Feb 12, 2025

Conversation

Vecvec
Copy link
Contributor

@Vecvec Vecvec commented Feb 11, 2025

Connections
Follow up to #6993

Description
Single scalar loads from storage were previously broken on HLSL (e.g loading 0.0 would give a vec4(0.0) when it should give vec4(0.0, 0.0, 0.0, 1.0)), this fixes that by wrapping them in a function the properly converts them.

Testing
Adds a test that used to fail before this change.

Checklist

  • Run cargo fmt.
  • Run cargo clippy.
  • Run cargo xtask test to run tests.
  • Add change to CHANGELOG.md. See simple instructions inside file.

@Vecvec Vecvec requested a review from a team as a code owner February 11, 2025 00:01
@ErichDonGubler
Copy link
Member

Assigning @teoxoy, who fielded #6993 and did some thinking on this already.

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.

LGTM

@teoxoy teoxoy enabled auto-merge (squash) February 12, 2025 17:55
@teoxoy teoxoy merged commit 5af9e30 into gfx-rs:trunk Feb 12, 2025
33 checks passed
@cwfitzgerald cwfitzgerald deleted the hlsl-scalar-format branch February 12, 2025 18:39
davnotdev pushed a commit to davnotdev/wgpu that referenced this pull request Mar 4, 2025
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