Commit Graph
7187 Commits
Author SHA1 Message Date
Nicolas Silva d47534ed9a Discard draws when the instance/vertex/index count is zero (#5137) 2024-01-25 09:06:29 +01:00
Nicolas Silva efb35d4fa1 Snatch bind groups associated with destroyed textures and buffers (#5136)
* Make bind groups snatchable

* Snatch bindgroups when destroying associated textures and buffers.
2024-01-25 05:11:43 +00:00
Nicolas Silva 7d0f656dd9 Snatch texture views of destroyed textures (#5131) 2024-01-24 20:55:20 +01:00
Nicolas Silva b0e4734a7e Differentiate between device loss caused by an error and caused by dropping the device 2024-01-24 13:41:23 +01:00
Nicolas Silva 96b1e162c5 Request INDIRECT_FIRST_INSTANCE feature in vertex_indices test 2024-01-24 13:02:11 +01:00
Okko Hakola b3490de69d [d3d12] Avoid panic on instance drop (#5134) 2024-01-24 12:49:18 +01:00
Jim Blandy 6440af03a6 Join threads in MULTITHREADED_COMPUTE example. (#5129)
Join all threads before returning from the test case, to ensure that
we don't return from `main` until all open `Device`s have been
dropped.

This avoids a race condition in glibc in which a thread calling
`dlclose` can unmap a shared library's code even while the main thread
is still running its finalization functions. (See #5084 for details.)
Joining all threads before returning from the test ensures that the
Vulkan loader has finished `dlclose`-ing the Vulkan validation layer
shared library before `main` returns.

Remove `skip` for this test on GL/llvmpipe. With this change, that has
not been observed to crash. Without it, the test crashes within ten
runs or so.

Fixes #5084.
Fixed #4285.
2024-01-23 22:18:21 -05:00
Nicolas Silva 8d64915b3c Remove the lock around TextureView::parent (#5126) 2024-01-23 10:31:13 -05:00
wayneandAlphyr c4b5cc94ad don't panic if naga parsing of shader source fails (#5034)
* naga: glsl parser should return singular ParseError similar to wgsl

* wgpu: treat glsl the same as wgsl when creating ShaderModule

* naga: update glsl parser tests to use new ParseError type

* naga: glsl ParseError errors field should be public

* wgpu-core: add 'glsl' feature

* fix some minor bugs in glsl parse error refactor

* naga/wgpu/wgpu-core: improve spirv parse error handling

* wgpu-core: feature gate use of glsl and spv naga modules

* wgpu: enable wgpu-core glsl and spirv features when appropriate

* obey clippy

* naga: derive Clone in Type

* naga: don't feature gate Clone derivation for Type

* obey cargo fmt

* wgpu-core: use bytemuck instead of zerocopy

* wgpu-core: apply suggested edit

* wgpu-core: no need to borrow spirv code

* Update wgpu/src/backend/wgpu_core.rs

Co-authored-by: Alphyr <47725341+a1phyr@users.noreply.github.com>

---------

Co-authored-by: Alphyr <47725341+a1phyr@users.noreply.github.com>
2024-01-23 10:25:25 -05:00
Nicolas Silva 60a5739df2 d3d12: Propagate errors when closing command lists (#5125)
Before this commit, command lists that we failed to close were used anyway during submit, causing device loss.
2024-01-23 14:30:08 +01:00
Brad Werth ac8756c2d3 Release GPU resources from device.trackers, not from lifetime_tracker. (#5075) 2024-01-22 17:55:42 +01:00
Alphyr 20f3a9fdf1 Avoid a clone when creating a Glsl shader (#5118) 2024-01-22 15:27:03 +00:00
Erich Gubler 2ee7604307 fix(const_eval): use component count, not arg. count, for component-wise iter. 2024-01-22 10:31:53 +01:00
dependabot[bot] a0862aabb4 build(deps): bump the patch-updates group with 16 updates (#5115)
Bumps the patch-updates group with 16 updates:

| Package | From | To |
| --- | --- | --- |
| [bitflags](https://github.com/bitflags/bitflags) | `2.4.1` | `2.4.2` |
| [env_logger](https://github.com/rust-cli/env_logger) | `0.10.1` | `0.10.2` |
| [smallvec](https://github.com/servo/rust-smallvec) | `1.12.0` | `1.13.1` |
| [winit](https://github.com/rust-windowing/winit) | `0.29.9` | `0.29.10` |
| [anstream](https://github.com/rust-cli/anstyle) | `0.6.7` | `0.6.11` |
| [clap](https://github.com/clap-rs/clap) | `4.4.16` | `4.4.18` |
| [fdeflate](https://github.com/image-rs/fdeflate) | `0.3.3` | `0.3.4` |
| [hermit-abi](https://github.com/hermitcore/hermit-rs) | `0.3.3` | `0.3.4` |
| [linux-raw-sys](https://github.com/sunfishcode/linux-raw-sys) | `0.4.12` | `0.4.13` |
| [pkg-config](https://github.com/rust-lang/pkg-config-rs) | `0.3.28` | `0.3.29` |
| [proc-macro2](https://github.com/dtolnay/proc-macro2) | `1.0.76` | `1.0.78` |
| [rayon](https://github.com/rayon-rs/rayon) | `1.8.0` | `1.8.1` |
| [regex](https://github.com/rust-lang/regex) | `1.10.2` | `1.10.3` |
| [smol_str](https://github.com/rust-analyzer/smol_str) | `0.2.0` | `0.2.1` |
| [unicode-bidi](https://github.com/servo/unicode-bidi) | `0.3.14` | `0.3.15` |
| [uuid](https://github.com/uuid-rs/uuid) | `1.6.1` | `1.7.0` |


Updates `bitflags` from 2.4.1 to 2.4.2
- [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.4.1...2.4.2)

Updates `env_logger` from 0.10.1 to 0.10.2
- [Release notes](https://github.com/rust-cli/env_logger/releases)
- [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-cli/env_logger/compare/v0.10.1...v0.10.2)

Updates `smallvec` from 1.12.0 to 1.13.1
- [Release notes](https://github.com/servo/rust-smallvec/releases)
- [Commits](https://github.com/servo/rust-smallvec/compare/v1.12.0...v1.13.1)

Updates `winit` from 0.29.9 to 0.29.10
- [Release notes](https://github.com/rust-windowing/winit/releases)
- [Changelog](https://github.com/rust-windowing/winit/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-windowing/winit/compare/v0.29.9...v0.29.10)

Updates `anstream` from 0.6.7 to 0.6.11
- [Commits](https://github.com/rust-cli/anstyle/compare/anstream-v0.6.7...anstream-v0.6.11)

Updates `clap` from 4.4.16 to 4.4.18
- [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.4.16...v4.4.18)

Updates `fdeflate` from 0.3.3 to 0.3.4
- [Changelog](https://github.com/image-rs/fdeflate/blob/main/CHANGES.md)
- [Commits](https://github.com/image-rs/fdeflate/compare/v0.3.3...v0.3.4)

Updates `hermit-abi` from 0.3.3 to 0.3.4
- [Release notes](https://github.com/hermitcore/hermit-rs/releases)
- [Commits](https://github.com/hermitcore/hermit-rs/compare/hermit-abi-0.3.3...hermit-abi-0.3.4)

Updates `linux-raw-sys` from 0.4.12 to 0.4.13
- [Commits](https://github.com/sunfishcode/linux-raw-sys/compare/v0.4.12...v0.4.13)

Updates `pkg-config` from 0.3.28 to 0.3.29
- [Changelog](https://github.com/rust-lang/pkg-config-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/pkg-config-rs/compare/0.3.28...0.3.29)

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

Updates `rayon` from 1.8.0 to 1.8.1
- [Changelog](https://github.com/rayon-rs/rayon/blob/master/RELEASES.md)
- [Commits](https://github.com/rayon-rs/rayon/compare/rayon-core-v1.8.0...rayon-core-v1.8.1)

Updates `regex` from 1.10.2 to 1.10.3
- [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.2...1.10.3)

Updates `smol_str` from 0.2.0 to 0.2.1
- [Commits](https://github.com/rust-analyzer/smol_str/commits)

Updates `unicode-bidi` from 0.3.14 to 0.3.15
- [Release notes](https://github.com/servo/unicode-bidi/releases)
- [Commits](https://github.com/servo/unicode-bidi/commits)

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

---
updated-dependencies:
- dependency-name: bitflags
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: env_logger
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: smallvec
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: patch-updates
- dependency-name: winit
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: anstream
  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: fdeflate
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: hermit-abi
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: linux-raw-sys
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: pkg-config
  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: rayon
  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: smol_str
  dependency-type: indirect
  update-type: version-update:semver-patch
  dependency-group: patch-updates
- dependency-name: unicode-bidi
  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-01-22 01:00:32 -05:00
John-John Tedro e5c62fb5bd vulkan: Replace fence with semaphore when acquiring surfaces (#4967) 2024-01-21 18:14:17 -05:00
i509VCBandConnor Fitzgerald 886dc94f57 Document Wayland specifics related to SurfaceTexture::present (#5093)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2024-01-21 18:10:56 -05:00
Lucas Kent e128d6c261 Error on missing web_sys_unstable_apis (#5104) 2024-01-21 03:36:29 +00:00
Imbris 6c7c6fb999 Make sure to unset current context in wgl Surface::configure/present (#5087) 2024-01-20 22:26:54 -05:00
Teodor Tanasoaia f9509bcf9e [d3d12] use plane 1 for stencil only views (#5100)
* [d3d12] use plane 1 for stencil only views

* add test

* skip stencil only view creation on WebGL
2024-01-19 21:42:19 +00:00
Nick 101e9a574d Make sure to copy all of the buffers into the resource array for dx12. (#5091)
* Make sure to copy all of the buffers into the resource array for dx12.

Fixes #5088. Even though we're telling DX12 that the maximum frame latency should be our non-padded value, the swap chain may request any of the buffers allocated to it.

* Up the maximum frame latency on the DX12 backend to allow a larger range.
2024-01-19 18:32:10 +01:00
Nicolas Silva d678c7a9cf d3d12: Null check the out ComPtr of a few creation functions (#5096)
My understanding is that we shouldn't need to (The d3d12 docs aren't very specific about that), but we have evidence that these functions sometimes leave the resource pointer set to null without returning an error.
2024-01-19 18:28:03 +01:00
Erich Gubler 063e11027b refactor(const_eval): inline math_pow 2024-01-18 16:57:46 -05:00
Erich Gubler c2f110ed0c feat(const_eval): impl. atanh 2024-01-18 16:57:46 -05:00
Erich Gubler 262c07f40c feat(const_eval): impl. atan 2024-01-18 16:57:46 -05:00
Erich Gubler f8113c55b7 feat(const_eval): impl. asinh 2024-01-18 16:57:46 -05:00
Erich Gubler e2783c7d45 feat(const_eval): impl. asin 2024-01-18 16:57:46 -05:00
Erich Gubler afb54d58ba feat(const_eval): impl. acosh 2024-01-18 16:57:46 -05:00
Erich Gubler 6654c68950 feat(const_eval): impl. acos 2024-01-18 16:57:46 -05:00
Erich Gubler 12b11f870b feat(const_eval): impl. cosh 2024-01-18 16:57:46 -05:00
Erich Gubler 7528b22e57 feat(const_eval): impl. cos 2024-01-18 16:57:46 -05:00
Erich Gubler 3ab9a80815 feat(const_eval): impl. tanh 2024-01-18 16:57:46 -05:00
Erich Gubler bdf1cb4ec3 feat(const_eval): impl. tan 2024-01-18 16:57:46 -05:00
Erich Gubler 29a46234f4 feat(const_eval)!: reimpl. clamp 2024-01-18 16:57:46 -05:00
Erich Gubler 6f5b2a64e2 feat(const_eval): impl. step 2024-01-18 16:57:46 -05:00
Erich Gubler f2dbdfcdc6 feat(const_eval): impl. sqrt 2024-01-18 16:57:46 -05:00
Erich Gubler 133b573133 feat(const_eval): impl. sinh 2024-01-18 16:57:46 -05:00
Erich Gubler 99a38c7b7c feat(const_eval): impl. sin 2024-01-18 16:57:46 -05:00
Erich Gubler 5dc1038124 feat(const_eval): impl. saturate 2024-01-18 16:57:46 -05:00
Erich Gubler 87dafb645a feat(const_eval): impl. round 2024-01-18 16:57:46 -05:00
Erich Gubler fc27b08dca feat(const_eval): impl. abs with new component_wise_scalar 2024-01-18 16:57:46 -05:00
Erich Gubler 5c900f2568 refactor(const_eval): add component_wise_float helper, reimpl. math_pow 2024-01-18 16:57:46 -05:00
Erich Gubler c2058487ca chore: run rustfmt in naga 2024-01-18 16:57:46 -05:00
John-John Tedro adf1e3b6c5 Improve test feedback and implementation (#5068) 2024-01-17 16:50:39 -05:00
Josh Groves 3716b8a1bc Update glow to 0.13.1 (#5083) 2024-01-17 20:54:10 +00:00
Connor Fitzgerald 484457d959 Fix wgpu-hal build wgpu-info-v0.19.0 v0.19.0 wgpu-hal-v0.19.0 wgpu-v0.19.0 wgpu-core-v0.19.0 2024-01-17 15:23:50 -05:00
Connor Fitzgerald 7eac4cec5b Fix naga release naga-v0.19.0 naga-cli-v0.19.0 2024-01-17 14:47:13 -05:00
Connor Fitzgerald 8b2098bd4e Release 0.19 (#5082) d3d12-v0.19.0 wgpu-types-v0.19.0 2024-01-17 14:42:11 -05:00
Andreas ReichandConnor Fitzgerald 4c18e283d1 polish changelog for upcoming release (#5078)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2024-01-17 18:24:43 +00:00
Andreas ReichandEmil Ernerfeldt b8f27c7284 Expose maximum_frame_latency (#4899)
Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2024-01-17 12:46:34 -05:00
Connor Fitzgerald 2e38187954 Re-export public dependencies (#5063) 2024-01-16 19:21:51 +00:00