Commit Graph
20 Commits
Author SHA1 Message Date
Brad Werth 57f8757fad Add device destroy method (#4163)
Plus tests that ensure that an invalid device behaves correctly.
Mostly a stub implementation otherwise.
2023-09-27 14:34:23 +02:00
Jim Blandy 3666f1aef8 Add test case for #4167, marked as an expected failure. (#4168) 2023-09-25 19:55:55 -04:00
Andreas ReichandConnor Fitzgerald 507101987b Make StoreOp an enum instead of a bool (#4147)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-09-18 14:58:41 -04:00
Jim Blandy f2bd557186 Tests for wgpu#4139. (#4148) 2023-09-17 14:08:42 -04:00
Kevin Reid 7c575a0b40 Add details to RequestDeviceError. (#4145) 2023-09-16 00:16:49 -04:00
Connor Fitzgerald b488e03d9f Workaround NV bug (#4132) 2023-09-14 16:38:21 -04:00
Jim BlandyandConnor Fitzgerald 54a7f0eac9 Skip test_multithreaded_compute on MoltenVK. (#4096)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-09-04 03:54:39 +00:00
Kevin ReidandConnor Fitzgerald 332cd0325d Add details to InstanceError and CreateSurfaceError. (#4066)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-09-01 01:48:31 -04:00
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
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
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 FitzgeraldandConnor 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