Skip to content

Initial naga changes for mesh shaders #7930

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

Draft
wants to merge 103 commits into
base: trunk
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
f7e6e18
Initial(untested commit), vulkan and gles only supported
SupaMaggie70Incorporated Jan 17, 2025
4e5772b
Maybe fixed compiles for metal and dx12
SupaMaggie70Incorporated Jan 18, 2025
a5f8909
Merge branch 'gfx-rs:trunk' into mesh-shading/wgpu-hal
SupaMaggie70Incorporated Jan 18, 2025
ab83fa7
Hopefully fixed compiles for other backends and updated to functional…
SupaMaggie70Incorporated Jan 18, 2025
0b2bb72
I don't get git
SupaMaggie70Incorporated Jan 18, 2025
06d3f52
Fixed the clippy warning
SupaMaggie70Incorporated Jan 18, 2025
8b67893
Initial naga changes and outline
SupaMaggie70Incorporated Jan 18, 2025
441e64f
Fixed minor issue
SupaMaggie70Incorporated Jan 18, 2025
1939260
Merge recent changes, most significantly features type overhaul
SupaMaggie70Incorporated Feb 8, 2025
37fd5ac
Merge branch 'mesh-shading/wgpu-hal' into mesh-shading/naga-init
SupaMaggie70Incorporated Feb 8, 2025
5a66eab
Fixed silly documentation mistake
SupaMaggie70Incorporated Feb 9, 2025
81df0dc
Merge branch 'mesh-shading/wgpu-hal' into mesh-shading/naga-init
SupaMaggie70Incorporated Feb 9, 2025
a9d6ae3
Hopefully fixed some issues in CI
SupaMaggie70Incorporated Feb 9, 2025
a6b8019
Automatic changes caused by tests
SupaMaggie70Incorporated Feb 9, 2025
4840189
Fixed issue with multiview feature
SupaMaggie70Incorporated Feb 13, 2025
0743fb0
Merge branch 'mesh-shading/wgpu-hal' into mesh-shading/naga-init
SupaMaggie70Incorporated Feb 13, 2025
6f4f8cf
CI will hate this one - made some changes based on discussion of prop…
SupaMaggie70Incorporated Feb 13, 2025
e7ec2a7
Made CI slightly less angry
SupaMaggie70Incorporated Feb 13, 2025
6c2c9ac
Dummy commit for dummy CI
SupaMaggie70Incorporated Feb 13, 2025
8c07665
Merge branch 'trunk' into mesh-shading/wgpu-hal
SupaMaggie70Incorporated Feb 13, 2025
909736a
Merge branch 'mesh-shading/wgpu-hal' into mesh-shading/naga-init
SupaMaggie70Incorporated Feb 13, 2025
34a3d05
(Tried to) Merge branch 'trunk' into mesh-shading/naga-init
SupaMaggie70Incorporated Jul 7, 2025
88acd65
Tried to undo cargo.lock changes
SupaMaggie70Incorporated Jul 7, 2025
8c6e887
Dusted off this ancient PR
SupaMaggie70Incorporated Jul 7, 2025
53f2891
Updated naga snapshots
SupaMaggie70Incorporated Jul 7, 2025
f71ff9b
A little more work
SupaMaggie70Incorporated Jul 7, 2025
145699c
Worked a little more
SupaMaggie70Incorporated Jul 7, 2025
c6e0450
Now (almost) parses!
SupaMaggie70Incorporated Jul 7, 2025
de03c4a
Updated wgsl file to not specify unsigned integer literals. Will work…
SupaMaggie70Incorporated Jul 9, 2025
b4486c1
Merge branch 'trunk' into mesh-shading/naga-init
SupaMaggie70Incorporated Jul 11, 2025
20c198a
Merge branch 'trunk' into mesh-shading/naga-init
SupaMaggie70Incorporated Jul 11, 2025
7884781
Added more stuff to naga IR and a tiny bit of validation
SupaMaggie70Incorporated Jul 12, 2025
defa58b
Fixed some typos lol
SupaMaggie70Incorporated Jul 12, 2025
d5f1770
Added changelog entry
SupaMaggie70Incorporated Jul 12, 2025
b4ef6ca
Merge branch 'trunk' into mesh-shading/naga-init
SupaMaggie70Incorporated Jul 12, 2025
7e7850e
Added task_payload storage class parsing to wgsl, validation for it, etc
SupaMaggie70Incorporated Jul 12, 2025
9fd01d5
Added output type validation
SupaMaggie70Incorporated Jul 12, 2025
bb95324
Tried to fix u32 casting
SupaMaggie70Incorporated Jul 12, 2025
aff163f
Attempted to fix u32 to i32 automatic conversion issue
SupaMaggie70Incorporated Jul 12, 2025
4612795
Fixed stupid naga validation bug
SupaMaggie70Incorporated Jul 12, 2025
8de0f04
Updated snapshots
SupaMaggie70Incorporated Jul 12, 2025
ac3901f
Tried to clarify mesh validation errors
SupaMaggie70Incorporated Jul 12, 2025
000052a
Made it adjust mesh shader metadata during compaction
SupaMaggie70Incorporated Jul 12, 2025
fe3a832
Added more validation for the output type of entry points
SupaMaggie70Incorporated Jul 12, 2025
62fa627
Made it allow @mesh_task_size declared in a struct for task output
SupaMaggie70Incorporated Jul 12, 2025
3774358
Smartified the task output checking
SupaMaggie70Incorporated Jul 12, 2025
8adf8c6
A little more work for SPIRV writing and added back point index builtin
SupaMaggie70Incorporated Jul 12, 2025
75d42bd
Now it can (almost) compile a task shader!
SupaMaggie70Incorporated Jul 13, 2025
611992d
Task shaders can now be written properly!!!!
SupaMaggie70Incorporated Jul 13, 2025
74e8352
Cleaned up task shader writing
SupaMaggie70Incorporated Jul 13, 2025
7ed6e47
More minor fixes to task shader and made it require SPIR-V 1.4
SupaMaggie70Incorporated Jul 13, 2025
5bb4c3f
Now also passes spirv-val
SupaMaggie70Incorporated Jul 13, 2025
2976b78
Fixed silly typo that CI noticed
SupaMaggie70Incorporated Jul 13, 2025
2174592
Updated snapshots
SupaMaggie70Incorporated Jul 13, 2025
2e6f11c
Attempted to make a small adjustment to SPIR-V writing
SupaMaggie70Incorporated Jul 13, 2025
784dd80
A lot more progress made
SupaMaggie70Incorporated Jul 14, 2025
cef766a
HAHAHAH YEASSS
SupaMaggie70Incorporated Jul 14, 2025
41e462b
Merge branch 'trunk' into mesh-shading/naga-init
SupaMaggie70Incorporated Jul 14, 2025
072391f
Updated snapshots
SupaMaggie70Incorporated Jul 14, 2025
23946cd
Updated mesh shading spec, also to include @per_primitive attribute
SupaMaggie70Incorporated Jul 14, 2025
471300e
Final tweaks to the spec
SupaMaggie70Incorporated Jul 14, 2025
44f71b1
Small tweaks
SupaMaggie70Incorporated Jul 14, 2025
c7a728c
A few more small tweaks
SupaMaggie70Incorporated Jul 14, 2025
a5f30c8
More nitpicky tweaks, next focus is actually addressing the problem i…
SupaMaggie70Incorporated Jul 14, 2025
6df6e11
Pushing broken changes for now because I have to switch dev platforms…
SupaMaggie70Incorporated Jul 14, 2025
cc865bb
Updated to not have 2 arrays of structs (gross)
SupaMaggie70Incorporated Jul 14, 2025
291d56c
Updated snapshots
SupaMaggie70Incorporated Jul 14, 2025
e858583
Tried to hopefully fix stupid issue
SupaMaggie70Incorporated Jul 14, 2025
d0821d7
Updated mesh-shader.toml config
SupaMaggie70Incorporated Jul 14, 2025
04e0144
Update rspirv version
SupaMaggie70Incorporated Jul 14, 2025
1250fee
Updated naga snapshots
SupaMaggie70Incorporated Jul 14, 2025
2f2206c
Merge branch 'update-rspirv-version' into mesh-shading/naga-init
SupaMaggie70Incorporated Jul 14, 2025
c9c7a63
Updated snapshots
SupaMaggie70Incorporated Jul 14, 2025
65c40a4
Reformatted the config toml
SupaMaggie70Incorporated Jul 14, 2025
55435ee
Merge branch 'trunk' into mesh-shading/naga-init
SupaMaggie70Incorporated Jul 14, 2025
cef1606
Implemented coordinate flipping
SupaMaggie70Incorporated Jul 14, 2025
2cbe48e
Merge branch 'trunk' into mesh-shading/naga-init
SupaMaggie70Incorporated Jul 17, 2025
aa045a0
Merge branch 'trunk' into mesh-shading/naga-init
SupaMaggie70Incorporated Jul 19, 2025
a83d664
Merge branch 'trunk' into mesh-shading/naga-init
SupaMaggie70Incorporated Aug 9, 2025
6577197
Updated shader test outputs
SupaMaggie70Incorporated Aug 9, 2025
825a060
Added per primitive stuff
SupaMaggie70Incorporated Aug 9, 2025
0ce1860
Tried to completely overhaul the output variable writing for spirv
SupaMaggie70Incorporated Aug 9, 2025
14b2b84
Committing this nonsense before it all gets destroyed again by my stu…
SupaMaggie70Incorporated Aug 9, 2025
789ba11
A little more progress (I'm paranoid)
SupaMaggie70Incorporated Aug 9, 2025
0eaa7d1
A little more progress (still very broken)
SupaMaggie70Incorporated Aug 9, 2025
66b5397
Updated my todos
SupaMaggie70Incorporated Aug 9, 2025
44340b4
It frickin works now I think
SupaMaggie70Incorporated Aug 9, 2025
4200116
Implemented coordinate flip
SupaMaggie70Incorporated Aug 9, 2025
397d89d
Made the example properly work with ALL naga shaders!!
SupaMaggie70Incorporated Aug 10, 2025
97381d5
Upgraded the copy algorithm to not be complete garbage
SupaMaggie70Incorporated Aug 10, 2025
866b85d
Final tweaks and removing // TODO 's
SupaMaggie70Incorporated Aug 10, 2025
24f9196
Tried to address some comments and also add comments
SupaMaggie70Incorporated Aug 14, 2025
d54f7c6
Addressed another comment
SupaMaggie70Incorporated Aug 14, 2025
c19a5f4
Merge branch 'trunk' into mesh-shading/naga-init
SupaMaggie70Incorporated Aug 14, 2025
68ebb3e
Quick before corruption!
SupaMaggie70Incorporated Aug 14, 2025
9947762
A few more changes
SupaMaggie70Incorporated Aug 14, 2025
e648f94
Tried to fix a stupid accidentally pushed issue
SupaMaggie70Incorporated Aug 14, 2025
d6b9375
Brief little fix for bad paths
SupaMaggie70Incorporated Aug 14, 2025
9ac167f
Removed `const` thing from a functoin that cant be const on older com…
SupaMaggie70Incorporated Aug 14, 2025
587e5e6
Broken shaders now break :party:
SupaMaggie70Incorporated Aug 14, 2025
7ad0f50
re-unbroke broken shaders
SupaMaggie70Incorporated Aug 14, 2025
d186f5a
Fixed compile fail failing
SupaMaggie70Incorporated Aug 15, 2025
b96d7f2
Tried to fix CI failing on
SupaMaggie70Incorporated Aug 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,9 @@ jobs:
set -e

# build for WebGPU
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} --tests --features glsl,spirv,fragile-send-sync-non-atomic-wasm
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} --tests --features glsl,spirv
cargo doc --target ${{ matrix.target }} ${{ matrix.extra-flags }} --no-deps --features glsl,spirv
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} --tests --features glsl,fragile-send-sync-non-atomic-wasm
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} --tests --features glsl
cargo doc --target ${{ matrix.target }} ${{ matrix.extra-flags }} --no-deps --features glsl

