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

Add 1-component ({s,u}{int,norm}{8,16}, float16) and unorm8x4-bgra vertex formats #6632

Open
wants to merge 5 commits into
base: trunk
Choose a base branch
from

Conversation

nolanderc
Copy link
Contributor

@nolanderc nolanderc commented Nov 29, 2024

Connections
Closes #6614

Description

When adding the translations from wgpu::VertexFormat to the various backends, I did my best to choose the appropriate formats, but I'm not too familiar with DX12 or Metal, so please, take some extra time to verify those.

Testing
N/A

Checklist

  • Run cargo fmt.
  • Run taplo format.
  • 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.

@nolanderc nolanderc requested a review from a team as a code owner November 29, 2024 09:21
Copy link
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.

As I have a big change coming in that conflicts with this, I'm going to rebase so each commit can land separately.

Copy link
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.

Ah wait, hold on, metal is a lot more complicated unfortunately, as we don't use normal vertex formats, we manually transform to using vertex pulling.

First step is that I would add tests for all these new formats in https://github.com/gfx-rs/wgpu/blob/e23146aa3e8f5de0820cec108a9c1aa967454a3b/tests/tests/vertex_formats/mod.rs. This can probably join one of the other sets of tests.

Second step is to add support for these formats in naga -

fn write_unpacking_function(
. If you need mac testing help or any support, please let us know on the wgpu dev matrix in the readme.

I would appreciate the webgpu update as a separate PR, as this has a bit of work left still.

@ErichDonGubler ErichDonGubler self-assigned this Dec 2, 2024
@nolanderc nolanderc force-pushed the vertex-format-1-component branch 2 times, most recently from 4f77000 to faac144 Compare December 2, 2024 19:59
@nolanderc nolanderc requested a review from a team as a code owner December 2, 2024 20:23
@nolanderc nolanderc force-pushed the vertex-format-1-component branch 4 times, most recently from 47b610c to 43c432b Compare December 2, 2024 21:16
@nolanderc
Copy link
Contributor Author

This should now be good to go @cwfitzgerald @ErichDonGubler

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.

1-component ({s,u}{int,norm}{8,16}, float16) and unorm8x4-bgra vertex formats are missing
3 participants