Jim Blandy
7634ae6112
wgpu_core: Add logging to Instance::new.
...
For each backend `blah`, log::debug/trace whether we were able to
populate `Instance::blah`.
2023-09-05 13:47:27 -04:00
Rajesh Malviya
625afc3b42
Drop texture clear_views in surface_texture_discard ( #4057 )
2023-08-30 17:58:47 -04: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
Jim Blandy
636bef9cd5
Tracker mod docs: fix explanation of index re-use.
2023-08-19 17:06:07 -07:00
Pieter-Jan Briers
e973a06268
Allow specifying minor GLES3 version ( #3998 )
2023-08-16 11:51:56 -04:00
James0124
7544af0f83
Add validation in accordance with WebGPU setViewport valid usage fo… ( #4058 )
...
* Add validation in accordance with WebGPU `setViewport` valid usage for `x`, `y` and `this.[[attachment_size]]`.
`x` and `y` must not be negative, and the rect must be contained in the render target.
* Add changelog entry.
2023-08-15 09:15:19 +02:00
Nicolas Silva
50cfc541aa
Update naga to 0.13.0@git:7a19f3af909202c7eafd36633b5584bfbb353ecb ( #4051 )
2023-08-15 00:09:53 +02:00
Connor Fitzgerald
f825ce4ac2
Fix Callback Ordering ( #4036 )
...
* Fix Callback Ordering
* Format & Changelog
2023-08-14 08:33:50 -04:00
Teodor Tanasoaia
c7da76a4c6
Validate DownlevelFlags::READ_ONLY_DEPTH_STENCIL ( #4031 )
2023-08-11 16:34:35 -04:00
Connor Fitzgerald
d11d2f96dc
Fix Occlusion Queries on Mac ( #4001 )
2023-08-02 19:10:21 -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
Teodor Tanasoaia
48078a800a
Derive storage bindings via naga::StorageAccess instead of naga::GlobalUse ( #3985 )
...
Removes the feature check for read-only and read-write storage textures as it's later checked by `create_bind_group_layout`.
335f40f85a/wgpu-core/src/device/resource.rs (L1505-L1518)
Also removes the `GlobalUse` checks from `check_binding_use` as naga is already checking those.
535701f6b2/src/valid/interface.rs (L639-L669)
2023-07-31 15:30:47 +02:00
Teodor Tanasoaia
01160c3ad1
Revert "Make shader write&read storage buffers match non readonly layouts" ( #3984 )
2023-07-27 12:33:05 -04:00
Connor Fitzgerald
493ff2e564
Bump wgpu versions
2023-07-20 23:14:11 -04:00
amfaber
a60efbde96
Expose TextureUsages in SurfaceCapabilities ( #3874 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
2023-07-19 22:57:41 +00:00
Aaron Hill
fd5550cc89
Make RequestAdapterOptions.power_preference optional ( #3903 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
2023-07-19 21:04:31 +00:00
dependabot[bot]
db87ee8f20
Bump js-sys from 0.3.63 to 0.3.64 ( #3861 )
...
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
2023-07-19 16:30:14 -04:00
Nicolas Silva
80d19d890c
Update naga to 0.12.0@git:409239c0e2313bfd0dc4fd64f8c3021185ccef1b ( #3935 )
2023-07-18 13:25:48 +02:00
Nicolas Silva
7198d60f68
Validate that BufferDescriptor::usage is not zero ( #3928 )
...
* Validate that BufferDescriptor::usage is not zero.
* Add a changelog entry.
2023-07-14 22:41:34 +02:00
AdrianEddy
e85cc91b5d
Add support for importing external buffers ( #3355 )
2023-07-07 18:00:08 -04:00
Fredrik Fornwall
17143c149c
Make shader write&read storage buffers match non readonly layouts ( #3893 )
2023-06-29 22:30:34 +00:00
daxpedda
88f18ed190
Don't implement Send or Sync on Wasm ( #3691 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
2023-06-29 20:31:18 +00:00
Leo Kettmeir
973cd3ebf8
feat: add link feature ( #3853 )
2023-06-28 12:30:28 +02:00
Pieter-Jan Briers
acb7712c5a
Allow empty scissor rects ( #3863 )
2023-06-15 15:49:06 -04:00
Teodor Tanasoaia
dcad7dfba9
Update naga to 0.12.0@git:76003dc0035d53a474d366dcdf49d2e4d12e921f ( #3866 )
2023-06-14 18:55:33 +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
Connor Fitzgerald
1d2a667b71
Fix trying to use a renderpass inside a compute pass ( #3828 )
...
* Fix trying to use a renderpass inside a compute pass
* Fix pipeline statistics test on mac
* Changelog
2023-06-05 09:05:59 -04:00
Jim Blandy
4478c52deb
wgpu-core: Move Device resource methods into device::resource.
2023-05-24 09:54:03 -07:00
Jim Blandy
286d625428
wgpu-core: Move device/mod.rs's Global impl to device/global.rs.
2023-05-24 09:54:03 -07:00
Jim Blandy
55e3558db4
wgpu-core: Move Resource trait to resource module.
2023-05-24 09:54:03 -07:00
Jim Blandy
4d1fbeb753
wgpu-core: Move storage code to new storage module.
2023-05-24 09:54:03 -07:00
Jim Blandy
17d5361879
wgpu-core: Move registry code to new registry module.
2023-05-24 09:54:03 -07:00
Jim Blandy
29914b308f
wgpu-core: Move identity code to new identity module.
2023-05-24 09:54:03 -07:00
Jim Blandy
13bd3eea55
wgpu-core: Move HalAPI to new hal_api module.
2023-05-24 09:54:03 -07:00
Jim Blandy
f00e6b70ea
wgpu-core: Move Global to new global module.
2023-05-24 09:54:03 -07:00
Malek
dafc189d6b
Fix multiview rendering ( #3779 )
2023-05-19 00:03:57 -04:00
Erich Gubler
0f0044f358
fix(wgpu-core)!: use u32 indices for bind group layouts everywhere ( #3743 )
2023-05-03 20:56:54 -04:00
Jim Blandy
49800337d1
Define wgpu_core::Global::create_render_bundle_error. ( #3746 )
2023-05-03 14:17:18 -07:00
Erich Gubler
3e562aaeaa
docs: note feature req. for Depth32FloatStencil8 ( #3734 )
...
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com >
2023-05-03 10:08:52 +00:00
Timo Kösters
4220a42139
Fix typo ( #3719 )
...
The error previously printed "otherusages" without a space
2023-04-28 23:15:08 +02:00
Erich Gubler
2571af9557
refactor: resolve clippy::redundant_clone ( #3717 )
2023-04-24 17:07:08 +02:00
Connor Fitzgerald
011a4e26d0
Release v0.16.0 ( #3707 )
...
Co-authored-by: Connor Fitzgerald <connor@modyfi.io >
2023-04-19 22:06:21 +00:00
daxpedda
85fc427470
Adjust internal canvas size on Surface::configure() ( #3690 )
2023-04-19 21:09:31 +00:00
Jinlei Li
62ea7813e4
Implement Features::RG11B10UFLOAT_RENDERABLE ( #3701 )
2023-04-19 13:34:29 +02:00
Nicolas Silva
4035748c83
Update naga to 0.11.0@git:b9c5cb5a7841a8728137a58840fbbdbb9b310267 ( #3705 )
2023-04-19 10:54:40 +02:00
François
7c25c00f07
reject binding type multisampled when on a float filterable sample type ( #3686 )
2023-04-13 13:55:56 -04:00
Connor Fitzgerald
a7defb723f
Cleanups for WebGPU ( #3671 )
...
Co-authored-by: Connor Fitzgerald <connor@modyfi.io >
2023-04-12 21:27:30 +00:00
Nicolas Silva
f3bf0f782e
Update naga to 0.11.0@git:f59668ccfaf7bdb3a7e43d84363a21c77357b2fe ( #3665 )
2023-04-11 14:13:16 +00:00
Connor Fitzgerald
51bf95bbd6
Make wgpu-core errors non-exhaustive ( #3652 )
...
Co-authored-by: Connor Fitzgerald <connor@modyfi.io >
2023-04-07 19:18:29 +02:00