# check with only the web feature
cargo clippy --target ${{ matrix.target }} ${{ matrix.extra-flags }} --no-default-features --features=web
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ By @Vecvec in [#7913](https://github.com/gfx-rs/wgpu/pull/7913).
#### Naga

- Naga now requires that no type be larger than 1 GB. This limit may be lowered in the future; feedback on an appropriate value for the limit is welcome. By @andyleiserson in [#7950](https://github.com/gfx-rs/wgpu/pull/7950).
- Added mesh shader support to naga with `WGSL` frontend and `SPIR-V` backend. By @SupaMaggie70Incorporated in [#7930](https://github.com/gfx-rs/wgpu/pull/7930).
- If the shader source contains control characters, Naga now replaces them with U+FFFD ("replacement character") in diagnostic output. By @andyleiserson in [#8049](https://github.com/gfx-rs/wgpu/pull/8049).

#### DX12
Expand Down
8 changes: 7 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions benches/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,13 @@ profiling.workspace = true
rayon.workspace = true
tracy-client = { workspace = true, optional = true }
wgpu.workspace = true
wgpu-test = { workspace = true, features = [
"wgsl-in",
"spv-in",
"glsl-in",
"spv-out",
"msl-out",
"hlsl-out",
"glsl-out",
"wgsl-out",
] }
Loading
Loading