Commit Graph
115 Commits
Author SHA1 Message Date
Connor Fitzgerald 4dc0e265ac Merge pull request #1764 from kvark/submitted-work
Implement onSubmittedWorkDone
2021-08-12 00:06:45 -04:00
Dzmitry Malyshau 4a1ae0d7ec Issue surface texture transitions 2021-08-11 20:58:42 -04:00
Dzmitry Malyshau dffe1f1793 Return a texture by the surface 2021-08-11 20:58:42 -04:00
Dzmitry Malyshau f78061bcef Merge swap chain into surface 2021-08-11 20:58:42 -04:00
Dzmitry Malyshau 80cf1ffff9 Implement onSubmittedWorkDone 2021-08-04 01:03:26 -04:00
Zicklag 07cd75a36b Fix New Clippy Lints From Rust 1.54.0
Fixes a number of new lints introduce in the updated clippy that
CI is now using.
2021-07-29 16:29:46 -05:00
Dzmitry Malyshau 09c9ab5e75 Fix buffer memory initialization to use the tracker consistently 2021-07-22 01:19:53 -04:00
Dzmitry Malyshau 0df804e9c2 hal/dx12: bunch of validation fixes 2021-07-13 02:54:37 -04:00
Dzmitry Malyshau 35ee65707f hal: make copy to work on one array layer at a time 2021-07-13 01:01:26 -04:00
Dzmitry Malyshau 8db6f99a3e Suspect new resources for destruction only after the current submission is tracked 2021-07-01 02:02:16 -04:00
Dzmitry Malyshau ba006cfaa7 Rename ColorWrite, TextureUsage, and BufferUsage 2021-06-30 14:57:38 -04:00
Dzmitry Malyshau 568ac3fa24 Switch all bitflag names to plural 2021-06-30 14:43:36 -04:00
Dzmitry Malyshau cfed43face Update submission indices on all stateless resources 2021-06-24 01:40:18 -04:00
Dzmitry Malyshau c2f879b4f7 Don't merge stateless trackers from bind groups 2021-06-23 15:28:40 -04:00
Gordon-F 2873ac32d9 Remove MPL 2.0 header in files 2021-06-19 21:06:08 +03:00
Dzmitry Malyshau 9c8d4dbfa6 Hot patch for temp_suspected tracking 2021-06-18 10:59:47 -04:00
Dzmitry Malyshau 80ab18404e Change the order to suspect temporary resources earlier 2021-06-18 02:49:46 -04:00
Dzmitry Malyshau 9d85602349 hal: re-architect command encoding and pooling 2021-06-14 13:30:28 -04:00
Dzmitry Malyshau c2bb2d5dfc Experimental command pool API 2021-06-14 01:58:09 -04:00
Dzmitry Malyshau faf8f7e890 Simple API for coherent mapping 2021-06-10 16:05:44 -04:00
Dzmitry Malyshau d88aa99997 Fix rows-per-image treatment, clippy warnings 2021-06-10 15:43:21 -04:00
Dzmitry Malyshau 006f8abbba build and clippy fixes, command buffer cleanup 2021-06-10 12:44:29 -04:00
Dzmitry Malyshau 6d229847be hal: redesign the bind group descriptor 2021-06-08 17:12:28 -04:00
Dzmitry Malyshau ff2a3e84fc update synchronization, fix last errors in wgc 2021-06-08 02:03:44 -04:00
Dzmitry Malyshau 0a82c232ba hal: port the rest of wgpu-core 2021-06-08 00:46:08 -04:00
Dzmitry Malyshau c61ee1262b hal: transfer operations 2021-06-08 00:46:08 -04:00
Dzmitry Malyshau 6d51fab864 hal:: Fill the command buffer calls 2021-06-08 00:46:08 -04:00
Dzmitry Malyshau 569cd0cdd6 WIP new wgpu-hal 2021-06-08 00:46:08 -04:00
Dzmitry Malyshau beb88b0a88 Skip the cube compatibility on a downlevel flag 2021-06-01 08:29:44 -04:00
bors[bot]andDzmitry Malyshau 9cd01635d7 Merge #1417
1417: Split the tracker into stateful/stateless to reduce the overhead r=cwfitzgerald a=kvark

**Connections**
Implements https://github.com/gfx-rs/wgpu/issues/1413#issuecomment-851604344
Reduces the overhead for resource tracking in the Animometer benchmark by up to 50%.

**Description**
We used to use the full tracker set on the usage scopes associated with compute/render passes. A resource tracker has 2 responsibilities: ensuring the resource is held alive, and validating and recording the state transitions. This PR exploits the fact that the latter responsibility is only applicable for buffers and textures. So doing all the lifetime tracking for a pass is a waste: we can instead just attach the lifetimes to the parent command buffer, straight.

In the Animometer benchmark, there is one large buffer, and thousands of bind groups pointing to different offsets into it. The old code would fill up the pass tracker with those bind groups, and then merge it into the command buffer tracker. The new code would just fill up the command buffer tracker instead. Since there is only one buffer, the pass tracking becomes much lighter.

**Testing**
Untested. It would be nice to have some benchmarks here, possibly after #1397 ?

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-06-01 06:45:05 +00:00
Dzmitry Malyshau 7b7e72b1c2 Split the tracker into stateful/stateless to reduce the overhead 2021-05-31 14:18:44 -04:00
Dzmitry Malyshau e9d2f402f1 Improve handling of erroring command buffers on submission 2021-05-20 15:35:14 -04:00
Dzmitry Malyshau 6ff618aafb Big refactor of the profiling usage 2021-04-29 02:06:58 -04:00
Dzmitry Malyshau 087bd07f55 Add shader compile markers 2021-04-27 12:23:28 -04:00
Dzmitry Malyshau c0478c707d Address clippy issues on copying things 2021-04-14 15:23:20 -04:00
Joshua Groves 9058f3ba62 Rename copy views and layout to match spec 2021-03-23 00:48:42 -02:30
Andreas Reich 720c73fa9c Review feedback / fix validate_linear_texture_data 2021-03-21 09:01:31 +01:00
Andreas Reich 50043875e5 rows_per_image & rows_per_image are now optional
Fixes #988
2021-03-20 12:33:28 +01:00
Connor Fitzgerald cf6f9c3ca8 Move from tracing to log + profiling 2021-03-17 01:22:30 -04:00
Dzmitry Malyshau 231bba03a1 Lint all the things 2021-03-12 12:39:04 -05:00
Anthony CowleyandDzmitry Malyshau f01feacc2e Update gfx and naga to gfx-13 tag (#1248)
* wgpu-core: update gfx-hal usage related to sparse resources

* wgpu-core: support naga gfx-13

* Update gfx and naga dependencies to gfx-13 tag

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-10 00:04:16 -05:00
bors[bot]andDzmitry Malyshau c3e95273ff Merge #1243
1243: Force-drop the token before calling fire_map_callbacks r=kvark a=kvark

**Connections**
Related to WebGPU update in Gecko

**Description**
Since the token was alive, technically, we saw an assertion firing up about concurrent access to the token root.

**Testing**
Tested in Gecko

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2021-03-02 19:12:58 +00:00
Dzmitry Malyshau d20ab66741 Force-drop the token before calling fire_map_callbacks 2021-03-01 16:34:07 -05:00
Dzmitry Malyshau 103e7763a3 Rename depth to depth_or_array_layers 2021-03-01 11:08:17 -05:00
Aaron Hill 12b086d92d Move #[error] attributes after the corresponding #[derive]
This fixes Nightly warnings

See https://github.com/rust-lang/rust/issues/79202
2021-02-25 15:40:11 -05:00
Andreas Reich 3486fde638 Fix crash on zero init of buffer with no more ref count
Previously, if a buffer would no longer have any reference, the zero init step crashed when trying to unwrap its ref_count.
2021-02-06 11:11:10 +01:00
bors[bot]andDzmitry Malyshau 7c7501cab7 Merge #1182
1182: Update all versions r=kvark a=kvark

**Connections**
Picks up https://github.com/gfx-rs/gfx/pull/3620 and a bunch of other fixes in gfx-rs and naga.

**Description**
Updates the dependencies ("gfx-9" naga train) as well as self version to 0.7, to match the v0.7 branch.

**Testing**
Should just work :)

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-02-01 05:37:39 +00:00
Dzmitry Malyshau 8ed543f26a Update all versions 2021-02-01 00:35:40 -05:00
Andreas Reich 4f5acba5fb Fixed too eager lock usage, fixed O(N²) buffer range collapse 2021-01-31 21:56:31 +01:00
Andreas Reich 31d292b169 added clear helper method to memory_init_tracker, renamed drain 2021-01-31 21:56:31 +01:00