Commit Graph

876 Commits

Author SHA1 Message Date
bors[bot]
729ecb1404
Merge #582
582: Track pipeline layout lifetime r=grovesNL a=kvark

Fixes #580
This one is interesting: it's not instantly destroyed when dropped, like bind group layouts. And it's not tracked for GPU usage like the resources. It's somewhat in-between. We have the following classes of tracking now:
  1. no tracking, destroyed on drop. Applies to: bind group layouts, adapters
  2. only CPU-side tracking. They go to "suspected" list on drop of self or anything that can point to them. Applies to: pipeline layouts
  3. full GPU tracking. They go to "suspected" list on drop, then get associated with active submission before destruction. Applies to: buffers, textures, views, bind groups, pipelines

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-14 13:08:29 +00:00
bors[bot]
96a4a34b83
Merge #581
581: Fix buffer unmap warning r=kvark a=kvark

It's more consistent if neither map_buffer or unmap_buffer care about the status.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-14 11:24:19 +00:00
Dzmitry Malyshau
3cc4fa51bc Track pipeline layout lifetime 2020-04-14 00:58:30 -04:00
Dzmitry Malyshau
a0701b41cb Fix buffer unmap warning 2020-04-14 00:08:04 -04:00
bors[bot]
49dbe08f37
Merge #578
578: Comment fixes, header update r=kvark a=kvark

Matches review fixes in https://phabricator.services.mozilla.com/D70707

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-13 22:49:11 +00:00
Dzmitry Malyshau
379ea37982 Comment fixes, header update 2020-04-13 18:48:08 -04:00
bors[bot]
8d1185f3e9
Merge #577
577: Remove array layer count from texture descriptor r=grovesNL a=kvark

Matches https://github.com/gpuweb/gpuweb/pull/613

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-13 18:16:06 +00:00
Dzmitry Malyshau
d9609ec269 Remove array layer count from texture descriptor 2020-04-13 11:44:10 -04:00
bors[bot]
f50dd7a299
Merge #570
570: Improve error message when bind group and bind group layout have different number of entries r=kvark a=HalfVoxel



Co-authored-by: Aron Granberg <aron.granberg@gmail.com>
2020-04-13 00:17:43 +00:00
bors[bot]
312fa3da62
Merge #573
573: Fix read-only flags r=kvark a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-12 00:51:26 +00:00
Dzmitry Malyshau
357ee9a447 Fix read-only flags 2020-04-11 20:50:20 -04:00
Aron Granberg
3db1e6c10d Improve error message when bind group and bind group layout have different number of entries 2020-04-11 11:22:40 +02:00
bors[bot]
6b627451bc
Merge #565
565: Usage tracking fixes for swapchain and command buffers r=kvark a=kvark

Fixes #561 
see description in commit messages

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-10 04:40:15 +00:00
Dzmitry Malyshau
920c00931d Fix tracking of the initial state during replacement.
When multiple "replace" style transitions are happening,
we weren't properly retaining the "first" state, which
is required for proper stitching of command buffers.

This logic is fixed and fortified with a new set of
"change" and "merge" tests in the track module.
2020-04-10 00:39:23 -04:00
Dzmitry Malyshau
74e9e89fe7 Refactor tracking of swapchain images as attachments
We were improperly detecting if a swapchain image has already
been used by a command buffer. In this case, we need to assume
that it's already in the PRESENT state.
2020-04-10 00:38:53 -04:00
bors[bot]
65a0f4afa0
Merge #560
560: Update ffi for wgpu-remote r=kvark a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-09 16:18:55 +00:00
bors[bot]
0d5442d1c0
Merge #562
562: Increase default maximum vertex buffer inputs from 8 to 16 r=kvark a=aloucks

Additionally, the input states are now stored in a `SmallVec` to enable higher limits.

Fixes #558

Co-authored-by: Aaron Loucks <aloucks@cofront.net>
2020-04-08 13:49:35 +00:00
Dzmitry Malyshau
ee2e56446c Update ffi for wgpu-remote 2020-04-07 22:16:46 -04:00
Aaron Loucks
b6ec8440e9 Increase default maximum vertex buffer inputs from 8 to 16
Additionally, the input states are now stored in a `SmallVec` to
enable higher limits.

Fixes #558
2020-04-07 21:00:06 -04:00
bors[bot]
77d95f5ecd
Merge #556
556: Preparations for wgpu-0.5 release r=grovesNL a=kvark

Based on #555 

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-06 12:57:11 +00:00
Dzmitry Malyshau
7dba052900 Version bump and CHANGELOG update 2020-04-06 08:55:39 -04:00
Dzmitry Malyshau
a3aefe2535 Rustfmt stable pass 2020-04-06 08:55:39 -04:00
bors[bot]
384606f2e2
Merge #555
555: Use crates.io release of peek-poke r=kvark a=kvark

Closes #549 

Co-authored-by: Rukai <rubickent@gmail.com>
2020-04-06 03:09:12 +00:00
Rukai
99161cbeb5 Use crates.io release of peek-poke 2020-04-05 23:06:02 -04:00
bors[bot]
d6d31695d3
Merge #553
553: Fix order of maintenace between submission tracking and buffer mapping. r=kvark a=kvark

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

Logic needs to have the following order:
  1. we first wait for the device to finish
  2. then we move some tracked resources from per-submission lists into the "ready to destroy" or "ready to map" lists.
  3. then we handle mapping, which goes through "ready to map" lists
  4. then we destroy everything for realz that needs to be

That order got broken with #547

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-05 21:54:16 +00:00
bors[bot]
8f9f13fc8c
Merge #550
550: Add check for bound pipeline r=kvark a=kunalmohan

fix #456
Validate that a pipeline is bound before issuing any draw/dispatch call.

