Commit Graph

76 Commits

Author SHA1 Message Date
Dzmitry Malyshau
901b043b19 Version bump to 0.6 and changelog update 2020-08-17 16:51:22 -04:00
Connor Fitzgerald
350637df40 Factor wgpu-subscriber into its own repo 2020-08-17 16:36:22 -04:00
Dzmitry Malyshau
d1da6d8106 Switch gfx-hal to 0.6 2020-08-17 10:34:50 -04:00
Dzmitry Malyshau
d8341c5996 Add labels to pipelines 2020-08-13 12:14:24 -04:00
Dzmitry Malyshau
d07d8503a0 Move the subscriber into a different crate 2020-08-12 15:00:15 -04:00
Dzmitry Malyshau
9d8dc0b04d Grand cleanup and refactor of the descriptors in the API 2020-08-12 14:13:32 -04:00
Dzmitry Malyshau
173c7c3dbf Create implicit layouts for render pipelines 2020-08-09 14:43:44 -04:00
Dzmitry Malyshau
a9b8a99e19 Create implicit layouts for compute pipelines 2020-08-09 08:33:33 -04:00
Dzmitry Malyshau
dbd7e2c579 Separate valid internal IDs from external ones 2020-08-04 11:16:59 -04:00
Gabriel Majeri
e860dd995f Handle command pool creation error 2020-07-29 09:56:42 +03:00
Dzmitry Malyshau
bf862b7907 Clarity renames according to the Gecko review 2020-07-28 16:58:28 -04:00
Gabriel Majeri
8316e9e678 Safe error handling for queue module 2020-07-26 17:49:53 +03:00
Connor Fitzgerald
cb485f3798 Convert all logging to tracing and add fmt logger 2020-07-25 19:33:21 -04:00
bors[bot]
6182495102
Merge #838
838: wait for buffer to be done in the player r=cwfitzgerald a=kvark

**Connections**
Fixes our code enough to replay #834 without issues. Doesn't help to solve the original problem though.

**Description**
There are two things in here:
  1. don't deduplicate the BGLs if we are not generating new IDs at this layer. This helps Servo/Gecko/player. cc @kunalmohan 
  2. have an option in `buffer_destroy` to *actually* kill it, at the cost of blocking on GPU sometimes. This is required for the player, since the very next command may try to reuse the ID.

