Inner Daemons
a05c70cef7
WGSL parsing for mesh shaders ( #8370 )
...
Co-authored-by: Jim Blandy <jimb@red-bean.com>
Co-authored-by: Erich Gubler <erichdongubler@gmail.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Co-authored-by: SupaMaggie70Incorporated <85136135+SupaMaggie70Incorporated@users.noreply.github.com>
2025-11-12 21:06:20 -05:00
Inner Daemons
bf9f7524ec
Add mesh shading info to naga IR ( #8104 )
...
Co-authored-by: Jim Blandy <jimb@red-bean.com>
Co-authored-by: SupaMaggie70Incorporated <85136135+SupaMaggie70Incorporated@users.noreply.github.com>
2025-10-29 14:49:51 -04:00
Jamie Nicol
55a2c3095d
[naga] Support textureSampleBaseClampToEdge() for texture2d
...
Adds a new flag to the IR indicating when image sample coordinates are
to be clamped. Adds wgsl-in support for parsing and lowering to
IR. Validation ensures this flag is only used when sampling a 2D
non-arrayed sampled texture, without offset, gather, or depth
comparison. This matches the WGSL requirements, with the exception of
supporting `texture_external` textures, which will follow in a later
patch.
SPIRV, HLSL, and Metal backends are supported so far, with GLSL left
for a follow up. (In GLSL the texture will simply be sampled without
the coordinates being clamped.)
It may seem unfortunate to have to handle this separately for each
backend, and indeed it would have been possible to implement this simply
in the WGSL frontend. However, future patches will add support for using
textureSampleBaseClampToEdge() with external textures, which will
actually have to be handled by each backend. This patch is laying the
groundwork for that.
2025-06-17 14:27:18 -07:00
Phena Ildanach
1e031e7a02
[naga spv-in] Add support for Memory Barriers
2025-06-16 10:22:46 +02:00
Dmitry Zamkov
9c023e5e29
Implement subgroup quad ops ( #7683 )
...
* Rudimentary impl of quad ops, impl quad ops for spirv
* Impl quad swap for hlsl, msl and wgsl, finish spv front
* Cargo clippy & cargo fmt, impl valid for quad ops
* Enable quad feature
* Add missing feature to glsl
* Simplifying code by making `SubgroupQuadSwap` an instance of `SubgroupGather`
* Add `GroupNonUniformQuad` spv capability to Vulkan
* Adding GPU tests for quad operations
* Validate that broadcast operations use const invocation ids
* Added changelog entry
---------
Co-authored-by: valaphee <32491319+valaphee@users.noreply.github.com>
2025-05-26 09:32:01 +02:00
Andy Leiserson
09178f2400
[naga] Track globals used directly by a named expression ( #7540 )
2025-04-15 15:01:19 -04:00
Samson
424fde1622
[naga] Support local const in ImageSample.offset ( #7213 )
...
* [naga] Support local const in ImageSample.offset
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Update test expect
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Update test
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Update test expect
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
* Remove docs about ImageSample.offset refering to global expr
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
---------
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2025-03-07 19:56:08 +01:00
Vecvec
5b3266db23
Support getting hit vertex positions ( #7183 )
2025-03-04 20:06:44 +01:00
Zachary Harrold
e4cc5cb9ad
Use core and alloc instead of std in naga ( #7256 )
...
* Use `core` and `alloc` instead of `std` in `naga`
* Update CHANGELOG.md
* `taplo fmt`
* Fix documentation links to refer to `hashbrown::HashMap`
2025-03-03 16:44:53 -05:00
Connor Fitzgerald
d8833d0798
Use Update After Bind Descriptors for Bind Groups With Binding Arrays ( #6815 )
...
* Use Update After Bind Descriptors for Bind Groups With Binding Arrays
Update After Bind
x
* Comments
* Fix URL
2025-02-15 12:02:27 -05:00
Dzmitry Malyshau
189c97c88a
Implement ray query candidate intersection generation and confirmation ( #7047 )
2025-02-12 16:23:29 +01:00
atlv
18471d8e78
Image atomics support ( #6706 )
...
* Image atomics support
* Address feedback
* fix merge
* Fixes
* Add a couple tests
* Update wgpu-types/src/lib.rs
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
* feedback
* feedback
* glsl
* glsl fix
* fix glsl
* fix fix
* fix fix fic
* fix?
* fix
---------
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
2025-01-13 15:37:12 +00:00
atlv
05c9f43fa8
Fix atomic storage global use acces ( #6600 )
2024-11-25 12:06:12 +01:00
Erich Gubler
e59f00399e
fix(wgsl-in): include user and unknown rules in diagnostic(…) tracking
2024-11-18 17:10:07 -05:00
Erich Gubler
92ca5a3850
feat(wgsl-in): parse diagnostic attrs. on fns
2024-11-15 07:44:14 -05:00
Erich Gubler
efc15ba03b
chore: revert removal of DISABLE_UNIFORMITY_REQ_FOR_FRAGMENT_STAGE ( #6534 )
2024-11-13 07:03:16 -05:00
Erich Gubler
ea75a8ced4
feat(wgsl-in): filter unif. analysis errors with derivative_uniformity
...
- Remove `DISABLE_UNIFORMITY_REQ_FOR_FRAGMENT_STAGE`.
- Add `CHANGELOG` entry.
- Add coverage to `naga`'s `valid::analyzer::uniform_control_flow` test.
2024-11-12 08:49:02 -05:00
Erich Gubler
b81fcb4134
refactor(wgsl-in): track diagnostic directives in func. analysis
2024-11-12 08:49:02 -05:00
Gábor Gyebnár
47d20d913d
Fixes crash when there's a missing texture argument ( #6486 )
2024-11-07 16:35:36 +01:00
Jasper St. Pierre
390a4169fb
naga: Don't consider per-polygon inputs to be subgroup uniform
...
Implementations can absolutely pack multiple triangles per subgroup.
Fixes #6270 .
2024-09-22 03:57:41 -04:00
Erich Gubler
5533c37786
chore: satisfy clippy::collapsible_match
2024-08-13 08:42:41 +01:00
Bruce Mitchener
ee16de1c63
clippy: Fix doc_lazy_continuation lints ( #5935 )
...
These are in nightly builds.
2024-07-11 08:44:43 +02:00
Jim Blandy
91e4be314c
[naga doc] Fix broken links in Naga bitflags types.
...
Fix links in documentation for types defined using the `bitflags!` macro.
As described in [bitflags#407], for some reason, `cargo doc` doesn't
check for broken links in documentation for types or members defined
using `bitflags::bitflags!`.
[bitflags#407]: https://github.com/bitflags/bitflags/issues/407
2024-06-03 10:26:47 +02:00
Jim Blandy
aaefc7c10d
[naga] Fix cargo doc --document-private-items. Add to CI.
2024-05-24 10:38:06 +02:00
Erich Gubler
e8e33ede11
refactor(naga): remove extraneous leading path qualifiers ( #5612 )
...
Implemented by `cargo fix -p naga --lib`.
2024-04-28 16:33:13 +02:00
Alexander Meißner
ea77d5674d
Subgroup Operations ( #5301 )
...
Co-authored-by: Jacob Hughes <j@distanthills.org>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Co-authored-by: atlas dostal <rodol@rivalrebels.com>
2024-04-17 15:25:52 -04:00
teoxoy
e9eb703941
rename const_expressions to global_expressions
2024-04-05 18:07:41 +02:00
teoxoy
d6ebd88f42
implement override-expression evaluation for initializers of override declarations
2024-04-05 18:07:41 +02:00
Teodor Tanasoaia
f949ea69c4
[wgsl-in] add support for override declarations ( #4793 )
...
Co-authored-by: Jim Blandy <jimb@red-bean.com>
2024-04-05 18:07:41 +02:00
Jim Blandy
c613fbbeed
[naga] Add some documentation for the uniformity analysis.
...
This is Naga's classic, over-conservative, non-standard-compliant
uniformity analysis. But it's still good to know what the heck it's
doing.
2024-03-28 17:36:58 +01:00
Teodor Tanasoaia
a26e4a009a
[naga] remove span and validate features ( #4706 )
2023-11-17 13:37:25 -05:00
Jim Blandy
9f91c95c24
[naga] Introduce Scalar type to IR.
...
Introduce a new struct type, `Scalar`, combining a `ScalarKind` and a
`Bytes` width, and use this whenever such pairs of values are passed
around.
In particular, use `Scalar` in `TypeInner` variants `Scalar`, `Vector`,
`Atomic`, and `ValuePointer`.
Introduce associated `Scalar` constants `I32`, `U32`, `F32`, `BOOL`
and `F64`, for common cases.
Introduce a helper function `Scalar::float` for constructing `Float`
scalars of a given width, for dealing with `TypeInner::Matrix`, which
only supplies the scalar width of its elements, not a kind.
Introduce helper functions on `Literal` and `TypeInner`, to produce
the `Scalar` describing elements' values.
Use `Scalar` in `wgpu_core::validation::NumericType` as well.
2023-11-14 14:21:27 +01:00
Connor Fitzgerald
5369eec3b2
Move naga to subfolder
2023-10-25 14:25:04 -04:00