Co-authored-by: Kunal Mohan <kunalmohan99@gmail.com>
2020-04-05 19:58:26 +00:00
Dzmitry Malyshau
00c98e7d5a Fix order of maintenace between submission tracking and buffer mapping. 2020-04-05 14:39:10 -04:00
Kunal Mohan
aef0c7c2c4
Add check for bound pipeline
fix #456
Validate that a pipeline is bound before issuing
draw/dispatch call.
2020-04-05 11:16:50 +05:30
bors[bot]
902a0ebca3
Merge #546
546: NonZero internal Id representation r=grovesNL a=kvark

Fixes  #544
Based on #545 
Blocked by https://github.com/eqrion/cbindgen/issues/500

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-04 23:43:53 +00:00
Dzmitry Malyshau
f07943f2d8 Use NonZeroU64 for Id 2020-04-04 19:43:16 -04:00
bors[bot]
09beda1942
Merge #547
547: Add BufferMapState r=kvark a=kunalmohan

WIP for issue #395 

Co-authored-by: Kunal Mohan <kunalmohan99@gmail.com>
2020-04-03 03:50:22 +00:00
Kunal Mohan
fb1c448aa9
Add BufferMapState enum
fix #395
Add BufferMapState enum to track the state of buffer
mapping and store any mapping details in case one is
pending.
2020-04-03 07:55:23 +05:30
bors[bot]
05ba7a50b4
Merge #545
545: Check surface compatibility r=grovesNL a=kvark

Addresses https://github.com/gfx-rs/wgpu-rs/issues/224
Follows the proposal of https://github.com/webgpu-native/webgpu-headers/pull/39

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-03-31 04:02:24 +00:00
Dzmitry Malyshau
f3eee020e6 Check surface compatibility 2020-03-30 23:31:24 -04:00
bors[bot]
306554600a
Merge #540
540: Add serialization to more types r=kvark a=HeroesGrave

With these changes, pretty much everything in wgpu-types can be serialized with the exception of BufferDescriptor, CommandEncoderDescriptor, and TextureDescriptor which contain a `*const c_char`.

Options for dealing with those:
- Leave these types as not de/serializable
- Skip when serializing, deserialize as nullptr
- Serialize as a string, deserialize as nullptr

AFAICT there's not really a way to allow a full roundtrip for these fields because nul-terminated strings don't play nicely with serde. Maybe it could serialize as a byte array?

Co-authored-by: HeroesGrave <heroesgrave@gmail.com>
2020-03-28 14:44:08 +00:00
HeroesGrave
1702a54c5c Add Undefined variant to CompareFunction 2020-03-28 16:20:47 +13:00
bors[bot]
fcd8bce6f7
Merge #541
541: Move more types to wgpu-types r=kvark a=grovesNL



Co-authored-by: Joshua Groves <josh@joshgroves.com>
2020-03-28 02:14:06 +00:00
Joshua Groves
f3bb6eb230 Move more types to wgpu-types 2020-03-27 23:26:17 -02:30
HeroesGrave
98e18c5ac8 Add serialization to more types 2020-03-28 13:49:09 +13:00
bors[bot]
6d7eca94be
Merge #539
539: Parking lot update to 0.10 r=kvark a=kvark

That allows us to remove some of the duplicated dependencies.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-03-27 14:43:21 +00:00
Dzmitry Malyshau
4b69b4257f Parking lot update to 0.10 2020-03-27 10:42:18 -04:00
bors[bot]
caf7be0d73
Merge #536
536: Update Support Platforms Table to Have a Key r=kvark a=cwfitzgerald

Closes #531 

I have added wording that I believe is accurate, but if there is better wording, feel free to propose it.

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2020-03-27 13:43:26 +00:00
Connor Fitzgerald
43618e4101 Update Support Platforms table to have a key 2020-03-27 02:59:39 -04:00
bors[bot]
2f00710832
Merge #537
537: Port to gfx-extras and gfx-hal-0.5 r=kvark a=kvark

blocked on publishing gfx-extras

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-03-27 04:54:40 +00:00
Dzmitry Malyshau
2e9610e8c9 Request NDC_Y_FLIP feature 2020-03-27 00:54:01 -04:00
Dzmitry Malyshau
8aeeb8e318 Port to gfx-extras and gfx-hal-0.5 2020-03-27 00:54:01 -04:00
bors[bot]
8d8f68418b
Merge #538
538: Unbox unnecessarily boxed function r=kvark a=lachlansneff

Internally, the async buffer mapping callbacks were unnecessarily boxed. This was pretty easy to fix.

Co-authored-by: Lachlan Sneff <lachlan.sneff@gmail.com>
2020-03-27 03:07:34 +00:00
Lachlan Sneff
bcd7744c5b Unbox unnecessarily boxed function 2020-03-26 22:38:50 -04:00
bors[bot]
86981d9a80
Merge #528
528: Add buffer debug labels r=kvark a=aloucks

Related #404 

@kvark Is this what you had in mind? The webgpu headers have labels on all the descriptor structs and I didn't see any specific functions for altering/adding labels after creation. I'll add the rest if this looks good to you. 

I also went looking for [command buffer marker support](https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/chap41.html#debugging-command-buffer-markers) in [gfx-hal](https://docs.rs/gfx-hal/0.4.1/gfx_hal/command/trait.CommandBuffer.html) so that I could add [group labels and markers](https://gpuweb.github.io/gpuweb/#dom-gpuprogrammablepassencoder-pushdebuggroup).  Is this functionality absent in `hal` or did I miss it?





Co-authored-by: Aaron Loucks <aloucks@cofront.net>
2020-03-27 00:27:52 +00:00
Aaron Loucks
d64670aab1 Use ptr::null for default label 2020-03-26 20:26:03 -04:00