**Testing**
Tested on the trace in #834 

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-07-24 22:57:04 +00:00
Gabriel Majeri
7cf9970121 Error handling for device functions 2020-07-24 22:56:51 +03:00
Dzmitry Malyshau
7e4ce4a4fe wait for buffer to be done in the player 2020-07-24 14:34:18 -04:00
Dzmitry Malyshau
82d149b871 Naga update, remove spirv_headers dependency 2020-07-22 11:05:42 -04:00
Marvin Löbel
4ed2c0a313
Replace borrowed slices in Descriptor structs with copy on write slices (#822)
* Replace &[T] in descriptor structs with Cow<[T]>

* Changed label fields to use Cow<'a, str>

* Deduplicate types across the tracing API

Introduce the ToStatic trait

* Deduplicate trace::RenderBundleDescriptor

* Remove ugly ToOwned bounds

* Simplifiy Action variants

* Make Clone bounds on type defs less verbose

* Fix a error in play.rs

* Remove ToStatic, and Make Action<'a> borrow descriptors instead
2020-07-20 12:31:05 -04:00
Gabriel Majeri
ec12d9547d Error types for buffer mapping API 2020-07-20 07:22:52 +03:00
Gabriel Majeri
e53aa70b9a Error type for texture creation 2020-07-19 20:42:31 +03:00
bors[bot]
d73683e35e
Merge #813
813: Add buffer creation error type r=kvark a=GabrielMajeri

**Connections**
Part of #638 

**Description**
Adds an error type for the buffer creation functions.

**Testing**
Checked with core and ran test on player.

Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
2020-07-19 17:19:01 +00:00
bors[bot]
8cfe8bb56d
Merge #812
812: Error type for `WaitIdle` r=kvark a=GabrielMajeri

**Connections**
Part of #638 

**Description**
Adds an error type for the `wait_idle` function.

**Testing**
Checked with core.

Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
2020-07-18 22:12:37 +00:00
Gabriel Majeri
fc460f4eab Propagate WaitIdleError up through the API 2020-07-18 20:39:11 +03:00
Gabriel Majeri
2ac778b312 Add buffer creation error type 2020-07-18 11:12:15 +03:00
Gabriel Majeri
04b0b4d3a5 Error type for command_encoder_finish 2020-07-18 10:46:47 +03:00
Gabriel Majeri
314074d13c Safe error handling for swap chain 2020-07-17 21:11:28 +03:00
Dzmitry Malyshau
eb7bdcd012 playtest: move the actions together with expectations 2020-07-17 10:59:02 -04:00
Dzmitry Malyshau
acef9206a6 Player-based GPU test framework 2020-07-17 00:08:43 -04:00
Dzmitry Malyshau
76e136e375 add the preferred format query 2020-07-16 11:27:05 -04:00
Gabriel Majeri
1b03fbe9be Safe error handling for commands API 2020-07-14 11:40:54 +03:00
Connor Fitzgerald
c8bcc50ed6 Implement PUSH_CONSTANTS feature 2020-07-13 12:47:09 -04:00
Gabriel Majeri
f3b80f1d8d Unify wgpu-core and wgpu-rs types 2020-07-13 18:39:49 +03:00
bors[bot]
7d5082753b
Merge #773
773: Error handling for data transfer API r=kvark a=GabrielMajeri

**Connections**
Work on the error model described in #376 

**Description**
Removes assertions from the transfer functions, instead returning a custom error type.

**Testing**
Checked with `player` and `wgpu-rs`: https://github.com/gfx-rs/wgpu-rs/pull/430

Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
2020-07-11 02:28:25 +00:00
Gabriel Majeri
98e4f73a10 Error handling for data transfer API 2020-07-10 21:50:22 +03:00
Dzmitry Malyshau
e693170aef Rename bindings to entries 2020-07-08 23:41:09 -04:00
bors[bot]
cfd21d4913
Merge #763
763: Remove raw pointers from the render pipelines API r=kvark a=GabrielMajeri

**Connections**
Rust-ification of API, as part of #689

**Description**
The objective is to get rid of raw pointers in the render pipeline descriptor and associated structures.

**Testing**
Checked with `player` and the `trace` feature, and with `wgpu-rs` with the changes in https://github.com/gfx-rs/wgpu-rs/pull/425

Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
2020-07-07 17:29:37 +00:00
Gabriel Majeri
d4eeea8118 Remove pointers from pipelines API 2020-07-07 19:37:04 +03:00
Dzmitry Malyshau
46230720b5 Remove UnsafeFeatures as we decided the top level guard is not useful 2020-07-06 23:46:46 -04:00
Oskar Nehlin
8a51f4bc7f
Return result instead of panicking when requesting device. (#762)
* Return Result instead of panic for recoverable errors

* Update LimitsExceeded error variant

* Update LimitsExceeded error message
2020-07-06 16:45:11 -04:00
Connor Fitzgerald
ac62a11619 Convert Extensions + Capabilities into Features 2020-06-26 00:18:46 -04:00
Connor Fitzgerald
62a870280f Refine Logging Levels 2020-06-22 02:13:04 -04:00
Connor Fitzgerald
1b2cf3cd22 Add Tracing and Instrument Entry Points 2020-06-20 14:26:50 -04:00
bors[bot]
c7be94047d
Merge #739
739: Remove Peek-Poke r=cwfitzgerald a=kvark

**Connections**
Related to https://github.com/gfx-rs/wgpu/issues/738
Related to https://github.com/djg/peek-poke/issues/10

**Description**
As of #726 , the buffers have a minimum binding size that has to include the shader struct size. It, therefore, can't be zero.
We can remove the hacks we had previously and switch fully to the idiomatic `Option<NonZeroU64>`.

Peek-poke doesn't `NonZeroU64` and friends, so this made me reconsider the user of it entirely. Today, render bundles as well as the Player already represent command streams using a much rustier method. I tried to move everything to this method now, and I think this is going to work much better, and safer.

**Testing**
wgpu-rs works - https://github.com/gfx-rs/wgpu-rs/pull/396

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-06-20 17:52:29 +00:00
Gabriel Majeri
69b41dc0d3 Validate sampler type in create_bind_group 2020-06-20 17:29:58 +03:00
Dzmitry Malyshau
365f4e8786 Remove peek-poke.
There was a lot of highly unsafe use of serialization based on peek-poke that we
weren't entirely happy with. It's replaced by just serializing the passes now.
Also, switch BufferSize to Option<NonZero>.
2020-06-20 00:39:11 -04:00
Marvin Löbel
e88e3517d6 Move backend selection to Instance::new()
Keep `inputs` parameter in `pick_adapter()`
2020-06-18 22:04:16 +02:00
Dzmitry Malyshau
35a1dc3076 Basic support for WGSL 2020-06-17 13:29:43 -04:00
Dzmitry Malyshau
a27341bd6d Basic support for minBufferBindingSize 2020-06-16 00:34:58 -04:00
Dzmitry Malyshau
58de765961 Always use DepthStencilReadOnlyOptimal for sampled depth 2020-06-15 17:45:19 -04:00
Dzmitry Malyshau
c038c206e7 Add RODS texture binding property 2020-06-12 21:26:19 -04:00