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

Make TypeInner::scalar_width return the width in bytes #5278

Closed
atlv24 opened this issue Feb 21, 2024 · 1 comment · Fixed by #5532
Closed

Make TypeInner::scalar_width return the width in bytes #5278

atlv24 opened this issue Feb 21, 2024 · 1 comment · Fixed by #5532
Labels
area: api Issues related to API surface naga Shader Translator type: enhancement New feature or request

Comments

@atlv24
Copy link
Collaborator

atlv24 commented Feb 21, 2024

TypeInner::scalar_width currently returns the scalar width in bits. This is counter-intuitive, when the width is stored in bytes and assumed to be bytes everywhere else. If the current functionality is to be maintained, it should be renamed to scalar_width_bits and documented.

https://github.com/gfx-rs/wgpu/blob/trunk/naga/src/proc/mod.rs#L267

@teoxoy teoxoy added type: enhancement New feature or request area: api Issues related to API surface naga Shader Translator labels Feb 27, 2024
@teoxoy
Copy link
Member

teoxoy commented Feb 27, 2024

I think this makes sense, a PR would be welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: api Issues related to API surface naga Shader Translator type: enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants