Commit Graph
8897 Commits
Author SHA1 Message Date
bors[bot]andDzmitry Malyshau 644949d945 Merge #637
637: Wait for idle before destroying swapchains r=kvark a=kvark

Follow up to #636 
I was trying to address the D3D12 error in https://github.com/gfx-rs/gfx/issues/3242
The debug messages complain about a resource being used by the queue while it's being destroyed. I thought forcing a wait there would help, but it does not. I think it's still a good change to land though.

In the meantime, I wonder if it considers the swapchain to be used because it's currently presented. Could be something else I'm missing here.

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2020-05-04 03:47:15 +00:00
Dzmitry Malyshau 71d4f77ab8 Wait for idle before destroying swapchains 2020-05-03 23:39:05 -04:00
bors[bot]andDzmitry Malyshau 1e43dafa4d Merge #636
636: Properly destroy swap chains r=kvark a=kvark

This is the last piece of the cleanup puzzle, I think, as closing an example becomes fully validation-free 🎉 

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-05-04 02:35:14 +00:00
Dzmitry Malyshau 831d908663 Properly destroy swap chains 2020-05-03 22:13:43 -04:00
Dzmitry Malyshau 7a3fd709da Create issue templates 2020-05-02 22:39:48 -04:00
bors[bot]andPaul Kernfeld 48decb6d78 Merge #634
634: Make assertions more verbose in src/command r=kvark a=paulkernfeld

This contributes to #485

Co-authored-by: Paul Kernfeld <paulkernfeld@gmail.com>
2020-05-02 22:35:42 +00:00
Paul Kernfeld cc2e6db7f5 Make assertions more verbose in src/command
This contributes to #485
2020-05-02 13:16:09 -04:00
bors[bot]andRukai 81a725c561 [rs] Merge #295
295: Remove wasm-bindgen patches r=grovesNL a=rukai

A new release occurred with the required fixes, so we no longer need to patch it.

Co-authored-by: Rukai <rubickent@gmail.com>
2020-05-02 12:44:45 +00:00
Rukai 881071a21a [rs] Remove wasm-bindgen patches 2020-05-02 22:41:15 +10:00
bors[bot]andIgor Shaposhnik 9911115d78 Merge #633
633: Fix build status badge r=grovesNL a=Gordon-F

fix #630 

Co-authored-by: Igor Shaposhnik <Gordon-F@users.noreply.github.com>
2020-05-02 12:26:04 +00:00
Igor Shaposhnik 6d455e4479 Fix build status badge 2020-05-02 12:10:29 +03:00
bors[bot]andDzmitry Malyshau 3586f123c9 [rs] Merge #291
291: Update for wgpu-core r=grovesNL a=kvark

Depends on https://github.com/gfx-rs/wgpu/pull/619
Closes #285

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-05-02 03:59:45 +00:00
bors[bot]andDzmitry Malyshau 3059109f77 Merge #632
632: Fix player validation errors on exit r=kvark a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-05-02 03:34:34 +00:00
Dzmitry Malyshau 2d09b1d08d Fix player validation errors on exit 2020-05-01 23:33:16 -04:00
bors[bot]andmitchmindtree 6d920185fa Merge #628
628: Implement `From<TextureFormat>` for `TextureComponentType` r=kvark a=mitchmindtree



