Samson
6e7d3c4b3e
[naga] Explicitly use global const ctx in offset ( #6945 )
...
* Fix as_const on expr ctx
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com >
* fixup
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com >
---------
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com >
2025-01-20 18:59:11 +01:00
Jamie Nicol
1f939e1c44
[naga msl-out] Avoid undefined behaviour due to signed integer overflow ( #6959 )
...
Signed integer overflow is undefined behaviour in MSL. However, signed
integers are defined to be two's complement. This allows us to cast
signed values to their corresponding unsigned type, perform the
arithmetic on these unsigned values (which has defined overflow
behaviour) then cast the result back to signed.
Care must be taken when emitting the isign polyfill, which uses
metal::select(). We must ensure the -1, 0, and 1 literals used as
inputs to select() have the correct width, else bitcasting the output
of select() will fail due to mismatched widths.
2025-01-20 18:11:27 +01:00
Connor Fitzgerald
6e5c9468aa
Enable Storage Texture Binding Arrays on DX12 ( #6956 )
2025-01-20 16:39:16 +01:00
the letter L and turbocrime
0b0cb8fec9
remove unused CallError::ResultValue ( #6944 )
...
Co-authored-by: turbocrime <turbocrime@users.noreply.github.com >
2025-01-20 16:29:12 +01:00
Connor Fitzgerald
c613d830f3
We Don't Pay for CI Anymore ( #6954 )
2025-01-20 16:20:43 +01:00
dependabot[bot]
87b3ca25de
chore(deps): bump the patch-updates group with 6 updates ( #6953 )
...
Bumps the patch-updates group with 6 updates:
| Package | From | To |
| --- | --- | --- |
| [indexmap](https://github.com/indexmap-rs/indexmap ) | `2.7.0` | `2.7.1` |
| [serde_json](https://github.com/serde-rs/json ) | `1.0.135` | `1.0.137` |
| [trybuild](https://github.com/dtolnay/trybuild ) | `1.0.101` | `1.0.102` |
| [range-alloc](https://github.com/gfx-rs/range-alloc ) | `0.1.3` | `0.1.4` |
| [cc](https://github.com/rust-lang/cc-rs ) | `1.2.9` | `1.2.10` |
| [valuable](https://github.com/tokio-rs/valuable ) | `0.1.0` | `0.1.1` |
Updates `indexmap` from 2.7.0 to 2.7.1
- [Changelog](https://github.com/indexmap-rs/indexmap/blob/master/RELEASES.md )
- [Commits](https://github.com/indexmap-rs/indexmap/compare/2.7.0...2.7.1 )
Updates `serde_json` from 1.0.135 to 1.0.137
- [Release notes](https://github.com/serde-rs/json/releases )
- [Commits](https://github.com/serde-rs/json/compare/v1.0.135...v1.0.137 )
Updates `trybuild` from 1.0.101 to 1.0.102
- [Release notes](https://github.com/dtolnay/trybuild/releases )
- [Commits](https://github.com/dtolnay/trybuild/compare/1.0.101...1.0.102 )
Updates `range-alloc` from 0.1.3 to 0.1.4
- [Commits](https://github.com/gfx-rs/range-alloc/commits )
Updates `cc` from 1.2.9 to 1.2.10
- [Release notes](https://github.com/rust-lang/cc-rs/releases )
- [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.9...cc-v1.2.10 )
Updates `valuable` from 0.1.0 to 0.1.1
- [Release notes](https://github.com/tokio-rs/valuable/releases )
- [Changelog](https://github.com/tokio-rs/valuable/blob/master/CHANGELOG.md )
- [Commits](https://github.com/tokio-rs/valuable/compare/v0.1.0...v0.1.1 )
---
updated-dependencies:
- dependency-name: indexmap
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: serde_json
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: trybuild
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: range-alloc
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: cc
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: valuable
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-19 23:07:17 -05:00
@brody4hire - C. Jonathan Brody
68a6f3bf8c
update & clean up recent changes in CHANGELOG.md ( #6948 )
2025-01-19 09:16:07 +01:00
Andreas Reich
e2d14c677a
Fix building wgpu with --no-default-feautures on web (wasm32-unknown-unknown) ( #6946 )
...
* Fix wasm build without features
* silence unused warnings if wgc & webgpu are disabled
* add no-features check for web ci
* add changelog entry
2025-01-18 15:05:57 -05:00
Connor Fitzgerald
dcdb10348b
Add Flush to GL Queue::submit ( #6941 )
2025-01-18 15:02:42 -05:00
Erich Gubler
3b3e1939f9
Eliminate overflow in query set bounds checks ( #6933 )
2025-01-17 16:36:22 +00:00
sotaroikeda and Sotaro Ikeda
3d13cc1bbe
Add a way to notify with Queue::submit() to Vulkan's vk::Semaphore allocated outside of wgpu ( #6813 )
...
Co-authored-by: Sotaro Ikeda <you@example.com >
2025-01-17 11:18:17 -05:00
Alphyr
aa94634524
Implement Clone for ShaderModule ( #6937 )
2025-01-17 10:39:47 -05:00
Vecvec and Connor Fitzgerald
bdef8c0407
[spirv] Stop naga causing undefined behavior in rayQueryGet*Intersection ( #6752 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
2025-01-17 00:04:33 +00:00
Andreas Reich
d5d5157b5d
Add "Most objects in wgpu are now Clone" to highlight section ( #6930 )
2025-01-16 11:13:04 -05:00
@brodycj - C. Jonathan Brody and Connor Fitzgerald
beb33414c7
trace directory path updates ( #6924 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
2025-01-16 14:50:15 +00:00
@brodycj - C. Jonathan Brody
623f143a82
Start using hashbrown ( #6925 )
2025-01-16 14:53:36 +01:00
Connor Fitzgerald
779261e64d
Release v24 ( #6923 )
v24.0.0
2025-01-15 16:29:22 -05:00
caelunshun and Connor Fitzgerald
30364134f3
Expose conversions between TextureFormat and naga::StorageFormat ( #6185 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
2025-01-15 17:44:14 +00:00
Connor Fitzgerald
0f37714fb8
Separate Out Backend Options into Individual Structs ( #6895 )
2025-01-15 17:32:15 +00:00
Kent Slaney and Connor Fitzgerald
a32467041d
fix >= in template list matching for a<b>=c ( #6898 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
2025-01-15 17:25:04 +00:00
atlv
be95178709
64 bit image atomics ( #5537 )
2025-01-15 08:05:13 -05:00
sagudev
6c10e0be73
Add changelog
...
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com >
2025-01-15 11:14:17 +01:00
sagudev
ea5d3b953f
Add test
...
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com >
2025-01-15 11:14:17 +01:00
sagudev
a65216cabe
[naga] wgsl automatic conversion for override initializers
...
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com >
2025-01-15 11:14:17 +01:00
sagudev
4576e4d0d2
Refactor init and type handling into separate function from var
...
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com >
2025-01-15 11:14:17 +01:00
Vecvec and Connor Fitzgerald
21de7f7773
Support DXR in wgpu-hal & naga. ( #6777 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
2025-01-14 21:28:37 -05:00
Connor Fitzgerald
2cfea40acc
Fix bind group initialization in benchmarks ( #6916 )
2025-01-14 23:02:05 +00:00
Jim Blandy
90a97a1ed9
Add CHANGELOG.md entries for jimblandy's PRs. ( #6918 )
2025-01-14 22:45:03 +00:00
Vecvec and Connor Fitzgerald
0b2c9e4f4b
[Ray-tracing] Change index offset to first index ( #6873 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
2025-01-14 16:56:24 -05:00
Jim Blandy
bd3e7b676e
[naga] Consolidate entry point tracing code. ( #6917 )
2025-01-14 21:12:52 +00:00
Connor Fitzgerald
c71d67010f
Fix Features when Depending on wgpu ( #6915 )
2025-01-14 18:19:43 +00:00
Jim Blandy
aa7bec65b9
[naga] Remove vestigial false. ( #6909 )
2025-01-13 23:02:47 +00:00
Erich Gubler
1963eb7c3f
diag(wgsl-in): use backticks for code-like text in WGSL FE errors ( #6908 )
2025-01-13 22:13:40 +00:00
Erich Gubler
cc741735df
fix(wgsl-in): print debug repr. of unexpected tokens ( #6907 )
2025-01-13 16:43:41 -05:00
teoxoy
f62090ed71
use StatelessTracker for acceleration structures
2025-01-13 20:52:55 +01:00
teoxoy
f17f10dcdd
remove Tlas/Blas destroy methods
...
`Tlas.destroy` didn't check if the `Tlas` is used in a bind group of an active submission. The only reason we need the `destroy` methods for textures and buffers is because they allow users to eagerly release memory in browser implementations. I think we can remove the destroy methods on the acceleration structures for now as they complicate the picture without any gain. If they will be needed for Firefox we can add them back.
2025-01-13 20:52:55 +01:00
teoxoy
e066a23948
remove unused id
2025-01-13 20:52:55 +01:00
teoxoy
362e440552
add temp_resources to CommandBufferMutable, BakedCommands & EncoderInFlight, remove it from ActiveSubmission
...
Use `CommandBufferMutable.temp_resources` to store the ray tracing related staging buffers and scratch buffers. These shouldn't have been stored in `PendingWrites.temp_resources` because they can get destroyed early (before the command buffer that uses them has been submitted) if any other command buffer gets submitted first.
2025-01-13 20:52:55 +01:00
teoxoy
43e0ebde9f
[wgpu-core] ray tracing: remove acceleration structures from pending writes
...
The acceleration structures are already being kept alive by the tracker in the command encoder.
2025-01-13 20:52:55 +01:00
teoxoy
fb9f91a668
[wgpu-core] ray tracing: use error handling helpers
2025-01-13 20:52:55 +01:00
Teodor Tanasoaia
214396a807
[spv] output the right capability for subgroupBroadcast ( #6904 )
2025-01-13 14:29:04 -05:00
Connor Fitzgerald
f6dd3a4ff2
Turn off Merge Queue ( #6901 )
2025-01-13 16:51:24 +00:00
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
dependabot[bot] and Connor Fitzgerald
a5704d9a1c
chore(deps): bump the patch-updates group with 14 updates ( #6899 )
...
* chore(deps): bump the patch-updates group with 14 updates
Bumps the patch-updates group with 14 updates:
| Package | From | To |
| --- | --- | --- |
| [bitflags](https://github.com/bitflags/bitflags ) | `2.6.0` | `2.7.0` |
| [futures-lite](https://github.com/smol-rs/futures-lite ) | `2.5.0` | `2.6.0` |
| [thiserror](https://github.com/dtolnay/thiserror ) | `2.0.10` | `2.0.11` |
| [glutin_wgl_sys](https://github.com/rust-windowing/glutin ) | `0.6.0` | `0.6.1` |
| [petgraph](https://github.com/petgraph/petgraph ) | `0.6.5` | `0.7.1` |
| [syn](https://github.com/dtolnay/syn ) | `2.0.95` | `2.0.96` |
| [cc](https://github.com/rust-lang/cc-rs ) | `1.2.7` | `1.2.9` |
| [clap](https://github.com/clap-rs/clap ) | `4.5.24` | `4.5.26` |
| [clap_builder](https://github.com/clap-rs/clap ) | `4.5.24` | `4.5.26` |
| [const_panic](https://github.com/rodrimati1992/const_panic ) | `0.2.11` | `0.2.12` |
| [prettyplease](https://github.com/dtolnay/prettyplease ) | `0.2.27` | `0.2.29` |
| [proc-macro2](https://github.com/dtolnay/proc-macro2 ) | `1.0.92` | `1.0.93` |
| [uuid](https://github.com/uuid-rs/uuid ) | `1.11.0` | `1.11.1` |
| [winnow](https://github.com/winnow-rs/winnow ) | `0.6.22` | `0.6.24` |
Updates `bitflags` from 2.6.0 to 2.7.0
- [Release notes](https://github.com/bitflags/bitflags/releases )
- [Changelog](https://github.com/bitflags/bitflags/blob/main/CHANGELOG.md )
- [Commits](https://github.com/bitflags/bitflags/compare/2.6.0...2.7.0 )
Updates `futures-lite` from 2.5.0 to 2.6.0
- [Release notes](https://github.com/smol-rs/futures-lite/releases )
- [Changelog](https://github.com/smol-rs/futures-lite/blob/master/CHANGELOG.md )
- [Commits](https://github.com/smol-rs/futures-lite/compare/v2.5.0...v2.6.0 )
Updates `thiserror` from 2.0.10 to 2.0.11
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/2.0.10...2.0.11 )
Updates `glutin_wgl_sys` from 0.6.0 to 0.6.1
- [Release notes](https://github.com/rust-windowing/glutin/releases )
- [Changelog](https://github.com/rust-windowing/glutin/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-windowing/glutin/commits )
Updates `petgraph` from 0.6.5 to 0.7.1
- [Changelog](https://github.com/petgraph/petgraph/blob/master/RELEASES.rst )
- [Commits](https://github.com/petgraph/petgraph/compare/petgraph@v0.6.5...petgraph@v0.7.1 )
Updates `syn` from 2.0.95 to 2.0.96
- [Release notes](https://github.com/dtolnay/syn/releases )
- [Commits](https://github.com/dtolnay/syn/compare/2.0.95...2.0.96 )
Updates `cc` from 1.2.7 to 1.2.9
- [Release notes](https://github.com/rust-lang/cc-rs/releases )
- [Changelog](https://github.com/rust-lang/cc-rs/blob/main/CHANGELOG.md )
- [Commits](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.7...cc-v1.2.9 )
Updates `clap` from 4.5.24 to 4.5.26
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.5.24...clap_complete-v4.5.26 )
Updates `clap_builder` from 4.5.24 to 4.5.26
- [Release notes](https://github.com/clap-rs/clap/releases )
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/clap-rs/clap/compare/v4.5.24...v4.5.26 )
Updates `const_panic` from 0.2.11 to 0.2.12
- [Release notes](https://github.com/rodrimati1992/const_panic/releases )
- [Changelog](https://github.com/rodrimati1992/const_panic/blob/main/Changelog.md )
- [Commits](https://github.com/rodrimati1992/const_panic/commits/0.2.12 )
Updates `prettyplease` from 0.2.27 to 0.2.29
- [Release notes](https://github.com/dtolnay/prettyplease/releases )
- [Commits](https://github.com/dtolnay/prettyplease/compare/0.2.27...0.2.29 )
Updates `proc-macro2` from 1.0.92 to 1.0.93
- [Release notes](https://github.com/dtolnay/proc-macro2/releases )
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.92...1.0.93 )
Updates `uuid` from 1.11.0 to 1.11.1
- [Release notes](https://github.com/uuid-rs/uuid/releases )
- [Commits](https://github.com/uuid-rs/uuid/compare/1.11.0...1.11.1 )
Updates `winnow` from 0.6.22 to 0.6.24
- [Changelog](https://github.com/winnow-rs/winnow/blob/main/CHANGELOG.md )
- [Commits](https://github.com/winnow-rs/winnow/compare/v0.6.22...v0.6.24 )
---
updated-dependencies:
- dependency-name: bitflags
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: patch-updates
- dependency-name: futures-lite
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: patch-updates
- dependency-name: thiserror
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: glutin_wgl_sys
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: petgraph
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: patch-updates
- dependency-name: syn
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: cc
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: clap
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: clap_builder
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: const_panic
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: prettyplease
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: proc-macro2
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: uuid
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
- dependency-name: winnow
dependency-type: indirect
update-type: version-update:semver-patch
dependency-group: patch-updates
...
Signed-off-by: dependabot[bot] <support@github.com >
* Update naga/Cargo.toml
---------
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
2025-01-13 03:15:57 +00:00
Zachary Harrold and Connor Fitzgerald
05e62f96f9
Add no_std support to wgpu-types ( #6892 )
...
* Initial Commit
* Remove now-redundant `format` import
* Update CHANGELOG.md
* Appropriately feature-gate `texture_format_serialize` test
* Remove `alloc` feature
Also fixed some documentation links and a Wasm `std` import
* Revert change to `Serialize` for `TextureFormat`
* Combine use statements
* Switch from `PathBuf` to `String`
* Consider environmental flags as unset on `no_std`
* Fix missing `format!`
* Add new CI tasks for `no_std` testing
* Comment out known failing CI matrix option
* Update all usage of `Dx12Compiler::DynamicDxc`
* Added comments to CI
* Update .github/workflows/ci.yml
* Update .github/workflows/ci.yml
* Update .github/workflows/ci.yml
* CI Touchups
---------
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
2025-01-12 05:03:47 +00:00
Eric Szentivanyi
4efc992d6d
Add raw_handle method for metal texture ( #6894 )
...
* Add `raw_handle` method for metal texture
* Add raw_handle method for metal texture (#6894 )
2025-01-11 02:45:09 +00:00
Connor Fitzgerald
44b23c396d
Bump Nightly Version ( #6896 )
2025-01-10 21:42:42 -05:00
AbdullahElsheshtawy and Connor Fitzgerald
55391f716d
Added Texture Blitting Utility ( #6852 )
...
* Added TextureBlitter Utility
* Fixed Clippy and made TextureBlitter Public
* Written Documentation
* change cull_mode
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
* syntax error
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
* 1 formatting space in shader
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
* Applied suggestions
* fix test
* Fixed typos
* Fixed the tests
* Fixed the shader after trying it manually and looking at the output.
* Added `BlendState` customization parameter.
* Apply suggestions from code review
Documentation!
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
* Made it Load instead of Clear(Black)
* Added `TextureBlitterBuilder`
* Added feature wgsl feature flag for `pub use texture_blitter...;`
* Re-add file
---------
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
2025-01-10 22:16:01 +00:00
Erich Gubler
d9cc72785b
Use more Rust features allowed under REPO_MSRV ( #6887 )
...
* chore: remove `std::mem::*` imports now unnecessary with `REPO_MSRV`
`std::mem::{size,align}_of{,_val}` was added to `std::prelude` in Rust
1.80; see
[`rust`#123168](https://github.com/rust-lang/rust/pull/123168/ ).
* refactor(benches): s/once_cell::Lazy/std::sync::LazyLock
Weaken our dependence on the `once_cell` crate by using functionality
from `std` instead that was upstreamed from `once_cell`, this time with
what's available in Rust 1.80+.
It's not yet possible to eliminate this dependency entirely, but do what
we can with `REPO_MSRV` for now.
* chore: remove unnecessarily `allow`'d lint rules under `REPO_MSRV`
* chore: migrate easy `allow`s to `expect` under `REPO_MSRV`
Remove or `expect` clear-cut `allow` statements that were easy for me to
figure out.
* chore: `warn` on `clippy::allow_attributes` under `REPO_MSRV`
2025-01-10 22:06:26 +00:00
Connor Fitzgerald
450ac2d05d
Fix Double Push ( #6890 )
2025-01-10 19:47:25 +00:00