Commit Graph

162 Commits

Author SHA1 Message Date
Brad Werth
5c2c840159
Prevent Metal from crashing when a still-open encoder is deallocated, resolve issue #2077. (#4023) 2023-08-28 18:23:35 -07:00
Nicolas Silva
399637e2b8
Bind group layout dedup (#3925)
* Remove generic parameter in compat::Manager.

The code is specific to bind group layout ids and the generic parameter gets in the way.

* Add a test.

The test actually covers wgpu's configuration where deduplication does not require the indirection rather than the new code. I used it to debug the new code with the configuration hard-coded. It's tedious to add a test to cover dedpuplication of bind group layouts for users of wgpu_core to provide their IDs, we can rely on the CTS which has test for that.

* Implement bind group layout deduplication for all configurations

Currently wgpu-core implement bind group layout deduplication only when it creates its own resource IDs. In other words it works for wgpu but not in Firefox.
This PR bridges the gap by allowing an optional indirection in bind group layouts: each BGL may store an ID referring to its "deduplicated" BGL.
When referring to a BGL the rest of the code must make sure to follow the indirection. The exception is command buffer processing which is considered hot code and where we first validate against the provided BGL ID and only follow the indirection if the initial check failed.

The main pain point with this approach is the various places where wgpu-core manually updates reference counts: we have to be careful about following the indirection to track the right BGL.

* Avoid making decisions based on the size of some generic type.
2023-08-25 21:48:22 +02:00
Pieter-Jan Briers
e973a06268
Allow specifying minor GLES3 version (#3998) 2023-08-16 11:51:56 -04:00
Connor Fitzgerald
f825ce4ac2
Fix Callback Ordering (#4036)
* Fix Callback Ordering

* Format & Changelog
2023-08-14 08:33:50 -04:00
Christopher Fleetwood
3305e88d63
feature: Timestamp queries (#3636)
Co-authored-by: Andreas Reich <r_andreas2@web.de>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Co-authored-by: Connor Fitzgerald <connor@modyfi.io>
2023-08-02 18:04:24 -04:00
Valaphee The Meerkat
494ae1a815
Add support for occlusion queries (#3402)
Co-authored-by: Leo Kettmeir <crowlkats@toaxl.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-08-02 19:05:59 +00:00
Ali
b93dc7c69a
Fixed: enabling PARTIALLY_BOUND_BINDING_ARRAY does not get enabled on vulkan backend (#3772) 2023-07-23 07:37:59 +00:00
Connor Fitzgerald
311065100b
Vulkan portability in CI (#3964) 2023-07-23 07:35:57 +00:00
Nicolas Silva
64bf58a056
Add a basic test for mismatched devices (#3926) 2023-07-19 17:51:42 -04:00
artyomd
11b8dbbea3
Add tests for scissors (#3877) 2023-07-19 21:48:23 +00:00
Fredrik Fornwall
1c43272d2a
Remove backend_bits from initialize_adapter_from_env (#3904)
Remove backend_bits from initialize_adapter_from_env, backends can
be specified using the backends field in InstanceDescriptor instead.
2023-07-05 18:21:39 +02:00
Connor Fitzgerald
10172e1f38
Move Examples and Tests to Their Own Crates (#3841)
Co-authored-by: Connor Fitzgerald <connor@modyfi.io>
2023-06-10 18:35:46 +00:00