Co-authored-by: mitchmindtree <mitchell.nordine@gmail.com>
2020-05-02 02:01:43 +00:00
mitchmindtree a8b8bc8283 Implement From<TextureFormat> for TextureComponentType 2020-05-02 02:33:22 +02:00
Dzmitry Malyshau 5bbe6ec38c Integrate with RenderDoc on winit-less captures (#627) 2020-05-01 15:34:32 -04:00
Igor Shaposhnik 0a0ef9a100 Split CI jobs by OS (#626) 2020-05-01 13:32:38 -04:00
Dzmitry Malyshau bce6358eb1 Create .monocodus 2020-05-01 09:59:37 -04:00
bors[bot]andDzmitry Malyshau e2100b6911 Merge #621
621: Keep Adapter alive r=grovesNL a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-05-01 04:30:09 +00:00
Dzmitry Malyshau f35dd741aa Android support (#625) 2020-05-01 00:22:00 -04:00
Dzmitry Malyshau 288f8342b1 Don't drop the Global on panic 2020-05-01 00:20:54 -04:00
Dzmitry Malyshau 9500cfa4f3 Keep Adapter alive by the device 2020-05-01 00:20:54 -04:00
Paul KernfeldandPaul Kernfeld 29fe9a935a Make assertions in wgpu-core device/mod.rs verbose (#622)
Co-authored-by: Paul Kernfeld <paulkernfeld@gmail.com>
2020-05-01 00:05:13 -04:00
Dzmitry Malyshau 26b424e35b [rs] Update for wgpu-core 2020-04-30 15:52:16 -04:00
Dzmitry Malyshau f64b2dd3bb trace: make Id serialization nicer 2020-04-30 09:55:52 -04:00
Dzmitry Malyshau 3c68fb17e4 player: full winit integration 2020-04-30 09:55:52 -04:00
Dzmitry Malyshau 77a5eda796 trace: fix reusing object ids 2020-04-30 09:55:52 -04:00
Dzmitry Malyshau 854c1be035 trace: support pipelines, refactor destruction sequence 2020-04-30 09:55:52 -04:00
Dzmitry Malyshau 018417f174 trace: replaying all the commands 2020-04-30 09:55:52 -04:00
Dzmitry Malyshau 47f37ad78e trace: player skeleton 2020-04-30 09:55:52 -04:00
Dzmitry Malyshau 622d9ecc74 trace: all the commands 2020-04-30 09:55:52 -04:00
Dzmitry Malyshau d4705b6008 trace: bind groups, shaders, and buffer contents 2020-04-30 09:55:52 -04:00
Dzmitry Malyshau 1cc548a7a2 Make descriptors generic over Label 2020-04-30 09:55:52 -04:00
Dzmitry Malyshau 4c1ea02553 trace: hook up RON output 2020-04-30 09:55:52 -04:00
Dzmitry Malyshau 5035ffdfe2 Split limits and private features, add tracing module 2020-04-30 09:55:52 -04:00
Dzmitry Malyshau 0e533547a1 Split serde feature into trace+replay 2020-04-30 09:55:52 -04:00
Gabriel Majeri d45323505c Add links to docs in README 2020-04-27 09:27:34 -04:00
bors[bot]andDzmitry Malyshau a60fc025aa [rs] Merge #281
281: The Context trait r=grovesNL a=kvark

The main motivation here is to avoid blocking the wgpu-core updates by `wgpu-native`. Instead, `wgpu-native` becomes a branch, and the dependency of `wgpu-rs` -> `wgpu-native` starts adhering to the contract/API of the standard webgpu-native headers.

The biggest change is the introduction of the Context trait. I recall us discussing 2 downsides to having this trait:
  1. inconvenient for the users to include. This is a non-issue here, since it's private.
  2. more code to maintain. This is less of an issue if we aim to have 3 backends.

What this gives in return is a well established contract with the backends. Unlike gfx-rs, the backend code is right here, a part of the crate, so the contract is only for internal use.

Fixes #156 : the "direct" implementation of it goes straight to wgpu-core. What this gives us is less overhead for command recording, since there is no longer an extra indirection on every command, and no heap allocation at the end of a render pass.

The downside of this PR is one extra `Arc` (with addref) per object.

This commit also has small improvements:
- consuming command buffers on submit (Fixes #267)
- Instance type
- proper call to destructors
- fallible `request_device`

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-27 04:12:38 +00:00
Dzmitry Malyshau 196e0dba7e [rs] Small comment on WebGPU backend bit, readme update 2020-04-27 00:11:22 -04:00
Dzmitry Malyshau 7633f48617 [rs] Port the Web backend to the Context trait 2020-04-26 19:18:24 -04:00
Dzmitry Malyshau 03258c2171 [rs] Move everything into Context trait, remove async 2020-04-26 19:18:24 -04:00
Dzmitry Malyshau 1fb8e7bb5e [rs] Rewire the backend system to remove wgpu-native step
Main change here is the introduction of the Context trait.
The "direct" implementation of it goes straight to wgpu-core.

This commit also has small improvements:
- consuming command buffers on submit
- Instance type
- proper call to destructors
2020-04-26 19:18:24 -04:00
Chinedu Francis Nwafili 35e07f4172 [rs] Add screenshots of examples
When looking into wgpu-rs as a replacement for WebGL I went to the
examples directory on GitHub to browse for a bit.

I wanted to see some of the examples at a glance without needing to
clone the repository.

This commit enables that by adding a README to each example with a
description of the example and screenshots / example output.

In a few cases the description is a bit redundant - but my hope is that
in the future we can improve all the READMEs.

Being a web API and thus very accessible, WebGPU could end up being many
people's first introduction to graphics programming so the lower we make
the barrier the better.
2020-04-26 18:59:48 -02:30
bors[bot]andRukai 455f5cb224 [rs] Merge #280
280: Add required wasm-bindgen patches to readme r=grovesNL a=rukai

Fixes https://github.com/gfx-rs/wgpu-rs/issues/279

Co-authored-by: Rukai <rubickent@gmail.com>
2020-04-25 03:03:56 +00:00
Rukai 1e8cc73e66 [rs] Add required wasm-bindgen patches to readme 2020-04-25 12:09:13 +10:00
bors[bot]andDzmitry Malyshau bc065e4abc Merge #615
615: Use General allocator at all times for now r=grovesNL a=kvark

In all user-managed resources, we don't have control of the lifetime. Since we don't know when it's released, we can't use any more specific allocator kind than `General`.

Previously, we assumed that buffers created for MAP_READ+COPY_SRC, for example, were one-time buffers created to copy data. However, there appear to be cases where they were used to fill data in once, and then persistently used as a copy source destination.

In the future, one WebGPU data transfer story is settled, we'll be able to use `Linear` kind again for all internally managed uploads. I.e. writeBuffer, writeTexture, and createBuffeMappedOnlyAtStart.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-25 02:08:54 +00:00
Dzmitry Malyshau fc68b5ef54 Use General allocator at all times for now 2020-04-24 21:59:41 -04:00
Dzmitry Malyshau 09d3623885 Minor error reporting fixes (#607) 2020-04-24 21:58:30 -04:00
Gabriel Majeri b8f8dd78fd Run tests in CI 2020-04-24 22:43:14 -02:30