Commit Graph
8323 Commits
Author SHA1 Message Date
teoxoy b47d4924a8 [glsl-in] fix swizzle in a global const context 2024-01-03 11:34:10 +01:00
Lucas KentandConnor Fitzgerald a0c2b25829 Fix xtask wasm-bindgen install (#4944)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2024-01-02 17:12:22 -05:00
dependabot[bot]andConnor Fitzgerald d7db4e5ef0 Bump winit from 0.29.6 to 0.29.8 (#4948)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2024-01-02 16:44:43 -05:00
Martin Vilcans 8e0b715954 hello_compute: check for missing command-line args (#4939)
* hello_compute: check for missing command-line args

Fixes off-by-one error when checking for missing arguments.
Before this, running the example gave this scary looking error message:

```
$ cargo run --bin wgpu-examples hello_compute
    Finished dev [unoptimized + debuginfo] target(s) in 0.13s
     Running `target/debug/wgpu-examples hello_compute`
[2023-12-27T22:14:26Z ERROR wgpu::backend::direct] Handling wgpu errors as fatal by default
thread 'main' panicked at 'wgpu error: Validation Error

Caused by:
    In Device::create_bind_group
    Buffer binding size 0 is less than minimum 4
      note: buffer = `Storage Buffer`

', wgpu/src/backend/direct.rs:3139:5
```

As this was the first example I tried to run, it almost scared me
away, thinking it was a driver issue.

Instead, without arguments the example should use defaults.

* Add PR #4939 to changelog as instructed
2024-01-02 21:08:41 +00:00
daxpeddaandConnor Fitzgerald f004a9def9 Add cfg_aliases to wgpu (#4935)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2024-01-02 16:05:51 -05:00
Nathan AdamsandConnor Fitzgerald ec920e85d1 Fix incorrect ConfigureSurfaceError::TooLarge message (#4960)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2024-01-02 15:32:51 -05:00
Connor Fitzgerald 53ab2b00b2 Disable Linux Tests (#4957) 2024-01-02 14:10:53 -05:00
dependabot[bot] bcaf46d7c9 Bump anyhow from 1.0.77 to 1.0.78 (#4950)
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.77 to 1.0.78.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.77...1.0.78)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-02 14:00:25 -05:00
Nathan Adams aa48558e3f Change examples page menu on smaller screens (#4958) 2024-01-02 13:27:39 -05:00
Connor Fitzgerald e26a853654 BGL Weak Pointer Deduplication Pool (#4927)
* Ho boy

* BGL pool finished

* Remove id32 feature

* Add BGL Test

* Iteration

* Working Dedupe

* Tests

* Iteration

* Re-iteration

* Hash Cleanup

* Add large slew of tests

* Whoops
2024-01-02 09:27:22 -05:00
dependabot[bot] 46757372cc Bump syn from 2.0.42 to 2.0.43 (#4932)
Bumps [syn](https://github.com/dtolnay/syn) from 2.0.42 to 2.0.43.
- [Release notes](https://github.com/dtolnay/syn/releases)
- [Commits](https://github.com/dtolnay/syn/compare/2.0.42...2.0.43)

---
updated-dependencies:
- dependency-name: syn
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-28 14:04:44 +01:00
dependabot[bot] 430fc0b3a8 Bump thiserror from 1.0.51 to 1.0.52 (#4933)
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.51 to 1.0.52.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.51...1.0.52)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-28 14:04:20 +01:00
dependabot[bot] 377e5092c2 Bump anyhow from 1.0.76 to 1.0.77 (#4936)
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.76 to 1.0.77.
- [Release notes](https://github.com/dtolnay/anyhow/releases)
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.76...1.0.77)

---
updated-dependencies:
- dependency-name: anyhow
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-28 14:03:58 +01:00
Divy Srivastava 92d494e4b1 Align wgpu_types::CompositeAlphaMode serde serializations to spec (#4940)
* Align wgpu_types::CompositeAlphaMode serde serializations to spec

* add changelog
2023-12-28 05:10:16 -05:00
Erich Gubler e45a86fa7c [naga xtask] Add and use ValidateSubcommand::all.
Add an `all` method to `ValidateSubcommand`, so that we can just use
matches elsewhere, and let the compile catch missing or duplicated
cases for us.
2023-12-27 13:07:09 -08:00
Jim Blandy 71f18fd61a [naga xtask] Use anyhow::ensure! where appropriate. 2023-12-27 13:07:09 -08:00
Jim Blandy 3e252ac2f3 [naga xtask] Use log::error in preference to eprintln. 2023-12-27 13:07:09 -08:00
Jim Blandy de3df51807 [naga xtask] Add validate all subcommand. 2023-12-27 13:07:09 -08:00
Jim Blandy 403db446e4 [naga xtask] Run validation jobs in parallel, using jobserver. 2023-12-27 13:07:09 -08:00
Jim Blandy 85ab6327d3 [naga xtask] Use indicatif crate to report validation progress. 2023-12-27 13:07:09 -08:00
Jim Blandy a1a8b6d445 [naga xtask] Remove ack_visiting function. 2023-12-27 13:07:09 -08:00
Jim Blandy 0d25acba68 [naga xtask] Collect validation jobs in a Vec before running them. 2023-12-27 13:07:09 -08:00
Jim Blandy 17a9166c26 [naga xtask] Produce output only when an error occurs. 2023-12-27 13:07:09 -08:00
Jim Blandy 41276a1731 [naga xtask] Break validation subcommands into functions. 2023-12-27 13:07:09 -08:00
Jim Blandy 9041bb94db [naga xtask] Move validation subcommands into their own module. 2023-12-27 13:07:09 -08:00
dependabot[bot] d7296ac30b Bump web-time from 0.2.3 to 0.2.4 (#4929)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-25 03:41:32 +00:00
dependabot[bot] 085141149b Bump winit from 0.29.5 to 0.29.6 (#4930)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-24 22:28:37 -05:00
Jim Blandy 9afd54ea24 [naga xtask] Use naga-cli's --bulk-validate option.
Use `naga --bulk-validate` for `cargo xtask validate wgsl`, reducing
runtime from 12s to 0.8s.
2023-12-24 12:03:28 -08:00
Jim Blandy 9013e226c3 [naga-cli] Add --bulk-validate option. 2023-12-24 12:03:28 -08:00
Jim Blandy 79a6a4b0d2 [naga-cli] Abstract out parsing of input file. 2023-12-24 12:03:28 -08:00
Erich Gubler e1baa5a56e docs: inline document-features usage, remove dep.
Re-implements https://github.com/gfx-rs/wgpu/pull/4886 (CC @Wumpf)
without the `document-features` crate, which has issues integrating into
Firefox builds after being `cargo vendor`ed into its repository. This
issue is being tracked against
https://github.com/slint-ui/document-features/issues/20. Once resolved,
I expect that we will want to revert this PR in its entirety, since
`document-features` is still a good addition to `wgpu`'s documentation
story.

Internally, consensus has already been achieved for this change.
Firefox's ability to build unfortunately take priority over this
particular convenience. Hopefully, we won't have to compromise shortly!

I tested this by ensuring that the HTML output of our existing
`document_features::document_features!(…)` usage was exactly the same.
There should be exactly zero regressions in the current state of
documentation for users. For maintainers, I have added a disclaimer that
one needs to keep changes in sync. with the relevant `Cargo.toml`
manifests.
2023-12-22 14:31:12 -05:00
dependabot[bot] c97b351b83 Bump winit from 0.29.4 to 0.29.5 (#4922)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-21 23:19:32 -05:00
Andrew Farkas 2993650ede Fix typo "layout pipeline layout" -> "pipeline layout" (#4921) 2023-12-22 01:02:41 +00:00
Connor Fitzgerald 79e5169255 Add BGL Deduplication Index Test (#4914) 2023-12-21 12:16:20 -05:00
Connor Fitzgerald 87ecc089dd Remove id32 feature 2023-12-20 21:39:24 -08:00
dependabot[bot] d9784aca8e Bump anyhow from 1.0.75 to 1.0.76 (#4910)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-21 03:00:44 +00:00
dependabot[bot] 3b5951c696 Bump profiling from 1.0.12 to 1.0.13 (#4909)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-21 03:00:07 +00:00
dependabot[bot] f3bb4a5cb5 Bump syn from 2.0.41 to 2.0.42 (#4908)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-20 21:50:11 -05:00
Connor Fitzgerald 090f2f757c Use nightly for docs (#4906) 2023-12-20 18:59:22 -05:00
Brad WerthandConnor Fitzgerald 9eea31a4ae Eagerly release GPU resources when we lose the device. (#4851)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-12-20 22:43:43 +00:00
Nicolas SilvaandConnor Fitzgerald 85b91c0408 Buffer snatching (#4896)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-12-20 16:42:42 -05:00
Nicolas Silva 164e478fcb Simplify some code around buffer unmapping (#4892) 2023-12-20 15:21:32 -05:00
Meo 4de4ddcc3c fix: docs (#4901) 2023-12-20 20:15:35 +00:00
Nicolas Silva 0524c88c03 Check that raw buffers and raw bind groups are valid (#4895) 2023-12-20 15:13:20 -05:00
dependabot[bot] 0e3500644f Bump tokio from 1.35.0 to 1.35.1 (#4903)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.35.0 to 1.35.1.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.35.0...tokio-1.35.1)

---
updated-dependencies:
- dependency-name: tokio
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-20 19:24:51 +00:00
sotaroikedaandSotaro Ikeda 1d6c7a0263 Support Device fence sharing with dx12 on Windows (#4900)
Co-authored-by: Sotaro Ikeda <you@example.com>
2023-12-20 13:33:47 -05:00
Brad Werth 56d9d32a07 [wgpu-core] Ensure that DeviceLostCallback is always called exactly once
* Ensure device lost closure is called exactly once before being dropped.

This requires a change to the Rust callback signature, which is now Fn
instead of FnOnce. When the Rust callback or the C closure are dropped,
they will panic if they haven't been called. `device_drop` is changed
to call the closure with a message of "Device dropped." A test is added.
2023-12-19 23:16:10 +00:00
Nicolas Silva aade481bdf Remove some locks in BindGroup (#4894)
* Remove some locks in BindGroup

These are only written to clear the vectors when triaging bindgroups for destruction, which is not necessary. We can let the reference counts drop when the bind group is dropped.

* Make the mem_leak test pass again
2023-12-19 10:29:32 +01:00
Nicolas Silva a1b183f736 Avoid allocating memory every time we might log a label (#4893)
We allocate a String every time we want to get a label for logging. The string is also allocated when logging is disabled. Either way, the allocation is unnecessary. This commit replaces the String with a dyn Debug reference which does not need any allocation.
2023-12-18 13:08:18 +01:00
Nicolas Silva 625165e60e Make the naga version in trunk as high as the latest published one. (#4891) 2023-12-18 04:05:16 -05:00