Commit Graph

214 Commits

Author SHA1 Message Date
Teodor Tanasoaia
858d7d590e
Fix features of player tests (#4232) 2023-10-11 17:11:47 -04:00
Nicolas Silva
f95d1c55e3
Expose Instance flags (#4230)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-10-11 17:39:04 +00:00
Leo Kettmeir
d0a7f46e3a
update deno and spec (#4143)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-10-04 04:25:56 +00:00
Teodor Tanasoaia
fd02a12726
Make GLES optional on Windows & macOS (#4185) 2023-10-03 16:16:24 -04:00
Nicolas Silva
90b022d437
Print errors in a more readable format in the player. (#4137)
Co-authored-by: Nicolas Silva <nical@fastnmail.com>
2023-09-14 18:12:35 +02: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
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
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
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
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
daxpedda
e4445205c2
Remove emscripten crate features (#3467) 2023-02-15 21:46:00 +00:00
Elabajaba
81569dd6c3
Updated Dxc integration for DX12 backend (#3356)
Co-authored-by: unknown <alimilhim5@gmail.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Closes https://github.com/gfx-rs/wgpu/issues/2722
closes https://github.com/gfx-rs/wgpu/pull/3147
2023-01-18 21:25:56 +00:00
Jinlei Li
0849e78600
Add view_formats in TextureDescriptor (#3237)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Co-authored-by: crowlkats <crowlkats@toaxl.com>
Closes https://github.com/gfx-rs/wgpu/issues/3030
2023-01-18 16:03:56 -05:00
Jinlei Li
33e5b7af26
vulkan feature exclude macOS and iOS by default (#3292)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
Closes https://github.com/gfx-rs/wgpu/issues/3287
2023-01-04 21:35:29 +00:00
Erich Gubler
18f3f5f6f0
Enable unsafe_ops_in_unsafe_fn lint in all workspaces (#3044) 2022-11-14 10:49:39 -08:00
Jinlei Li
cc448817e7
Use cargo 1.64 workspace inheritance feature (#3107) 2022-10-20 01:41:17 -04:00
Connor Fitzgerald
ce081796c8
Rework CI (#3097) 2022-10-14 22:55:36 -04:00
Nicolas Silva
d1ff3838b8
Expose the full Result type to the rust map_async callback (#2939) 2022-10-13 15:41:52 -04:00
daxpedda
02cc2ae234
[BREAKING] Make Shader(Module)Source::Wgsl optional (#2890) 2022-10-08 01:12:50 -04:00
Leo Kettmeir
26f223964e
use custom ser/de impl for TextureFormat (#2908)
Co-authored-by: Alphyr <47725341+a1phyr@users.noreply.github.com>
2022-09-29 13:43:50 -04:00
Imbris
41006d7a88
Buffer usages mismatch check and documentation for mapped_at_creation size requirement. (#3023)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2022-09-19 04:41:29 +00:00
Alphyr
d1c94d09e2
Update dependencies (#3021) 2022-09-18 23:53:21 -04:00
i509VCB
9e3efd7019
pass around RawDisplayHandle and RawWindowHandle in implementation (#3022)
This change is to help with an attempt to allow the Context type in wgpu to be swappable at runtime. In order to do that, the functions provided by Context and it's associated types need to be object safe. Instead of passing a impl trait that combines both HasRawWindowHandle and HasRawDisplayHandle, we seperate the types into their RawDisplayHandle and RawWindowHandle parts internally to reduce some of the hal implementation code mess.
2022-09-15 16:29:20 -07:00
Jim Blandy
d655017439
Implement "strict_asserts" feature in wgpu-core. (#2872)
Since `wgpu-core`'s public functions are supposed to validate their
parameters, the internal `track` module skips many of Rust's usual
run-time checks in release builds. However, some `wgpu-core` users are
happy to pay the performance cost in exchange for more safety. The
`"strict_asserts"` feature causes `wgpu_core` to perform the same
checks in release builds as it does in debug builds.
2022-08-08 00:45:39 -04:00
Wyatt Herkamp
f7526ae960
winit 0.27 Update and raw-window-handle 0.5 (#2918) 2022-08-04 06:09:37 +00:00
Connor Fitzgerald
ea05b44f38
Improve Presentation Api (#2803)
* Add new presentation modes

* Expand presentation formats

* Add Surface::get_supported_modes

* Update to rust 2021 and improve some metal surface code

* Update wgpu-types/src/lib.rs

Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com>

* Fix windows build errors

* Fix issues with ALLOW_TEARING

Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com>
2022-06-30 14:24:17 -04:00
Jinlei Li
61796b1d59
Relax render pass color_attachments validation (#2778)
* Make the color attachments `Option`-al in render pipelines, render passes, and render bundles

* vk:  `Option`-al color attachments support

* dx12: sparse color_attachments support

* Only non-hole attachments is supported on wasm target and gl backend

* deno_webgpu: `Option`-al color attachments support

* Follow all suggestions
2022-06-27 16:10:18 -07:00
Connor Fitzgerald
5bd0a6c4ac
Implement submission indexes (#2700)
* Implement submission indexes

* Write some unit tests for poll

* Update wgpu/src/lib.rs

Co-authored-by: Jim Blandy <jimb@red-bean.com>

* Unify Maintain in both wgc and wgpu

Co-authored-by: Jim Blandy <jimb@red-bean.com>
2022-06-05 17:22:25 -04:00
Connor Fitzgerald
32af4f5607
Convert map_async from being async to being callback based (#2698) 2022-05-31 11:22:21 -04:00
Jinlei Li
8063edc648
Add DEPTH24UNORM_STENCIL8 feature (#2689) 2022-05-30 15:29:12 -04:00
Jinlei Li
0c1233b834
Move TEXTURE_COMPRESSION_ETC2 | ASTC_LDR to web section to match spec (#2671) 2022-05-18 12:38:53 -04:00
Jinlei Li
26f96c7dfe
Add DEPTH32FLOAT_STENCIL8 featue (#2664) 2022-05-17 02:11:05 -04:00
Connor Fitzgerald
e54a36ee78
Move texture-array example over to wgsl (#2618) 2022-04-25 18:32:53 +00:00
Jim Blandy
579f809573 Avoid new WGSL reserved words in wgpu examples. 2022-04-17 21:33:55 -07:00
Igor Shaposhnik
eff50436f5 Update to Naga rev 1720725 2022-04-15 22:22:48 +03:00
Lucas Kent
bfcdcd6486
Update dev deps (#2493) 2022-02-18 23:24:18 -05:00
Samuel Hurel
3e0305d27d
Allow non struct buffers in wgsl (#2451)
* Bump naga

* Update examples
2022-02-05 09:53:04 -05:00
Jim Blandy
36ce638381 IdentityManager: from_index method is unneeded.
The `min_index` parameter has no useful effect. Because the range 0..n is pushed
on the free list, index values less than `min_index` do get allocated.

Document `IdentityManager` and `TypedId`.
2022-01-28 01:03:15 -05:00
João Capucho
dcd07f0391 Update to upstream naga 2022-01-22 18:36:26 -05:00
Dzmitry Malyshau
1e593a6bd3
Trace push/pop debug group on command encoder (#2294) 2021-12-15 17:48:48 +00:00
Dzmitry Malyshau
3960658529
Remove block decorations (#2292) 2021-12-15 12:29:37 -05:00
Dzmitry Malyshau
cdf948b920 Fix and re-enable player tests 2021-12-03 17:11:26 -05:00
Dzmitry Malyshau
6372aad845 Rename fill_buffer back to clear_buffer 2021-12-02 12:33:59 -05:00
Igor Shaposhnik
c6d1491bb1 Update raw-window-handle to 0.4 2021-12-01 15:59:05 -05:00
Jerónimo Sánchez
052cb3da39
Renaming CommandEncoder::clearBuffer to CommandEncoder::fillBuffer (#2174)
* Renamed clear_buffer to fill_buffer (keeping up with spec)
* fill_buffer does not require CLEAR_BUFFER feature

* Changed ClearBuffer to FillBuffer for `trace` feature

* Renamed clearBuffer for web backend
2021-11-14 19:16:10 -05:00