Commit Graph

899 Commits

Author SHA1 Message Date
Gabriel Majeri
b8f8dd78fd Run tests in CI 2020-04-24 22:43:14 -02:30
Igor Shaposhnik
1088683643 Fix windows nightly CI 2020-04-24 10:34:13 -02:30
Igor Shaposhnik
84cb39ee73 Install clippy on CI 2020-04-24 01:22:40 -02:30
Igor Shaposhnik
5c172dd475
Migrate CI to GitHub Actions (#605) 2020-04-22 09:03:26 -04:00
Dzmitry Malyshau
baf435d8b8
Add is_power_of_two function (#603) 2020-04-21 09:29:10 -04:00
Dzmitry Malyshau
5e458b5d45
Separate public usage from internal use (#601) 2020-04-21 09:12:40 -04:00
Aron Granberg
21b441d087
Improve error messages for mismatched binding types (#593) 2020-04-20 14:41:40 -04:00
bors[bot]
1234c96373
Merge #596
596: Remove wgpu-native and wgpu-remote r=grovesNL a=kvark

Closes #587 

I'm still not sure if it's a good idea. Feedback is welcome!
For instance, even after we remove these two things, the repo will still contain a bunch of logic that Gecko wouldn't necessarily be interested in, such as the surface/swapchains logic.

It's also not clear to me how to properly organize the workflow with the wgpu-native being separate (btw, it's https://github.com/gfx-rs/wgpu-native). Do we still have the workspace here? Or do we just introduce a separate repo that will include all the stuff as sub-modules and have a single workspace?

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-18 21:40:51 +00:00
bors[bot]
e612ac1fe2
Merge #600
600: Fix host mapping buffer barriers r=kvark a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-18 20:58:52 +00:00
Dzmitry Malyshau
df2c97ff0c Fix host mapping buffer barriers 2020-04-18 16:56:05 -04:00
bors[bot]
f4550cc4e3
Merge #598
598: Enable READ access for texture storage r=kvark a=kvark

This is a short-term workaround until we properly implement #597 

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-18 17:30:21 +00:00
Dzmitry Malyshau
75d0157aa7 Enable READ access for texture storage 2020-04-18 13:29:17 -04:00
bors[bot]
daf45362bc
Merge #591
591: Warn when binding a buffer that is still mapped r=kvark a=almarklein

Fixes #510

I'd like to make more contributions wrt validation. Though I'm quite new to Rust, so let's start small :)  

From the discussion in #510 I concluded that in this case the buffer has actually been dropped, does the error message make sense like this?

Do the messages logged with `log::warn`, end up in the same logging system as the layer validation messages? So a solution to get those messages into Python (for wgpu-py) would work for both kinds of validation messages?


Co-authored-by: Almar Klein <almar.klein@gmail.com>
2020-04-17 21:15:19 +00:00
bors[bot]
4bf3d57bb5
Merge #595
595: Derive swapchain layout off the load operation r=kvark a=kvark

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

It's fairly simple. We expect there to be exactly one `LoadOp::Clear` for the swapchain attachment, and for it to be the first pass in a frame using it. Any other passes need to do `LoadOp::Load`.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-17 04:01:08 +00:00
Dzmitry Malyshau
dbb261b7f1 Remove wgpu-native and wgpu-remote 2020-04-16 22:35:59 -04:00
Dzmitry Malyshau
8eefe269c1 Derive swapchain layout off the load operation 2020-04-16 21:49:24 -04:00
Almar Klein
e7005548c0 Warn when binding a buffer that is still mapped 2020-04-16 11:35:03 +02:00
bors[bot]
6b0751f1f8
Merge #586
586: Improve drawing error messages r=kvark a=HalfVoxel



Co-authored-by: Aron Granberg <aron.granberg@gmail.com>
2020-04-15 12:59:58 +00:00
bors[bot]
2b120018f5
Merge #583
583: Improve error messages when passing buffers with the wrong usage flags r=kvark a=HalfVoxel

e.g.

```
thread 'main' panicked at 'An invalid setIndexBuffer call has been made. The buffer usage is COPY_DST | VERTEX which does not contain required usage INDEX
```

Co-authored-by: Aron Granberg <aron.granberg@gmail.com>
2020-04-15 12:30:48 +00:00
Aron Granberg
41a6425fb2 Improve drawing error messages 2020-04-15 02:29:37 +02:00
bors[bot]
6de38a7792
Merge #584
584: Fix vertex format enum to match the native header r=kvark a=kvark

This was one of the problems to get wgpu-rs examples on the web.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-04-14 21:15:30 +00:00
Dzmitry Malyshau
82a7791763 Fix vertex format enum to match the native header 2020-04-14 17:14:17 -04:00
Aron Granberg
5f6accc206 Improve error messages when passing buffers with the wrong usage flags 2020-04-14 20:18:00 +02:00
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