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 shader I64 and U64 support #5154

Merged
merged 52 commits into from
Mar 12, 2024
Merged

Add shader I64 and U64 support #5154

merged 52 commits into from
Mar 12, 2024

Conversation

atlv24
Copy link
Contributor

@atlv24 atlv24 commented Jan 27, 2024

Connections
Part of an incoming series of PRs needed by #5123
Others in this series: #5155
Addresses #4424
Ultimately for bevy meshlets pipeline bevyengine/bevy#10164

Description
Shaders currently do not support 64 bit integer types. Add support for these gated by a feature flag when the capability is present.

Testing
A snapshot test called i64.wgsl has been added to test parsing, type casting, and other basic operations.

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.

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.

Howdy! wgpu test fairy here: could you add execution tests for this in wgpu. We need at least one test, but there could be other things:

  • struct layout should be tested in struct_layout.rs

wgpu-types/src/lib.rs Outdated Show resolved Hide resolved
naga/src/front/spv/mod.rs Show resolved Hide resolved
wgpu-core/src/device/resource.rs Show resolved Hide resolved
@atlv24 atlv24 mentioned this pull request Feb 27, 2024
CHANGELOG.md Outdated Show resolved Hide resolved
naga/src/valid/expression.rs Outdated Show resolved Hide resolved
naga/src/back/spv/block.rs Outdated Show resolved Hide resolved
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
Copy link
Member

teoxoy commented Mar 11, 2024

This needs a rebase or another merge of trunk into it.

@teoxoy teoxoy merged commit 4e6f873 into gfx-rs:trunk Mar 12, 2024
27 checks passed
@atlv24 atlv24 mentioned this pull request Mar 13, 2024
6 tasks
@atlv24 atlv24 mentioned this pull request Apr 15, 2024
6 tasks
@atlv24 atlv24 mentioned this pull request Apr 25, 2024
6 tasks
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.

4 participants