354 Commits

Author SHA1 Message Date
Connor Fitzgerald
cf17230e32 Fix d3d12 version 2023-01-25 19:32:47 -05:00
Connor Fitzgerald
d3fec9524f Release of 0.15 (#3424) 2023-01-25 19:25:41 -05:00
Teodor Tanasoaia
d2809137ba Zero-initialize workgroup memory (#3174)
fixes https://github.com/gfx-rs/wgpu/issues/2430
2023-01-25 18:28:35 -05:00
Connor Fitzgerald
95a760bb42 Implement queue.copy_external_image_to_texture for WebGL2 and improve WebGPU Impl (#3288)
Co-authored-by: Teodor Tanasoaia <28601907+teoxoy@users.noreply.github.com>
Closes https://github.com/gfx-rs/wgpu/issues/1888
2023-01-24 18:44:15 +00:00
Josh Groves
5a999e624a Update glow to 0.12.0 (#3417) 2023-01-24 02:36:31 +00:00
Xiaopeng Li
24a904256e Add create_surface_from_surface_handle (#3225)
Co-authored-by: lixiaopeng.jetspark <lixiaopeng.jetspark@bytedance.com>
2023-01-19 11:16:11 -05:00
Nicolas Silva
a3e3d2503f Update naga to 1be8024. (#3405) 2023-01-19 15:25:25 +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
Connor Fitzgerald
2ecced0c88 Improve write_buffer_with Spans (#3383) 2023-01-15 03:11:14 -05:00
Leo Kettmeir
b39c0b9de1 update deno (#3379)
* update deno

* update spec

* remove unrelated changes
2023-01-14 17:07:46 +01:00
Teodor Tanasoaia
48fbb921ca update ash (#3370)
fixes https://github.com/gfx-rs/wgpu/issues/3079
2023-01-11 15:58:52 +00:00
Nicolas Silva
5a2e60c50e Update naga to e98bd92 (#3352) 2023-01-10 14:04:18 -05:00
Leo Kettmeir
2252b1209a feat(deno): surface support (#3265) 2023-01-09 16:44:20 +01:00
Connor Fitzgerald
5241633b3a Implement Presentation Timestamp Correlation (#3240)
Co-authored-by: Jim Blandy <jimb@red-bean.com>
2022-12-20 17:52:08 +00:00
Elabajaba
f3c50918c2 Suballocate DX12 buffer creation (#3163)
closes https://github.com/gfx-rs/wgpu/issues/2720
2022-12-20 12:23:44 -05:00
Harald Reingruber
f0f700c2d9 Test setup for WebAssembly+WebGL (#3238)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2022-12-09 01:02:39 +00:00
Elabajaba
85fda2d18e Update to ash 0.37.1 to replace deprecated function call (#3273)
* update to ash 0.37.1 to fix CI

* changelog

* Use equals for ash version

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2022-12-08 15:22:30 -05:00
Jim Blandy
a50836e0cb Make wgpu-core users responsible for choosing back ends. (#3254) 2022-12-07 20:58:45 -05:00
Jim Blandy
3d33ace8d7 Update workspace Cargo.lock for new deno_webgpu version. (#3270) 2022-12-06 19:06:21 +00:00
Leo Kettmeir
9cc0ff1cd5 chore: update deno (#3258)
* update deno
* bump ver
2022-12-03 09:35:10 -08:00
Erich Gubler
9bb2d28ce2 Add cargo-deny to CI (#3185) 2022-11-30 16:46:58 -05:00
Nicolas Silva
82e9dcf8f7 Allow unspecified bits when deserializing the API's bitflags (#3229) 2022-11-25 23:13:22 -05:00
Jim Blandy
596d8851aa Update ndk-sys to v0.4.1+23.1.7779620, to fix checksum failures. (#3232) 2022-11-23 15:29:22 -05:00
Xiaopeng Li
ccabcad6bb Update naga (#3144) 2022-10-28 11:46:43 -04:00
Connor Fitzgerald
c4533971c0 Struct Alignment Test (#3125) 2022-10-26 23:37:25 +00: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
i509VCB
7aca31fe9c allow creation of wgpu_hal textures for gles backend (#3046)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2022-10-13 06:41:12 +00:00
Lucas Kent
81dc1e24eb Update cargo-run-wasm (#3057) 2022-10-08 22:51:01 -04:00
Connor Fitzgerald
872b436104 Update version to 0.14 2022-10-05 18:45:25 -04:00
Connor Fitzgerald
91e0dbd1ae Update naga + deps 2022-10-05 18:45:25 -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
Xiaopeng Li
c927e810de Fix label leak (#3053) 2022-09-27 02:49:21 -04:00
Jinlei Li
ffd733726a Update wasm32 dependencies, set alpha_mode on web target (#3040) 2022-09-20 06:53:55 +00:00
Alphyr
d1c94d09e2 Update dependencies (#3021) 2022-09-18 23:53:21 -04:00
i509VCB
b752c7d248 statically assert public wgpu types appropriately implement Send and Sync (#3025) 2022-09-16 12:36:23 -04:00
François
a50335f0f8 use smallvec instead of onplace_it with fixed size 2022-09-02 11:41:20 -07:00
Jim Blandy
58bc205f2a Update to Naga b209d911 (2022-9-1).
This removes an expected failure on AMD RADV. I guess #2751 was our
bug all along.
2022-09-02 11:33:55 -07: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
e125321bff Release 0.13 two - electric boogaloo (#2827) 2022-07-01 14:38:04 +00:00
Connor Fitzgerald
1ceef24261 Add changelog for 0.13 (#2823)
* Changelog

* Update CHANGELOG.md

* Bump versions to 0.13
2022-06-30 20:25:49 +00:00
Jinlei Li
0eb6845b6a web: march web-sys 0.3.58, sparse attachments support (#2813) 2022-06-28 14:15:57 -04:00
Jim Blandy
7cfbd874af Update Naga to 27d38aae (2022-6-27). (#2816) 2022-06-27 21:36:00 -04:00
Nicolas Silva
892c272d18 Replace android-properties with android_system_properties. (#2815)
The former use statically linked Android libc symbols while the latter loads them dynamically. This is required to support old and new versions of Android with the same binary. It unblocks updating wgpu in Gecko.

Fixes #2805.
2022-06-27 16:56:11 -04:00
Jim Blandy
aba7197fe8 Update Naga to 0b60f410 (Thu 2022-6-16). (#2779) 2022-06-17 16:51:22 -04:00
Nicolas Silva
191537021e Expose naga span location helpers (#2752)
* Expose the source location in CreateShaderModuleError.

* Bump naga dep to 89bed99.
2022-06-14 23:10:22 -04:00
Steven
df1472d4a3 Fix bunnymark test screenshot and replace rand with nanorand (#2746)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2022-06-10 21:44:27 +00:00
Harald Reingruber
25b16d5cc8 OffscreenCanvas Support for WebGL Backend (#2603)
* First attempt of exposing create_surface_from_canvas for webgl

* Test Fix Compile For WebGL Offscreen Canvas

* Only specify web-sys feature version in wgpu-core, so that patch version is taken from workspace

* Reuse already existing fn create_surface_from_canvas

* Remove unnecessary unsafe

* Remove unsafe prefix also from top-level create_surface_from_canvas

* Add create_surface_from_offscreen_canvas() for webgl

* Cargo fmt

* Store webgl2_context instead of canvas, which works also for OffscreenCanvas

* Copy skybox example for OffscreenCanvas example

* Use offscreen_canvas instead in newly created example

* Update skypbox_offscreen readme.md

* Allow enabling OffscreenCanvas in examples via http://localhost:8000/?offscreen_canvas=true

* Fix cargo fmt

* [fix warning] Only import FromStr for wasm32

* [fix warning] Exclude offscreen_canvas_setup from non-wasm32

* [fix warning] Add ImageBitmap feature as well so that all related methods can be used

* Fix cargo fmt

* Fix emscripten build

* Remove `webgl` feature from wgpu-core as webgl is the only wasm32 backend

Co-authored-by: Zicklag <zicklag@katharostech.com>
2022-06-07 01:57:16 -04:00
Robert Bragg
444836f747 Acquire texture: Option<std::time::Duration> timeouts (#2724)
* surface.acquire_texture: pass Option<Duration> for timeout

A std::time::Duration allows for timeouts to be specified more clearly in
Rust using whatever units are convenient for the caller, and an Option also
makes it clearer in case no timeout is wanted, as opposed to passing a
bitwise !0 as special timeout value.

Notably there was an impedance mismatch with the Vulkan backend that
takes a 64bit timeout in nanoseconds and uses u64::MAX to indicate no
timeout and the backend was not mapping a given u32::MAX into a u64::MAX

* surface.acquire_texture: ignore timeout for Android < 11

Prior to Android 11 then Android's vkAcquireNextImageKHR implementation was
non-conformant and didn't support timeouts and additionally would log a
verbose warning if a timeout was requested.

For reference this version of AcquireNextImageKHR doesn't support timeouts:
https://android.googlesource.com/platform/frameworks/native/+/refs/tags/android-mainline-10.0.0_r13/vulkan/libvulkan/swapchain.cpp#1426
and this version does:
https://android.googlesource.com/platform/frameworks/native/+/refs/tags/android-mainline-11.0.0_r45/vulkan/libvulkan/swapchain.cpp#1438
(i.e. timeout support was added in Android 11)

This patch adds a dependency on the `android-properties` crate that provides
a simple wrapper for the `__system_property_set` syscall so that the
platform version can be read via the `ro.build.version.sdk` property
and then for versions < 30 (corresponds to Android 11) any timeout
given to `acquire_texture` will be ignored (and `u64::MAX` will be
passed to Vulkan)
2022-06-04 16:05:40 +00:00
Connor Fitzgerald
32af4f5607 Convert map_async from being async to being callback based (#2698) 2022-05-31 11:22:21 -04:00