Commit Graph
830 Commits
Author SHA1 Message Date
Connor FitzgeraldandAndreas Reich faed98b45c Add typos to Repository CI (#5191)
Co-authored-by: Andreas Reich <r_andreas2@web.de>
2024-02-05 12:30:29 -05:00
Connor Fitzgerald d0c52d70fd Ord for Id (#5176) 2024-02-01 09:29:34 +01:00
Andreas Reich 62cc81cbfd Allow wgpu::Instance to report which backends were enabled (#5167)
* Replace `Instance::any_backend_feature_enabled` with `Instance::enabled_backend_features` which reports all available backends instead of just reporting if none is available.

* add changelog entry

* update enabled_backend_features in doc

* fix not enabling any backend on android, fix related doc issues
2024-01-31 09:17:59 +00:00
Andreas Reich 45957088ad Fix panic when creating a surface while no backend is available (#5166)
* Fix panic when creating a surface while no backend is available

* changelog entry
2024-01-31 08:48:33 +00:00
Brad Werth 0888a630a0 Call device lost callback when it is replaced, or when the global is dropped. (#5168)
This fixes two cases where a DeviceLostClosureC might not be consumed
before it is dropped, which is a requirement:

1) When the closure is replaced, this ensures the to-be-dropped closure
is invoked.
2)  When the global is dropped, this ensures that the closure is invoked
before it is dropped.

The first of these two cases is tested in a new test,
DEVICE_LOST_REPLACED_CALLBACK. The second case has a stub,
always-skipped test, DROPPED_GLOBAL_THEN_DEVICE_LOST. The test is
always-skipped because there does not appear to be a way to drop the
global from within a test. Nor is there any other way to reach
Device.prepare_to_die without having first dropping the device.
2024-01-31 08:15:45 +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 c559be933b feat(const_eval): impl. min 2024-01-30 10:53:03 +01:00
Erich Gubler abcc6ddff3 feat(const_eval): impl. max 2024-01-30 10:53:03 +01:00
Erich Gubler 18f50092a6 feat(const_eval): impl. trunc 2024-01-30 10:53:03 +01:00
Erich Gubler 2d3005b745 feat(const_eval): impl. sign with new component_wise_signed 2024-01-30 10:53:03 +01:00
Erich Gubler 0bd5f77601 feat(const_eval): impl. reverseBits 2024-01-30 10:53:03 +01:00
Erich Gubler 7dedd002c0 feat(const_eval): impl. radians 2024-01-30 10:53:03 +01:00
Erich Gubler e6f6eb7036 feat(const_eval): impl. log2 2024-01-30 10:53:03 +01:00
Erich Gubler 39cb92cf88 feat(const_eval): impl. log 2024-01-30 10:53:03 +01:00
Erich Gubler 4db02d1962 feat(const_eval): impl. fract 2024-01-30 10:53:03 +01:00
Erich Gubler fc04518750 feat(const_eval): impl. inverseSqrt 2024-01-30 10:53:03 +01:00
Erich Gubler 19f5e4d5e4 feat(const_eval): impl. fma 2024-01-30 10:53:03 +01:00
Erich Gubler 7b274fc161 feat(const_eval): impl. exp2 2024-01-30 10:53:03 +01:00
Erich Gubler 0f8adae123 feat(const_eval): impl. degrees 2024-01-30 10:53:03 +01:00
Erich Gubler 01d02caca3 feat(const_eval): impl. exp 2024-01-30 10:53:03 +01:00
Erich Gubler 66fd1872ab feat(const_eval): impl. countTrailingZeros 2024-01-30 10:53:03 +01:00
Erich Gubler 2ccc4f49ee feat(const_eval): impl. countOneBits 2024-01-30 10:53:03 +01:00
Erich Gubler ea044f039c feat(const_eval): impl. countLeadingZeros with new component_wise_concrete_int 2024-01-30 10:53:03 +01:00
Erich Gubler 7f70df0c47 feat(const_eval): impl. floor 2024-01-30 10:53:03 +01:00
Erich Gubler a05cc37e3c feat(const_eval): impl. ceil 2024-01-30 10:53:03 +01:00
Nicolas Silva 6e020a079e Fix the validation for vertex limits for regular render passes (#5156) 2024-01-29 14:01:03 +01:00
Bude 4face1c2ba Feature/serde feature (#5149)
* Add serde, serialize, deserialize features to wgpu and wgpu-core
Remove trace, replay features from wgpu-types

* Do not use trace, replay in wgpu-types anymore

* Make use of deserialize, serialize features in wgpu-core

* Make use of serialize, deserialize features in wgpu

* Run cargo fmt

* Use serde(default) for deserialize only

* Fix serial-pass feature

* Add a comment for new features

* Add CHANGELOG entry

* Run cargo fmt

* serial-pass also needs serde features for Id<T>

* Add feature documentation to lib.rs docs

* wgpu-types implicit serde feature

* wgpu-core explicit serde feature

* wgpu explicit serde feature

* Update CHANGELOG.md

* Fix compilation with default features

* Address review comments
2024-01-28 20:13:04 +00:00
vero 0003db18c4 Refactor tests to be feature flag bit-width agnostic (#5155) 2024-01-28 01:42:02 +00: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
Brad Werth ac8756c2d3 Release GPU resources from device.trackers, not from lifetime_tracker. (#5075) 2024-01-22 17:55:42 +01: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
Imbris 6c7c6fb999 Make sure to unset current context in wgl Surface::configure/present (#5087) 2024-01-20 22:26:54 -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 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