Commit Graph

1108 Commits

Author SHA1 Message Date
Andreas Reich
fc764b4b17 Introduce DynComputePipeline & DynRenderPipeline 2024-08-14 17:34:11 +02:00
Andreas Reich
50a1811229 Introduce DynPipelineLayout & DynBindGroup 2024-08-14 17:34:11 +02:00
Andreas Reich
f8871e6ed1 introduce DynQuerySet, associated DynCommandEncoder methods 2024-08-14 17:34:11 +02:00
Andreas Reich
9b20fd8507 DynCommandEncoder implement begin/end encoding, debug markers, various buffer operations 2024-08-14 17:34:11 +02:00
Andreas Reich
256ec6e447 Introduce DynCommandEncoder, implement index & vertex buffer ops on it 2024-08-14 17:34:11 +02:00
Andreas Reich
a4d9d38d03 BufferBarrier no longer depend on hal api struct, but directly on buffer type 2024-08-14 17:34:11 +02:00
Andreas Reich
cda9d9af65 Buffer bindings no longer depend on hal api struct, but directly on buffer type 2024-08-14 17:34:11 +02:00
Andreas Reich
d2508d9ad6 introduce DynResource & DynBuffer as first user 2024-08-14 17:34:11 +02:00
Samson
c6a3d92734
Rg11b10Float -> Rg11b10UFloat and deduplicate entries in TEXTURE_FORMAT_LIST (#6108)
* Resync `TEXTURE_FORMAT_LIST` to match `TextureFormat`

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* `Rg11b10Float` -> `Rg11b10UFloat`

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

* Add changelog entry

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>

---------

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
2024-08-13 08:28:55 +00:00
Erich Gubler
5533c37786 chore: satisfy clippy::collapsible_match 2024-08-13 08:42:41 +01:00
teoxoy
7c917abf52 [gl] gate usage of glFlushMappedBufferRange
This is done in the same way as in `map_buffer` & `unmap_buffer`.
2024-08-12 14:20:56 +01:00
teoxoy
b594497f4a [gl] fix usage of glFlushMappedBufferRange
`offset` is relative to the start of the mapping not the start of the buffer.
2024-08-12 14:20:56 +01:00
Teodor Tanasoaia
94f54b3dc8
Add a separate pipeline constants error (#6094) 2024-08-12 09:20:36 +02:00
Mehmet Oguz Derin
34b0df277c
Support texture-compression-bc-sliced-3d in wgpu (#5751) 2024-08-10 12:02:29 +02:00
James Pruitt
594476c991
Check Opengl version is 3.3+ before creating a GL context over a GL ES context (#5996)
* Retry with GLES if creating a GL context fails

* Cleaner GL context creation retry
2024-08-06 08:19:23 +00:00
Nicolas Silva
9c6ae1beae
Log spring cleaning (#6065)
Remove unused logs in wgpu-core and wgpu-hal
2024-07-31 16:24:23 +00:00
teoxoy
1cb7ebab99 [wgpu-hal] replace Instance.destroy_surface() with Drop impls on Surfaces
Only the metal and vulkan backends require
destruction code and it can go in a `Drop` impl since
the `Instance` is unused in those implementations.
2024-07-29 17:31:24 +02:00
teoxoy
ccd6d2ca48 remove BoundsCheckPolicies.image_store 2024-07-26 10:44:22 -07:00
Bruce Mitchener
3166d37754
Use workspace dependencies more. (#6020) 2024-07-26 18:48:01 +02:00
Marijn Suijten
2611d18b15 gles/wgl: Migrate from ancient/unmaintained winapi to windows-rs 2024-07-25 11:15:26 +02:00
Erich Gubler
65b6e15f0f chore: satisfy clippy::unused_qualifications 2024-07-24 12:09:15 -04:00
Erich Gubler
723995d9a9 refactor: warn on and satisfy clippy::{ptr_as_ptr,ref_as_ptr} in wgpu-{core,hal,types}
…using `cargo +1.79.0 clippy --workspace --all-features --all-targets
--fix`, plus some manual changes to (1) catch some missed cases (not run
on all platforms?) and (2) `--fix` doesn't make things compile again. 😀
2024-07-24 12:09:15 -04:00
Bruce Mitchener
06649a39f3
Fix a clippy::doc_lazy_continuation lint (#6036) 2024-07-24 18:08:21 +02:00
Bruce Mitchener
4f02057359 Convert some module doc comments
Some module doc comments were using `/*! ... */` syntax and had
leading ` *` prefixes on each line. This interferes with the
tracking of `clippy::doc_lazy_continuation`, so switch those over
to `//!` style comment blocks.

This leaves `/*! ... */` blocks alone which didn't prefix each
line.
2024-07-24 11:17:00 -04:00
Erich Gubler
7b2e08fb94
refactor: satisfy clippy::missing_transmute_annotations (#6024)
* refactor(metal): satisfy `clippy::missing_transmute_annotations`

* refactor(gles): satisfy `clippy::missing_transmute_annotations`

* refactor(metal): `metal::Surface::view`: use `ptr::cast` instead of `as`
2024-07-24 08:56:45 +02:00
Bruce Mitchener
0aca442d15
typos: More precise config, remove refs to "implace" (#6018)
The config can be made more precise so as to not accidentally
ignore some issues due to case (in-)sensitivity and searching for
substrings with `extend-words`.

Additionally, we can check the configuration directories as
well like `.github`.

The usage of `implace_it` went away some time ago, but not all
references were removed.
2024-07-24 08:55:10 +02:00
Erich Gubler
667096491d style: remove trailing colons in Safety section names 2024-07-23 14:02:16 -07:00
Erich Gubler
b350ca432b style: use uppercase for SAFETY comments 2024-07-23 14:02:16 -07:00
dependabot[bot]
101c996703
build(deps): bump the patch-updates group with 15 updates (#6008)
Bumps the patch-updates group with 15 updates:

| Package | From | To |
| --- | --- | --- |
| [bit-vec](https://github.com/contain-rs/bit-vec) | `0.7.0` | `0.8.0` |
| [libloading](https://github.com/nagisa/rust_libloading) | `0.8.4` | `0.8.5` |
| [tracy-client](https://github.com/nagisa/rust_tracy_client) | `0.17.0` | `0.17.1` |
| [thiserror](https://github.com/dtolnay/thiserror) | `1.0.62` | `1.0.63` |
| [bit-set](https://github.com/contain-rs/bit-set) | `0.6.0` | `0.8.0` |
| [glow](https://github.com/grovesNL/glow) | `0.13.1` | `0.14.0` |
| [tokio](https://github.com/tokio-rs/tokio) | `1.38.0` | `1.38.1` |
| [syn](https://github.com/dtolnay/syn) | `2.0.71` | `2.0.72` |
| [arrayref](https://github.com/droundy/arrayref) | `0.3.7` | `0.3.8` |
| [cc](https://github.com/rust-lang/cc-rs) | `1.1.5` | `1.1.6` |
| [thiserror-impl](https://github.com/dtolnay/thiserror) | `1.0.62` | `1.0.63` |
| [thread-id](https://github.com/ruuda/thread-id) | `4.2.1` | `4.2.2` |
| [tracy-client-sys](https://github.com/nagisa/rust_tracy_client) | `0.22.2` | `0.23.0` |
| [wayland-backend](https://github.com/smithay/wayland-rs) | `0.3.5` | `0.3.6` |
| [xcursor](https://github.com/esposm03/xcursor-rs) | `0.3.5` | `0.3.6` |


Updates `bit-vec` from 0.7.0 to 0.8.0
- [Changelog](https://github.com/contain-rs/bit-vec/blob/master/RELEASES.md)
- [Commits](https://github.com/contain-rs/bit-vec/commits)

Updates `libloading` from 0.8.4 to 0.8.5
- [Commits](https://github.com/nagisa/rust_libloading/compare/0.8.4...0.8.5)

Updates `tracy-client` from 0.17.0 to 0.17.1
- [Commits](https://github.com/nagisa/rust_tracy_client/compare/tracy-client-v0.17.0...tracy-client-v0.17.1)

Updates `thiserror` from 1.0.62 to 1.0.63
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.62...1.0.63)

Updates `bit-set` from 0.6.0 to 0.8.0
- [Release notes](https://github.com/contain-rs/bit-set/releases)
- [Changelog](https://github.com/contain-rs/bit-set/blob/master/RELEASES.md)
- [Commits](https://github.com/contain-rs/bit-set/commits)

Updates `glow` from 0.13.1 to 0.14.0
- [Commits](https://github.com/grovesNL/glow/commits)

Updates `tokio` from 1.38.0 to 1.38.1
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.38.0...tokio-1.38.1)

Updates `syn` from 2.0.71 to 2.0.72
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/2.0.71...2.0.72)

Updates `arrayref` from 0.3.7 to 0.3.8
- [Commits](https://github.com/droundy/arrayref/commits)

Updates `cc` from 1.1.5 to 1.1.6
- [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.1.5...cc-v1.1.6)

Updates `thiserror-impl` from 1.0.62 to 1.0.63
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.62...1.0.63)

Updates `thread-id` from 4.2.1 to 4.2.2
- [Changelog](https://github.com/ruuda/thread-id/blob/master/changelog.md)
- [Commits](https://github.com/ruuda/thread-id/compare/v4.2.1...v4.2.2)

Updates `tracy-client-sys` from 0.22.2 to 0.23.0
- [Commits](https://github.com/nagisa/rust_tracy_client/compare/tracy-client-sys-v0.22.2...tracy-client-sys-v0.23.0)

Updates `wayland-backend` from 0.3.5 to 0.3.6
- [Release notes](https://github.com/smithay/wayland-rs/releases)
- [Changelog](https://github.com/Smithay/wayland-rs/blob/master/historical_changelog.md)
- [Commits](https://github.com/smithay/wayland-rs/commits)

Updates `xcursor` from 0.3.5 to 0.3.6
- [Commits](https://github.com/esposm03/xcursor-rs/commits)

---
updated-dependencies:
- dependency-name: bit-vec
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: patch-updates
- dependency-name: libloading
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: tracy-client
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: bit-set
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: patch-updates
- dependency-name: glow
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: patch-updates
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: syn
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: arrayref
  dependency-type: indirect
  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: thiserror-impl
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: thread-id
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: tracy-client-sys
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: patch-updates
- dependency-name: wayland-backend
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: xcursor
  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>
2024-07-22 00:20:29 -04:00
Andreas Reich
c0e7c1ef94 Bump core MSRV to 1.76 2024-07-20 15:55:28 -04:00
Bruce Mitchener
cf5798291f
Remove allow(unknown_lints) and clippy::if_then_panic (#6000) 2024-07-20 03:35:19 +00:00
Brad Werth
6cd387412f Remove vertex_pulling_transfrom from PipelineCompilationOptions.
This option was only evaluated for Metal backends, and now it's required
there so the option is going away. It is still configurable for tests
via the PipelineOptions struct, deserialized from .ron files.

This also fixes some type problems with the unpack functions in
writer.rs. Metal << operator extends operand to int-sized, which then
has to be cast back down to the real size before as_type bit conversion.
The math for the snorm values is corrected, in some cases using the
metal unpack_snorm2x16_to_float function because we can't directly
cast a bit-shifted ushort value to half.
2024-07-19 17:13:45 +02:00
Nicolas Silva
bc7622f641 Expose GPU allocation reports in wgpu, wgpu-core and wgpu-hal 2024-07-19 10:16:29 +02:00
Nicolas Silva
8aed6ed220
Update gpu-allocator dependency to 0.27 (#5982) 2024-07-18 19:18:32 -04:00
Erich Gubler
6a1432c132 chore: release 22.0.0 2024-07-18 11:54:46 -04:00
Jim Blandy
2bc328c46f [hal, core] Introduce wgpu_hal::AtomicFenceValue, and use it.
Introduce the new type alias `wgpu_hal::AtomicFenceValue`, which is
the atomic version of `wgpu_hal::FenceValue`. Use this type alias in
`wgpu_core`. Remove `as` conversions made unnecessary since we're not
conflating `usize` with `u64` any more.
2024-07-17 16:11:04 -07:00
Jim Blandy
a47ed5dc1e [hal doc] Note wgpu_hal::Queue::submit's expectations for Fence. 2024-07-17 16:11:04 -07:00
teoxoy
241b52f7ea [example] add instructions to halmark 2024-07-17 14:03:11 +02:00
dependabot[bot]
12e07eb1bf
build(deps): bump the patch-updates group across 1 directory with 23 updates (#5944)
* build(deps): bump the patch-updates group across 1 directory with 23 updates

Bumps the patch-updates group with 18 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [document-features](https://github.com/slint-ui/document-features) | `0.2.8` | `0.2.9` |
| [glam](https://github.com/bitshifter/glam-rs) | `0.27.0` | `0.28.0` |
| [serde](https://github.com/serde-rs/serde) | `1.0.203` | `1.0.204` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.119` | `1.0.120` |
| [metal](https://github.com/gfx-rs/metal-rs) | `0.28.0` | `0.29.0` |
| [syn](https://github.com/dtolnay/syn) | `2.0.68` | `2.0.70` |
| [ab_glyph](https://github.com/alexheretic/ab-glyph) | `0.2.27` | `0.2.28` |
| [async-trait](https://github.com/dtolnay/async-trait) | `0.1.80` | `0.1.81` |
| [cc](https://github.com/rust-lang/cc-rs) | `1.0.103` | `1.1.0` |
| [clap](https://github.com/clap-rs/clap) | `4.5.8` | `4.5.9` |
| [deno_unsync](https://github.com/denoland/deno_unsync) | `0.3.5` | `0.3.10` |
| oorandom | `11.1.3` | `11.1.4` |
| [tinyvec](https://github.com/Lokathor/tinyvec) | `1.6.1` | `1.8.0` |
| [unicode-id-start](https://github.com/Boshen/unicode-id-start) | `1.1.2` | `1.2.0` |
| [uuid](https://github.com/uuid-rs/uuid) | `1.9.1` | `1.10.0` |
| [wayland-backend](https://github.com/smithay/wayland-rs) | `0.3.4` | `0.3.5` |
| [windows_i686_gnullvm](https://github.com/microsoft/windows-rs) | `0.52.5` | `0.52.6` |
| [zerocopy](https://github.com/google/zerocopy) | `0.7.34` | `0.7.35` |



Updates `document-features` from 0.2.8 to 0.2.9
- [Release notes](https://github.com/slint-ui/document-features/releases)
- [Changelog](https://github.com/slint-ui/document-features/blob/master/CHANGELOG.md)
- [Commits](https://github.com/slint-ui/document-features/compare/v0.2.8...v0.2.9)

Updates `glam` from 0.27.0 to 0.28.0
- [Changelog](https://github.com/bitshifter/glam-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bitshifter/glam-rs/compare/0.27.0...0.28.0)

Updates `serde` from 1.0.203 to 1.0.204
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.203...v1.0.204)

Updates `serde_json` from 1.0.119 to 1.0.120
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.119...v1.0.120)

Updates `metal` from 0.28.0 to 0.29.0
- [Release notes](https://github.com/gfx-rs/metal-rs/releases)
- [Commits](https://github.com/gfx-rs/metal-rs/commits)

Updates `syn` from 2.0.68 to 2.0.70
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/2.0.68...2.0.70)

Updates `ab_glyph` from 0.2.27 to 0.2.28
- [Release notes](https://github.com/alexheretic/ab-glyph/releases)
- [Commits](https://github.com/alexheretic/ab-glyph/compare/ab-glyph-0.2.27...ab-glyph-0.2.28)

Updates `async-trait` from 0.1.80 to 0.1.81
- [Release notes](https://github.com/dtolnay/async-trait/releases)
- [Commits](https://github.com/dtolnay/async-trait/compare/0.1.80...0.1.81)

Updates `cc` from 1.0.103 to 1.1.0
- [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.0.103...cc-v1.1.0)

Updates `clap` from 4.5.8 to 4.5.9
- [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.8...v4.5.9)

Updates `clap_builder` from 4.5.8 to 4.5.9
- [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.8...v4.5.9)

Updates `deno_unsync` from 0.3.5 to 0.3.10
- [Commits](https://github.com/denoland/deno_unsync/commits)

Updates `oorandom` from 11.1.3 to 11.1.4

Updates `owned_ttf_parser` from 0.21.0 to 0.24.0
- [Release notes](https://github.com/alexheretic/owned-ttf-parser/releases)
- [Changelog](https://github.com/alexheretic/owned-ttf-parser/blob/main/CHANGELOG.md)
- [Commits](https://github.com/alexheretic/owned-ttf-parser/compare/0.21.0...0.24.0)

Updates `serde_derive` from 1.0.203 to 1.0.204
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.203...v1.0.204)

Updates `tinyvec` from 1.6.1 to 1.8.0
- [Changelog](https://github.com/Lokathor/tinyvec/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Lokathor/tinyvec/compare/v1.6.1...v1.8.0)

Updates `ttf-parser` from 0.21.1 to 0.24.0
- [Changelog](https://github.com/RazrFalcon/ttf-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/RazrFalcon/ttf-parser/compare/v0.21.1...v0.24.0)

Updates `unicode-id-start` from 1.1.2 to 1.2.0
- [Commits](https://github.com/Boshen/unicode-id-start/commits)

Updates `uuid` from 1.9.1 to 1.10.0
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/1.9.1...1.10.0)

Updates `wayland-backend` from 0.3.4 to 0.3.5
- [Release notes](https://github.com/smithay/wayland-rs/releases)
- [Changelog](https://github.com/Smithay/wayland-rs/blob/master/historical_changelog.md)
- [Commits](https://github.com/smithay/wayland-rs/commits)

Updates `windows_i686_gnullvm` from 0.52.5 to 0.52.6
- [Release notes](https://github.com/microsoft/windows-rs/releases)
- [Commits](https://github.com/microsoft/windows-rs/commits)

Updates `zerocopy` from 0.7.34 to 0.7.35
- [Release notes](https://github.com/google/zerocopy/releases)
- [Changelog](https://github.com/google/zerocopy/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google/zerocopy/commits)

Updates `zerocopy-derive` from 0.7.34 to 0.7.35
- [Release notes](https://github.com/google/zerocopy/releases)
- [Changelog](https://github.com/google/zerocopy/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google/zerocopy/commits)

---
updated-dependencies:
- dependency-name: document-features
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: glam
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: patch-updates
- dependency-name: serde
  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: metal
  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: ab_glyph
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: async-trait
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: cc
  dependency-type: indirect
  update-type: version-update:semver-minor
  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: deno_unsync
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: oorandom
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: owned_ttf_parser
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: patch-updates
- dependency-name: serde_derive
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: tinyvec
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: patch-updates
- dependency-name: ttf-parser
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: patch-updates
- dependency-name: unicode-id-start
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: patch-updates
- dependency-name: uuid
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: patch-updates
- dependency-name: wayland-backend
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: windows_i686_gnullvm
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: zerocopy
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: zerocopy-derive
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update encase to resolve glam dependency issue

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Andreas Reich <r_andreas2@web.de>
2024-07-14 22:14:40 +02:00
JMS55
17fcb19425
[naga, hal] miscellaneous fixes for Atomic64 support (#5952)
In `naga:🔙hlsl`:

- Generate calls to `Interlocked{op}64` when necessary. not
  `Interlocked{op}`.

- Make atomic operations that do not produce a value emit their
  operands properly.
  
In the Naga snapshot tests:

- Adapt `atomicOps-int64-min-max.wgsl` to include cases that
  cover non-trivial atomic operation operand emitting.

In `wgpu_hal::vulkan::adapter`:

- When retrieving physical device features, be sure to include
  the `PhysicalDeviceShaderAtomicInt64Features` extending struct
  in the chain whenever the `VK_KHR_shader_atomic_int64` extension
  is available.

- Request both `shader_{buffer,shared}_int64_atomics` in the
  `PhysicalDeviceShaderAtomicInt64Features` extending struct when either of
  `wgpu_types::Features::SHADER_INT64_ATOMIC_{ALL_OPS,MIN_MAX}` is requested.

---------

Co-authored-by: Jim Blandy <jimb@red-bean.com>
2024-07-13 19:17:59 -07:00
teoxoy
6f16ea460a make the StagingBuffer implementation more robust 2024-07-12 16:33:57 +02:00
teoxoy
26f65ddffd [wgpu-hal] remove return type from Device.unmap_buffer()
It's already documented that to unmap a buffer it has to have been mapped.
Vulkan was the only backend that was returning an OOM on missing `Buffer.block` but `Buffer.map_buffer` already returns an error in this case.
2024-07-12 16:33:57 +02:00
Xiaopeng Li
349f182966
[d3d12] Drop resource before free suballocation (#5943) 2024-07-11 13:07:30 +02:00
Bruce Mitchener
ee16de1c63
clippy: Fix doc_lazy_continuation lints (#5935)
These are in nightly builds.
2024-07-11 08:44:43 +02:00
Xiaopeng Li
4349e20b8d
Expose adapter driver version for DX12 backend (#5927) 2024-07-10 16:20:23 +02:00
Andreas Reich
7c51bb4a13 Introduce hlsl-out-if-target-windows feature to Naga 2024-07-09 09:53:39 +02:00
Andreas Reich
e1913b1209 Introduce msl-out-if-target-apple feature to Naga 2024-07-09 09:53:39 +02:00
Nicolas Silva
4c6318c0d2
Expose gpu allocation configuration options (#5875)
* Expose gpu allocation configuration options

This commit adds hints to control memory allocations strategies to the configuration options. These hints allow for automatic profiles such as optimizing for performance (the default, makes sense for a game), optimizing for memory usage (typically more useful for a web browser or UI library) and specifying settings manually.

The details of gpu allocation are still in flux. The goal is to switch vulkan and metal to gpu_allocator which is currently used with d3d12. gpu_allocator will also likely receive more configuration options, in particular the ability to start with smaller memory block sizes and progressively grow the block size. So the manual settings already provision for this upcoming option. Another approach could be to wait and add the manual option after the dust settles.

The reason for providing presets and defining values in the backends is that I am convinced that optimal fonigurations should take hardware capabilities into consideration. It's a deep rabbithole, though, so that will be an exercise for later.

* changelog

* Update CHANGELOG.md

Co-authored-by: Andreas Reich <r_andreas2@web.de>

* Add a comment about not entirely knowing what we are doing

---------

Co-authored-by: Andreas Reich <r_andreas2@web.de>
2024-07-08 14:49:44 +02:00
teoxoy
9f34acd567 [wgpu-hal] return None in Adapter.surface_capabilities() if the Surface and the Adapter don't share the same WebGL2 context 2024-07-04 10:17:07 +02:00
teoxoy
7910fd8059 [wgpu-hal] require a Surface to be passed to Instance.enumerate_adapters() on WebGL2
Also makes wgpu's `enumerate_adapters()` native only.
2024-07-04 10:17:07 +02:00
Imbris
3a6814770a
Allow unconsumed inputs in fragment shaders (#5531)
* Allow unconsumed inputs in fragment shaders by removing them from vertex
outputs when generating HLSL.

Fixes https://github.com/gfx-rs/wgpu/issues/3748

* Add naga:🔙:hlsl::FragmentEntryPoint for providing information
  about the fragment entry point when generating vertex entry points via
  naga:🔙:hlsl::Writer::write. Vertex outputs not consumed by the
  fragment entry point are omitted in the final output struct.
* Add naga snapshot test for this new feature,
* Remove Features::SHADER_UNUSED_VERTEX_OUTPUT,
  StageError::InputNotConsumed, and associated validation logic.
* Make wgpu dx12 backend pass fragment shader info when generating
  vertex HLSL.
* Add wgpu regression test for allowing unconsumed inputs.

* Address review

* Add note that nesting structs for the inter-stage interface can't
  happen.
* Remove new TODO notes (some addressed and some transferred to an issue
  https://github.com/gfx-rs/wgpu/issues/5577)
* Changed issue that regression test refers to 3748 -> 5553
* Add debug_assert that binding.is_some() in hlsl writer
* Fix typos caught in CI

Also, fix compiling snapshot test when hlsl-out feature is not enabled.
2024-07-04 09:08:46 +02:00
dependabot[bot]
9d12a0a122
build(deps): bump the patch-updates group across 1 directory with 27 updates (#5895)
Bumps the patch-updates group with 24 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [bit-vec](https://github.com/contain-rs/bit-vec) | `0.6.3` | `0.7.0` |
| [bitflags](https://github.com/bitflags/bitflags) | `2.5.0` | `2.6.0` |
| [bytemuck](https://github.com/Lokathor/bytemuck) | `1.16.0` | `1.16.1` |
| [libloading](https://github.com/nagisa/rust_libloading) | `0.8.3` | `0.8.4` |
| [log](https://github.com/rust-lang/log) | `0.4.21` | `0.4.22` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.117` | `1.0.119` |
| [bit-set](https://github.com/contain-rs/bit-set) | `0.5.3` | `0.6.0` |
| [syn](https://github.com/dtolnay/syn) | `2.0.66` | `2.0.68` |
| [ab_glyph](https://github.com/alexheretic/ab-glyph) | `0.2.26` | `0.2.27` |
| [backtrace](https://github.com/rust-lang/backtrace-rs) | `0.3.72` | `0.3.73` |
| [cc](https://github.com/rust-lang/cc-rs) | `1.0.99` | `1.0.103` |
| [clap](https://github.com/clap-rs/clap) | `4.5.6` | `4.5.8` |
| [deno_unsync](https://github.com/denoland/deno_unsync) | `0.3.4` | `0.3.5` |
| [derive_more](https://github.com/JelteF/derive_more) | `0.99.17` | `0.99.18` |
| [either](https://github.com/rayon-rs/either) | `1.12.0` | `1.13.0` |
| [lazy_static](https://github.com/rust-lang-nursery/lazy-static.rs) | `1.4.0` | `1.5.0` |
| [memchr](https://github.com/BurntSushi/memchr) | `2.7.2` | `2.7.4` |
| [miniz_oxide](https://github.com/Frommi/miniz_oxide) | `0.7.3` | `0.7.4` |
| [num-bigint](https://github.com/rust-num/num-bigint) | `0.4.5` | `0.4.6` |
| [polling](https://github.com/smol-rs/polling) | `3.7.1` | `3.7.2` |
| [proc-macro2](https://github.com/dtolnay/proc-macro2) | `1.0.85` | `1.0.86` |
| [tinyvec](https://github.com/Lokathor/tinyvec) | `1.6.0` | `1.6.1` |
| [url](https://github.com/servo/rust-url) | `2.5.0` | `2.5.2` |
| [uuid](https://github.com/uuid-rs/uuid) | `1.8.0` | `1.9.1` |



Updates `bit-vec` from 0.6.3 to 0.7.0
- [Commits](https://github.com/contain-rs/bit-vec/commits)

Updates `bitflags` from 2.5.0 to 2.6.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.5.0...2.6.0)

Updates `bytemuck` from 1.16.0 to 1.16.1
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](https://github.com/Lokathor/bytemuck/compare/v1.16.0...v1.16.1)

Updates `libloading` from 0.8.3 to 0.8.4
- [Commits](https://github.com/nagisa/rust_libloading/compare/0.8.3...0.8.4)

Updates `log` from 0.4.21 to 0.4.22
- [Release notes](https://github.com/rust-lang/log/releases)
- [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/log/compare/0.4.21...0.4.22)

Updates `serde_json` from 1.0.117 to 1.0.119
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.117...v1.0.119)

Updates `bit-set` from 0.5.3 to 0.6.0
- [Release notes](https://github.com/contain-rs/bit-set/releases)
- [Commits](https://github.com/contain-rs/bit-set/commits)

Updates `syn` from 2.0.66 to 2.0.68
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/2.0.66...2.0.68)

Updates `ab_glyph` from 0.2.26 to 0.2.27
- [Release notes](https://github.com/alexheretic/ab-glyph/releases)
- [Commits](https://github.com/alexheretic/ab-glyph/compare/ab-glyph-0.2.26...ab-glyph-0.2.27)

Updates `backtrace` from 0.3.72 to 0.3.73
- [Release notes](https://github.com/rust-lang/backtrace-rs/releases)
- [Commits](https://github.com/rust-lang/backtrace-rs/compare/0.3.72...0.3.73)

Updates `cc` from 1.0.99 to 1.0.103
- [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/1.0.99...cc-v1.0.103)

Updates `clap` from 4.5.6 to 4.5.8
- [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.6...v4.5.8)

Updates `clap_builder` from 4.5.6 to 4.5.8
- [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.6...v4.5.8)

Updates `clap_derive` from 4.5.5 to 4.5.8
- [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.5...v4.5.8)

Updates `deno_unsync` from 0.3.4 to 0.3.5
- [Commits](https://github.com/denoland/deno_unsync/commits)

Updates `derive_more` from 0.99.17 to 0.99.18
- [Release notes](https://github.com/JelteF/derive_more/releases)
- [Changelog](https://github.com/JelteF/derive_more/blob/v0.99.18/CHANGELOG.md)
- [Commits](https://github.com/JelteF/derive_more/compare/v0.99.17...v0.99.18)

Updates `either` from 1.12.0 to 1.13.0
- [Commits](https://github.com/rayon-rs/either/compare/1.12.0...1.13.0)

Updates `lazy_static` from 1.4.0 to 1.5.0
- [Release notes](https://github.com/rust-lang-nursery/lazy-static.rs/releases)
- [Commits](https://github.com/rust-lang-nursery/lazy-static.rs/compare/1.4.0...1.5.0)

Updates `memchr` from 2.7.2 to 2.7.4
- [Commits](https://github.com/BurntSushi/memchr/compare/2.7.2...2.7.4)

Updates `miniz_oxide` from 0.7.3 to 0.7.4
- [Changelog](https://github.com/Frommi/miniz_oxide/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Frommi/miniz_oxide/commits)

Updates `num-bigint` from 0.4.5 to 0.4.6
- [Changelog](https://github.com/rust-num/num-bigint/blob/master/RELEASES.md)
- [Commits](https://github.com/rust-num/num-bigint/compare/num-bigint-0.4.5...num-bigint-0.4.6)

Updates `object` from 0.35.0 to 0.36.1
- [Changelog](https://github.com/gimli-rs/object/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gimli-rs/object/compare/0.35.0...0.36.1)

Updates `polling` from 3.7.1 to 3.7.2
- [Release notes](https://github.com/smol-rs/polling/releases)
- [Changelog](https://github.com/smol-rs/polling/blob/master/CHANGELOG.md)
- [Commits](https://github.com/smol-rs/polling/compare/v3.7.1...v3.7.2)

Updates `proc-macro2` from 1.0.85 to 1.0.86
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.85...1.0.86)

Updates `tinyvec` from 1.6.0 to 1.6.1
- [Changelog](https://github.com/Lokathor/tinyvec/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Lokathor/tinyvec/compare/v1.6.0...v1.6.1)

Updates `url` from 2.5.0 to 2.5.2
- [Release notes](https://github.com/servo/rust-url/releases)
- [Commits](https://github.com/servo/rust-url/compare/v2.5.0...v2.5.2)

Updates `uuid` from 1.8.0 to 1.9.1
- [Release notes](https://github.com/uuid-rs/uuid/releases)
- [Commits](https://github.com/uuid-rs/uuid/compare/1.8.0...1.9.1)

---
updated-dependencies:
- dependency-name: bit-vec
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: patch-updates
- dependency-name: bitflags
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: patch-updates
- dependency-name: bytemuck
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: libloading
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: log
  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: bit-set
  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: ab_glyph
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: backtrace
  dependency-type: indirect
  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: clap_derive
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: deno_unsync
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: derive_more
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: either
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: patch-updates
- dependency-name: lazy_static
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: patch-updates
- dependency-name: memchr
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: miniz_oxide
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: num-bigint
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: object
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: patch-updates
- dependency-name: polling
  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: tinyvec
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: url
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: uuid
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: patch-updates
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-01 10:51:47 +02:00
Nicolas Silva
e92e543b7b Allow clippy::pattern_type_mismatch in hal
For the same reasons we allow it in core.
2024-06-25 15:11:47 +02:00
teoxoy
333ed78529 [gl] reorder program_cache & context lock acquisition
We are using `program_cache.try_lock()` when creting pipelines which is covered by a guard gotten from `context.lock()`. For the `.try_lock()` to always succeed we need to make sure that the other lock acquisitions are also covered by a `context.lock()`.

The `wgpu_examples::hello_compute::tests::multithreaded_compute` test has been failing intermittently in CI due to this.
2024-06-24 16:57:06 +02:00
Nicolas Silva
1de04926b1
Add infrastructure for counting and reporting internal resources (#5708)
* Add an optional system for counting and reporting internal resources and events
* Count API objects in wgpu-hal
* Expose internal counters in wgpu-core and wgpu.
2024-06-24 11:20:10 +02:00
Jubilee Young
1ced6c6165 Make compile_fxc accept full_stage: &CStr 2024-06-18 10:34:20 +02:00
Erich Gubler
b9e787e667 refactor: satisfy clippy::never_loop 2024-06-17 05:26:03 -04:00
Jubilee
d309bba8fc
Do not feed &"" to D3DCompile (#5812)
A recent change by rustc, now in 1.79-stable, makes empty str constants
point to the same location: 0x01. This is an optimization of sorts, not
stable behavior. Code must not rely on constants having stable addresses
nor should it pass &"" to APIs expecting CStrs or NULL addresses.
D3DCompile will segfault if you give it such a pointer, or worse:
read random garbage addresses!

Pass the NULL pointer to D3DCompile if wgpu lacks a decent CString.

refs:
- https://learn.microsoft.com/en-us/windows/win32/api/d3dcompiler/nf-d3dcompiler-d3dcompile

Co-authored-by: Jan Hohenheim <jan@hohenheim.ch>
Co-authored-by: Brezak <bezak.adam@proton.me>
2024-06-14 14:34:58 +02:00
Jim Blandy
3b5051071a [hal] Document buffer mapping and coherence. 2024-06-13 20:47:08 -07:00
dependabot[bot]
09acceebca
build(deps): bump the patch-updates group with 12 updates (#5790)
Bumps the patch-updates group with 12 updates:

| Package | From | To |
| --- | --- | --- |
| [glutin_wgl_sys](https://github.com/rust-windowing/glutin) | `0.5.0` | `0.6.0` |
| [anstyle-query](https://github.com/rust-cli/anstyle) | `1.0.3` | `1.1.0` |
| [cc](https://github.com/rust-lang/cc-rs) | `1.0.98` | `1.0.99` |
| [clap](https://github.com/clap-rs/clap) | `4.5.4` | `4.5.6` |
| [clap_builder](https://github.com/clap-rs/clap) | `4.5.2` | `4.5.6` |
| [clap_derive](https://github.com/clap-rs/clap) | `4.5.4` | `4.5.5` |
| [clap_lex](https://github.com/clap-rs/clap) | `0.7.0` | `0.7.1` |
| [regex](https://github.com/rust-lang/regex) | `1.10.4` | `1.10.5` |
| [unicode-width](https://github.com/unicode-rs/unicode-width) | `0.1.12` | `0.1.13` |
| [utf8parse](https://github.com/alacritty/vte) | `0.2.1` | `0.2.2` |
| [windows-result](https://github.com/microsoft/windows-rs) | `0.1.1` | `0.1.2` |
| [xkeysym](https://github.com/notgull/xkeysym) | `0.2.0` | `0.2.1` |


Updates `glutin_wgl_sys` from 0.5.0 to 0.6.0
- [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 `anstyle-query` from 1.0.3 to 1.1.0
- [Commits](https://github.com/rust-cli/anstyle/compare/anstyle-query-v1.0.3...anstyle-query-v1.1.0)

Updates `cc` from 1.0.98 to 1.0.99
- [Release notes](https://github.com/rust-lang/cc-rs/releases)
- [Commits](https://github.com/rust-lang/cc-rs/compare/1.0.98...1.0.99)

Updates `clap` from 4.5.4 to 4.5.6
- [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.4...v4.5.6)

Updates `clap_builder` from 4.5.2 to 4.5.6
- [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.2...v4.5.6)

Updates `clap_derive` from 4.5.4 to 4.5.5
- [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.4...v4.5.5)

Updates `clap_lex` from 0.7.0 to 0.7.1
- [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_lex-v0.7.0...clap_lex-v0.7.1)

Updates `regex` from 1.10.4 to 1.10.5
- [Release notes](https://github.com/rust-lang/regex/releases)
- [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/regex/compare/1.10.4...1.10.5)

Updates `unicode-width` from 0.1.12 to 0.1.13
- [Commits](https://github.com/unicode-rs/unicode-width/compare/v0.1.12...v0.1.13)

Updates `utf8parse` from 0.2.1 to 0.2.2
- [Release notes](https://github.com/alacritty/vte/releases)
- [Changelog](https://github.com/alacritty/vte/blob/master/CHANGELOG.md)
- [Commits](https://github.com/alacritty/vte/compare/utf8parse_v0.2.1...utf8parse_v0.2.2)

Updates `windows-result` from 0.1.1 to 0.1.2
- [Release notes](https://github.com/microsoft/windows-rs/releases)
- [Commits](https://github.com/microsoft/windows-rs/commits)

Updates `xkeysym` from 0.2.0 to 0.2.1
- [Release notes](https://github.com/notgull/xkeysym/releases)
- [Changelog](https://github.com/rust-windowing/xkeysym/blob/master/CHANGELOG.md)
- [Commits](https://github.com/notgull/xkeysym/compare/v0.2.0...v0.2.1)

---
updated-dependencies:
- dependency-name: glutin_wgl_sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: patch-updates
- dependency-name: anstyle-query
  dependency-type: indirect
  update-type: version-update:semver-minor
  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: clap_derive
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: clap_lex
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: regex
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: unicode-width
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: utf8parse
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: windows-result
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: xkeysym
  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>
2024-06-10 09:51:27 +02:00
Atlas Dostal
abba12ae4e Add support for 64 bit integer atomic operations in shaders.
Add the following flags to `wgpu_types::Features`:

- `SHADER_INT64_ATOMIC_ALL_OPS` enables all atomic operations on `atomic<i64>` and
  `atomic<u64>` values.

- `SHADER_INT64_ATOMIC_MIN_MAX` is a subset of the above, enabling only
  `AtomicFunction::Min` and `AtomicFunction::Max` operations on `atomic<i64>` and
  `atomic<u64>` values in the `Storage` address space. These are the only 64-bit
  atomic operations available on Metal as of 3.1.

Add corresponding flags to `naga::valid::Capabilities`. These are supported by the
WGSL front end, and all Naga backends.

Platform support:

- On Direct3d 12, in `D3D12_FEATURE_DATA_D3D12_OPTIONS9`, if
  `AtomicInt64OnTypedResourceSupported` and `AtomicInt64OnGroupSharedSupported` are
  both available, then both wgpu features described above are available.

- On Metal, `SHADER_INT64_ATOMIC_MIN_MAX` is available on Apple9 hardware, and on
  hardware that advertises both Apple8 and Mac2 support. This also requires Metal
  Shading Language 2.4 or later. Metal does not yet support the more general
  `SHADER_INT64_ATOMIC_ALL_OPS`.

- On Vulkan, if the `VK_KHR_shader_atomic_int64` extension is available with both the
  `shader_buffer_int64_atomics` and `shader_shared_int64_atomics` features, then both
  wgpu features described above are available.
2024-06-08 18:36:26 -07:00
dependabot[bot]
dd86dcf8f8
build(deps): bump the patch-updates group with 19 updates (#5770)
Bumps the patch-updates group with 19 updates:

| Package | From | To |
| --- | --- | --- |
| [parking_lot](https://github.com/Amanieu/parking_lot) | `0.12.2` | `0.12.3` |
| [serde](https://github.com/serde-rs/serde) | `1.0.202` | `1.0.203` |
| [tokio](https://github.com/tokio-rs/tokio) | `1.37.0` | `1.38.0` |
| [syn](https://github.com/dtolnay/syn) | `2.0.65` | `2.0.66` |
| [backtrace](https://github.com/rust-lang/backtrace-rs) | `0.3.71` | `0.3.72` |
| [bytemuck_derive](https://github.com/Lokathor/bytemuck) | `1.6.0` | `1.7.0` |
| [crc32fast](https://github.com/srijs/rust-crc32fast) | `1.4.0` | `1.4.2` |
| [deno_unsync](https://github.com/denoland/deno_unsync) | `0.3.3` | `0.3.4` |
| [gimli](https://github.com/gimli-rs/gimli) | `0.28.1` | `0.29.0` |
| [objc-sys](https://github.com/madsmtm/objc2) | `0.3.3` | `0.3.5` |
| [object](https://github.com/gimli-rs/object) | `0.32.2` | `0.35.0` |
| [plotters](https://github.com/plotters-rs/plotters) | `0.3.5` | `0.3.6` |
| [plotters-backend](https://github.com/plotters-rs/plotters) | `0.3.5` | `0.3.6` |
| [plotters-svg](https://github.com/plotters-rs/plotters) | `0.3.5` | `0.3.6` |
| [polling](https://github.com/smol-rs/polling) | `3.7.0` | `3.7.1` |
| [proc-macro2](https://github.com/dtolnay/proc-macro2) | `1.0.83` | `1.0.85` |
| [serde_derive](https://github.com/serde-rs/serde) | `1.0.202` | `1.0.203` |
| [tokio-macros](https://github.com/tokio-rs/tokio) | `2.2.0` | `2.3.0` |
| [wayland-backend](https://github.com/smithay/wayland-rs) | `0.3.3` | `0.3.4` |


Updates `parking_lot` from 0.12.2 to 0.12.3
- [Changelog](https://github.com/Amanieu/parking_lot/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Amanieu/parking_lot/compare/0.12.2...0.12.3)

Updates `serde` from 1.0.202 to 1.0.203
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.202...v1.0.203)

Updates `tokio` from 1.37.0 to 1.38.0
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.37.0...tokio-1.38.0)

Updates `syn` from 2.0.65 to 2.0.66
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/2.0.65...2.0.66)

Updates `backtrace` from 0.3.71 to 0.3.72
- [Release notes](https://github.com/rust-lang/backtrace-rs/releases)
- [Commits](https://github.com/rust-lang/backtrace-rs/compare/0.3.71...0.3.72)

Updates `bytemuck_derive` from 1.6.0 to 1.7.0
- [Changelog](https://github.com/Lokathor/bytemuck/blob/main/changelog.md)
- [Commits](https://github.com/Lokathor/bytemuck/compare/bytemuck_derive-v1.6.0...bytemuck_derive-v1.7.0)

Updates `crc32fast` from 1.4.0 to 1.4.2
- [Commits](https://github.com/srijs/rust-crc32fast/compare/v1.4.0...v1.4.2)

Updates `deno_unsync` from 0.3.3 to 0.3.4
- [Commits](https://github.com/denoland/deno_unsync/commits)

Updates `gimli` from 0.28.1 to 0.29.0
- [Changelog](https://github.com/gimli-rs/gimli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gimli-rs/gimli/compare/0.28.1...0.29.0)

Updates `objc-sys` from 0.3.3 to 0.3.5
- [Commits](https://github.com/madsmtm/objc2/compare/objc-sys-0.3.3...objc-sys-0.3.5)

Updates `object` from 0.32.2 to 0.35.0
- [Changelog](https://github.com/gimli-rs/object/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gimli-rs/object/compare/0.32.2...0.35.0)

Updates `plotters` from 0.3.5 to 0.3.6
- [Changelog](https://github.com/plotters-rs/plotters/blob/master/CHANGELOG.md)
- [Commits](https://github.com/plotters-rs/plotters/compare/v0.3.5...v0.3.6)

Updates `plotters-backend` from 0.3.5 to 0.3.6
- [Changelog](https://github.com/plotters-rs/plotters/blob/master/CHANGELOG.md)
- [Commits](https://github.com/plotters-rs/plotters/compare/v0.3.5...v0.3.6)

Updates `plotters-svg` from 0.3.5 to 0.3.6
- [Changelog](https://github.com/plotters-rs/plotters/blob/master/CHANGELOG.md)
- [Commits](https://github.com/plotters-rs/plotters/compare/v0.3.5...v0.3.6)

Updates `polling` from 3.7.0 to 3.7.1
- [Release notes](https://github.com/smol-rs/polling/releases)
- [Changelog](https://github.com/smol-rs/polling/blob/master/CHANGELOG.md)
- [Commits](https://github.com/smol-rs/polling/compare/v3.7.0...v3.7.1)

Updates `proc-macro2` from 1.0.83 to 1.0.85
- [Release notes](https://github.com/dtolnay/proc-macro2/releases)
- [Commits](https://github.com/dtolnay/proc-macro2/compare/1.0.83...1.0.85)

Updates `serde_derive` from 1.0.202 to 1.0.203
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.202...v1.0.203)

Updates `tokio-macros` from 2.2.0 to 2.3.0
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-macros-2.2.0...tokio-macros-2.3.0)

Updates `wayland-backend` from 0.3.3 to 0.3.4
- [Release notes](https://github.com/smithay/wayland-rs/releases)
- [Changelog](https://github.com/Smithay/wayland-rs/blob/master/historical_changelog.md)
- [Commits](https://github.com/smithay/wayland-rs/commits)

---
updated-dependencies:
- dependency-name: parking_lot
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: tokio
  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: backtrace
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: bytemuck_derive
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: patch-updates
- dependency-name: crc32fast
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: deno_unsync
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: gimli
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: patch-updates
- dependency-name: objc-sys
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: object
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: patch-updates
- dependency-name: plotters
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: plotters-backend
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: plotters-svg
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: polling
  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: serde_derive
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: tokio-macros
  dependency-type: indirect
  update-type: version-update:semver-minor
  dependency-group: patch-updates
- dependency-name: wayland-backend
  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>
2024-06-03 09:20:29 +02:00
Vecvec
7954a6bd3e
Add missing acceleration structure buffer flag (#5760)
* add the missing acceleration structure buffer flag

* fmt
2024-06-02 07:59:41 +00:00
Connor Fitzgerald
c7458638d1
[hal/vk] Rework Submission and Surface Synchronization (#5681)
Fix two major synchronization issues in `wgpu_val::vulkan`:

- Properly order queue command buffer submissions. Due to Mesa bugs, two semaphores are required even though the Vulkan spec says that only one should be necessary.

- Properly manage surface texture acquisition and presentation:

    - Acquiring a surface texture can return while the presentation engine is still displaying the texture. Applications must wait for a semaphore to be signaled before using the acquired texture.

    - Presenting a surface texture requires a semaphore to ensure that drawing is complete before presentation occurs.

Co-authored-by: Jim Blandy <jimb@red-bean.com>
2024-05-30 13:53:34 -07:00
Brad Werth
9b7a965667 Add an experimental vertex pulling flag to Metal pipelines.
This proves a flag in msl::PipelineOptions that attempts to write all
Metal vertex entry points to use a vertex pulling technique. It does
this by:

1) Forcing the _buffer_sizes structure to be generated for all vertex
entry points. The structure has additional buffer_size members that
contain the byte sizes of the vertex buffers.
2) Adding new args to vertex entry points for the vertex id and/or
the instance id and for the bound buffers. If there is an existing
@builtin(vertex_index) or @builtin(instance_index) param, then no
duplicate arg is created.
3) Adding code at the beginning of the function for vertex entry points
to compare the vertex id or instance id against the lengths of all the
bound buffers, and force an early-exit if the bounds are violated.
4) Extracting the raw bytes from the vertex buffer(s) and unpacking
those bytes into the bound attributes with the expected types.
5) Replacing the varyings input and instead using the unpacked
attributes to fill any structs-as-args that are rebuilt in the entry
point.

A new naga test is added which exercises this flag and demonstrates the
effect of the transform. The msl generated by this test passes
validation.

Eventually this transformation will be the default, always-on behavior
for Metal pipelines, though the flag may remain so that naga
translation tests can be run with and without the tranformation.
2024-05-30 13:08:59 +02:00
Mads Marquart
60a14c67fb
Remove the link Cargo feature (#5752) 2024-05-29 15:55:33 -07:00
Valaphee The Meerkat
23307e1dc3
gles: Return the version as driver_info (#5753) 2024-05-29 14:01:32 -04:00
Vladas Zakrevskis
de809c8f96
Fix missing family check flag (#5754)
Co-authored-by: Jim Blandy <jimb@red-bean.com>
Co-authored-by: Xiaopeng Li <x.friday@outlook.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>
Co-authored-by: Valaphee The Meerkat <32491319+valaphee@users.noreply.github.com>
Co-authored-by: Andreas Reich <r_andreas2@web.de>
2024-05-29 14:00:32 -04:00
Bruce Mitchener
b4abd65659
chore: Fix more unused_qualifications (#5746) 2024-05-26 08:37:53 +02:00
Bruce Mitchener
7368e5107c
chore: Fix legacy_numeric_constants lints (#5747)
These are being deprecated in the future in favor of the associated
constants (which are already being used in some code here), so this
consistently uses the preferred forms.
2024-05-26 08:36:19 +02:00
Bruce Mitchener
5da72a94d5
Prefer default-features instead of default_features (#5745) 2024-05-26 04:33:02 +00:00
Jim Blandy
9e0fd17726
[hal] Document resource destruction methods, and a few other things. (#5627)
Document some more safety expectations for
- resource destruction methods
- `CommandEncoder` methods
- `Queue::submit`

Document `Fence` creation a bit.

Document the `Queue` trait a bit.

Document `vulkan` shader module handling a bit.
2024-05-23 22:39:56 +00:00
Daniel McNab
4902e470ce
Pipeline cache API and implementation for Vulkan (#5319)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2024-05-16 13:52:56 +00:00
Connor Fitzgerald
7078b0a061
Fix Subgroup Ops on VK 1.2 Device (#5624) 2024-05-14 14:21:53 +00:00
Nick Guletskii
65d8c94afd
Issue SetDrawColorBuffers before clearing buffers in GLES, use clear_buffer_f32_slice instead of clear (#5666)
* Issue SetDrawColorBuffers commands before issuing ClearColor

This is necessary for glClearBuffer calls to work correctly on some machines (e.g. AMD Renoir graphics running on Linux). Without this, glClearBuffer calls are ignored.

* Use clear_buffer_f32_slice instead of gl.clear to suppress WebGL warnings

This fixes the following WebGL warning: "WebGL warning: drawBuffers: `buffers[i]` must be NONE or COLOR_ATTACHMENTi."

When using native OpenGL, it is acceptable to call glDrawBuffers with an array of buffers where i != COLOR_ATTACHMENTi. In WebGL, this is not allowed.

* Run cargo fmt

* Add changes for PR GH-5666 to the CHANGELOG
2024-05-14 05:57:18 -04:00
Marijn Suijten
8879733875
[wgpu-hal] Upgrade to ash 0.38 (#5504) 2024-05-13 11:57:44 -04:00
Erich Gubler
ca91744955 chore: apply unused_qualifications lint via cargo +1.78.0 fix && cargo fmt 2024-05-13 10:10:54 -04:00
Erich Gubler
f1b06f55ce chore: satisfy clippy::assigning_clones 2024-05-13 10:10:54 -04:00
Andreas Reich
452cf24fa1
Remove unnecessary Cargo.toml dependencies via cargo machete (#5692) 2024-05-12 19:05:00 -04:00
bjorn3
fa48562229
Avoid introducing spurious features for optional dependencies (#5691)
* Avoid introducing spurious features for optional dependencies

If a feature depends on an optional dependency without using the dep:
prefix, a feature with the same name as the optional dependency is
introduced. This feature almost certainly won't have any effect when
enabled other than increasing compile times and polutes the feature list
shown by cargo add. Consistently use dep: for all optional dependencies
to avoid this problem.

* Add changelog entry
2024-05-12 08:45:35 +02:00
dependabot[bot]
f4b8b15df3
build(deps): bump the patch-updates group across 1 directory with 26 updates (#5673)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2024-05-09 14:26:38 -04:00
Valaphee The Meerkat
8084eb6c8f
Seperate GLES and GL version selection (#5657)
* Seperate GLES and GL version selection

* Add info when gles minor version is specified and not used
2024-05-04 21:42:45 +02:00
Valaphee The Meerkat
565a0310e9
Fix OpenGL non-srgb on Linux (#5642) 2024-05-03 22:29:27 +02:00
Elabajaba
bdf30fa45a
fix halmark (#5635) 2024-04-29 20:45:37 +00:00
Connor Fitzgerald
4521502da6
Release v0.20.0 (#5619) 2024-04-28 18:06:35 -04:00
dependabot[bot]
05cfdececc
build(deps): bump the patch-updates group with 5 updates (#5605)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2024-04-28 17:44:12 -04:00
Jim Blandy
1ea96391ea
[hal] Document Api::Fence, its users, and its Vulkan impl. (#5618)
Also, rename `wgpu_hal::vulkan::Fence::check_active` argument to
`last_completed`, and explain better its rationale.
2024-04-28 05:46:06 +00:00
Jim Blandy
4af2e7b8fb [hal] Document Queue::submit ordering guarantees a bit. 2024-04-27 22:14:23 -07:00
Jim Blandy
a2cd2b92b3
[hal] Fix cargo doc --document-private-items. Check in CI. (#5617) 2024-04-27 20:21:29 +00:00
vero
34aab34c00
Fix int64 metal detection (#5604) 2024-04-25 03:13:26 +00:00
Jim Blandy
253e65c9a4 [hal doc] Describe wgpu-hal's validation principles. 2024-04-24 14:43:12 -07:00
Jim Blandy
259b473964 [hal doc] Describe wgpu-hal's main traits in the top-level docs. 2024-04-24 14:43:12 -07:00
Jim Blandy
5bb9724636 [hal doc] Consistently use wgpu-hal for the crate name. 2024-04-24 14:43:12 -07:00
Luna
7840e75bf7
Add check to ensure vulkan::CommandEncoder::discard_encoding is not called multiple times in a row (#5557)
Document that `wgpu_hal::CommandEncoder::discard_encoding` must not be called multiple times.

Assert in `wgpu_hal::vulkan::CommandEncoder::discard_encoding` that encoding is actually in progress.

Fixes #5255.
2024-04-22 19:39:08 +00:00
Valaphee The Meerkat
53dd49f839
Allow ETC2 in OpenGL if ES3 compatible (#5568)
* Allow ETC on OpenGL if ES3 compatible

* Update changelog
2024-04-20 15:38:53 +02:00
vero
6941e30b37
Cleanup ShaderModel detection usage (#5567) 2024-04-20 10:06:09 +02:00
dependabot[bot]
1735968969
build(deps): bump the patch-updates group with 23 updates (#5550)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-17 20:14:55 -04:00
Daniel McNab
965b00c06b
Allow configuring whether workgroup memory is zero initialised (#5508) 2024-04-17 15:50:31 -04: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
Valaphee The Meerkat
0dc9dd6bec
Prefer OpenGL over OpenGL ES (#5482)
* Prefer OpenGL over OpenGL ES

* Fix sRGB on egl

* Check if OpenGL is supported

* Add changelog entry

* Remove expected failure for OpenGL Non-ES,  add comment explaining FRAMEBUFFER_SRGB, add driver info to AdapterInfo

* Fix draw indexed

* CI host doesn't seem to support Rg8Snorm and Rgb9eUfloat clearing
2024-04-16 22:57:33 +02:00
Jim Blandy
c9212c6d46 [core] Document command encoding and command buffers.
Flesh out the documentation for `wgpu_core`'s `CommandBuffer`,
`CommandEncoder`, and associated types.

Allow doc links to private items. `wgpu-core` isn't entirely
user-facing, so it's useful to document internal items.
2024-04-14 20:53:15 -07:00
Jim Blandy
5b8be97a88
[hal] Update crate documentation and wgpu-hal/README.md. (#5524)
Co-authored-by: Andreas Reich <r_andreas2@web.de>
2024-04-14 18:34:15 +00:00
Andreas Reich
82dead09e4
Bump wgpu-core/hal/types & naga versions to match latest released patch versions (#5404) 2024-04-09 00:33:43 -04:00
vero
911baf3e8c
Add DirectX ShaderModel 6.1-6.7 detection (#5498) 2024-04-06 11:35:59 +02:00
vero
1c48a23cff
Add Metal 3.0 and 3.1 detection (#5497) 2024-04-05 19:22:33 +02:00
teoxoy
7df0aa6364 move the burden of evaluating override-expressions to users of naga's API 2024-04-05 18:07:41 +02:00
teoxoy
2929ec333c [spv/msl/hlsl-out] support pipeline constant value replacements 2024-04-05 18:07:41 +02:00
teoxoy
7ce422c57a remove naga's clone feature 2024-04-05 18:07:41 +02:00
teoxoy
3bda381812 add pipeline constants plumbing 2024-04-05 18:07:41 +02:00
Chase MacDonnell
3db0e46f7d
Implement Unorm10_10_10_2 VertexFormat (#5477) 2024-04-03 19:43:54 +00:00
JMS55
ed843f8029
Add more hal methods (#5452)
* Add return value to Texture::as_hal()

* Add TextureView::as_hal()

* Add CommandEncoder::as_hal_mut()

* Add changelog

* Add TextureView::raw_handle()

* Add CommandEncoder::raw_handle()

* Add additional docs for command_encoder_as_hal_mut
2024-04-03 00:37:18 +02:00
Jim Blandy
e30e300436 [hal/vulkan] Document more PhysicalDeviceFeatures-related things.
Improve documentation for:
- `PhysicalDeviceFeatures::from_extensions_and_requested_features`
- `PhysicalDeviceFeatures::to_wgpu`
- `Adapter::physical_device_features`
2024-04-02 12:54:00 +02:00
Jim Blandy
7954bb66a5 Rename PhysicalDeviceCapabilities to PhysicalDeviceProperties.
Since this struct's role is to hold all the relevant "VkFooProperties"
structs we can get about a given physical device, and "capabilities"
means something else in Vulkan (SPIR-V capabilities), it seems that
`PhysicalDeviceProperties` is a better name.
2024-04-02 12:49:36 +02:00
Erich Gubler
d12e89c483 fix(metal): don't depend on BG{,L} entry order
This isn't guaranteed by `wgpu-core`; we should try to match by binding
slot index instead.
2024-04-01 17:51:36 -04:00
Erich Gubler
74f514ca6b fix(gles): don't depend on BG{,L} entry order
This isn't guaranteed by `wgpu-core`; we should try to match by binding
slot index instead.
2024-04-01 17:51:36 -04:00
Erich Gubler
4fa2fbb5aa fix(dx12): don't depend on BG{,L} entry order
This isn't guaranteed by `wgpu-core`; we should try to match by binding
slot index instead.
2024-04-01 17:51:36 -04:00
Jim Blandy
18f721561a
[hal/vulkan] Document physical device info structures. (#5451)
Flesh out documentation for `PhysicalDeviceFeatures` and
`PhysicalDeviceCapabilities`.
2024-03-29 14:53:01 +01:00
Jim Blandy
ec1484b106 [hal/vulkan] Use Option::insert and avoid an unwrap.
In `wgpu_hal::vulkan::InstanceShared::inspect`, handle
`PhysicalDeviceCapabilities::maintenance_3` more like the way we
handle other extension-provided physical device properties.
Specifically, use `Option::insert` to populate the `Option` and borrow
a mutable reference to its value, rather than calling
`.as_mut().unwrap()`.

This change should have no observable effect on behavior. It simply
replaces a runtime check (`unwrap`) with a statically checked
borrow (`insert`).
2024-03-29 11:54:04 +01:00
lylythechosenone
136ca1500e
[wgpu-hal] migrate A from a generic parameter to an associated type (#5427)
This is to facilitate #5124.
2024-03-23 10:28:49 +01:00
dependabot[bot]
e04a9f4c6f
build(deps): bump the patch-updates group with 29 updates (#5376)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-14 13:00:43 -04:00
vero
4e6f873da5
Add shader I64 and U64 support (#5154)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2024-03-12 12:34:06 +01:00
Eshed Schacham
8e15707631
gles: fix crash when holding multiple devices on wayland/surfaceless. (#5351) 2024-03-10 21:12:51 +01:00
Nathan Adams
f78e2f7800
GL actually supports DEPTH32FLOAT_STENCIL8 (#5370) 2024-03-10 20:56:58 +01:00
Nathan Adams
2234fd681d
Cache MAX_SAMPLES on gles backend (#5346) 2024-03-09 10:16:31 +01:00
Nathan Adams
f86898ffeb
Don't create shader-clear program on GLES if it's not needed (#5348)
* Store GLES shader clear program in its own struct

* Make shader_clear_program optional on GLES, only created if needed
2024-03-08 20:36:12 +01:00
Daniel McNab
74238e2d58 Fix clippy error 2024-03-06 12:47:42 -08:00
Daniel McNab
4e851067dd Don't depend on validation layers for setting object names 2024-03-06 12:47:42 -08:00
teoxoy
9c9418e84a [wgpu-hal] make android dependencies optional based on features 2024-03-04 15:03:50 +01:00
Erik Živković
19cc9d9776
Revert "Add OpenGL support for TEXTURE_FORMAT_16BIT_NORM on supported versions (#5330)" (#5339)
This reverts commit 352cb3d40b.
2024-03-04 09:19:57 +01:00
Erik Živković
352cb3d40b
Add OpenGL support for TEXTURE_FORMAT_16BIT_NORM on supported versions (#5330) 2024-03-03 21:38:38 +00:00
Erik Živković
f0ed4cf520
Add support for running on OpenGL 4.1 with a core profile on macOS (#5331)
When running wgpu with an OpenGL context on macOS that is created with a core
profile and with the forward-compatibility bit set, the MAX_VARYING_COMPONENTS
constant returns 0 when queried. The default value is 60, so we return the
default value if the query returns 0.

We also need to use `#version 140` on macOS since `#version 130` isn't accepted.
Since `#version 140` should be available from OpenGL 3.1, we use that everywhere.
That way we don't need any specific macOS flags or features.
2024-03-03 22:22:20 +01:00
Eshed Schacham
2d8d045453
wgpu-hal: add ndk-sys dependency to fix linking error. (#5326) 2024-03-01 21:16:09 +00:00
dependabot[bot]
744454b9e2
Bump Many Dependencies and MSRV (#5241)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2024-02-27 14:43:05 -05:00
David Stern
23392c5228
Try to load libX11.so.6 in addition to libX11.so. (#5307) 2024-02-27 12:15:13 -05:00
Nicolas Silva
66c7e98ad7
Add feature flags in hal to panic when running into some types of errors (#5273) 2024-02-21 11:35:24 -05:00
Connor Fitzgerald
910fb7c341
Remove GPU based validation in Tests (#5271)
* Remove GPU based validation in Tests

* Lol Typo
2024-02-19 17:04:03 -05:00
Bartłomiej Maryńczak
2e9ee0aa56
[wgpu-hal.gles] Error log for failed GLES heuristics (#5266)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2024-02-19 20:33:47 +00:00
Erich Gubler
754d93a4a7 fix(gles): discard cmd. enc. buf. on drop 2024-02-15 10:45:32 -05:00
Erich Gubler
2b487724f2 fix(dx12): discard cmd. enc. buf. on drop 2024-02-15 10:45:32 -05:00
Andreas Reich
f350f28c35
Separate native-only feature for wgpu::CommandEncoder::write_timestamp (#5188)
* split out TIMESTAMP_QUERY_INSIDE_ENCODERS from TIMESTAMP_QUERY

* changelog entry

* update changelog change number

* fix web warnings

* single line changelog

* note on followup issue
2024-02-13 16:03:33 +00:00
Erich Gubler
31ac63ce3e feat(vulkan): enable GPU-based validation for Vulkan backend
If [`VK_LAYER_KHRONOS_validation`] is present, and it supports
[`VK_EXT_validation_features`], we can configure it with another instance
creation info. element of type [`VkValidationFeaturesEXT`] to enable
GPU-based validation. Wire `InstanceFlags::GPU_BASED_VALIDATION` to do
this in the Vulkan backend. It's even already finding issues in our
`examples` and other tests! But…we'd like to handle those later, since
this is so important for users. So, I've broken that out to separate
issues. The instances we're aware of:

* `water` is running into sync. validation issues: see
  <https://github.com/gfx-rs/wgpu/issues/5231>
* `wgpu_test::shader::struct_layout::uniform_input` is failing to
    instrument shaders now; see
    <https://github.com/gfx-rs/wgpu/issues/5245>

It is apparent from this and the [DX12 implementation of GPU-based
validation] that we will need to communicate clearly to users that
`InstanceFlags::GPU_BASED_VALIDATION` implies
`InstanceFlags::VALIDATION`. Not all backends enforce this yet; I have
[split out this work][follow-up for flag implication].

Note that `VK_EXT_validation_features` has been deprecated in favor of
the more general layer configuration mechanism offered by
[`VK_EXT_layer_settings`].

[DX12 implementation of GPU-based validation]: https://github.com/gfx-rs/wgpu/pull/5146
[`VK_EXT_layer_settings`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_layer_settings.html
[`VK_EXT_validation_features`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_EXT_validation_features.html
[`VK_LAYER_KHRONOS_validation`]:https://vulkan.lunarg.com/doc/sdk/1.3.275.0/linux/khronos_validation_layer.html
[`VkValidationFeaturesEXT`]: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkValidationFeaturesEXT.html
[follow-up for flag implication]: https://github.com/gfx-rs/wgpu/pull/5232
2024-02-12 10:23:07 -05:00
Erich Gubler
6a51f3d82f refactor(vulkan): extract enumerate_instance_extension_properties helper
This will be used shortly for checking if we should proceed with
enabling GPU-based validation.
2024-02-12 10:23:07 -05:00
Erich Gubler
e154cc0312 refactor(vulkan): hoist validation layer check
This will be used shortly for checking if we should proceed with
enabling GPU-based validation.
2024-02-12 10:23:07 -05:00
Jim Blandy
60487f5833 Document the wgpu_hal::CommandEncoder trait. 2024-02-09 11:33:52 -08:00
Nicolas Silva
990324fc33
Add max_color_attachments and max_color_attachment_bytes_per_sample (#5218) 2024-02-09 09:39:29 +01:00
Connor Fitzgerald
faed98b45c
Add typos to Repository CI (#5191)
Co-authored-by: Andreas Reich <r_andreas2@web.de>
2024-02-05 12:30:29 -05:00
ark
c87e3d4037 using non alpha channeled texture 2024-02-01 11:41:55 +01:00
Erich Gubler
c28466cc21 feat: make GPU-based validation opt-in with new InstanceFlags::GPU_BASED_VALIDATION 2024-01-30 21:57:01 -05:00
Erich Gubler
4aab8a8399 feat(dx12): enable GPU-based validation for DX12 backend
Logic for doing this was sourced from
<https://learn.microsoft.com/en-us/windows/win32/direct3d12/using-d3d12-debug-layer-gpu-based-validation>.
2024-01-30 21:57:01 -05:00
Okko Hakola
b3490de69d
[d3d12] Avoid panic on instance drop (#5134) 2024-01-24 12:49:18 +01:00