Commit Graph

384 Commits

Author SHA1 Message Date
John Mitchell
4cb50e8395 Added image cube array. 2020-08-16 23:10:06 -04:00
Dzmitry Malyshau
44fdfb80d0 Fix support for d24unorm format 2020-08-13 17:26:44 -04:00
Dzmitry Malyshau
d8341c5996 Add labels to pipelines 2020-08-13 12:14:24 -04:00
Dzmitry Malyshau
2473c25971 Refactor the stencil state descriptor a bit 2020-08-12 20:04:47 -04:00
Dzmitry Malyshau
d07d8503a0 Move the subscriber into a different crate 2020-08-12 15:00:15 -04:00
Dzmitry Malyshau
a0711cf9b2 Move the RenderCommand into the shared draw module 2020-08-12 14:33:42 -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
1f5622a0b3 Respect texture view aspect on creation 2020-08-10 16:14:20 -04:00
Dzmitry Malyshau
f164fd1f46 Bump BGL refcounts on getting them from pipelines 2020-08-10 10:11:31 -04:00
Dzmitry Malyshau
55064ace4c New get_bind_group_layout functions 2020-08-09 18:33:47 -04:00
Dzmitry Malyshau
d8efe3b6fe Attempt to unite implicit layout code between compute and render 2020-08-09 18:16:03 -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
f18fa7ef9b Derive bind group layout entries in Naga validation 2020-08-08 01:09:41 -04:00
Dzmitry Malyshau
8731da278e Streghten the multi-ref-count on BGLs 2020-08-05 17:39:25 -04:00
Kunal Mohan
aa44969818 Replace u32 with NonZeroU32 in TextureView 2020-08-05 21:23:25 +05:30
Gabriel Majeri
021251a908 Remove power module 2020-08-05 16:27:41 +03:00
Dzmitry Malyshau
dbd7e2c579 Separate valid internal IDs from external ones 2020-08-04 11:16:59 -04:00
Dzmitry Malyshau
3291b72368 Update naga and fix type widths 2020-07-31 23:46:19 -04:00
Connor Fitzgerald
00a5be7f7b Fix multi-layer copies 2020-07-30 16:58:29 -04:00
Kunal Mohan
c8360152cd Replace NonZeroU32 with u32 in TextureViewDescriptor 2020-07-30 21:35:07 +05:30
Connor Fitzgerald
e5c647745e Implement TEXTURE_COMPRESSION_BC extension 2020-07-29 18:43:50 -04:00
bors[bot]
f6ba5b8298
Merge #845
845: Finish error model refactor r=kvark a=GabrielMajeri

**Connections**
I think this is the last part of #638. I've reviewed all the remaining `unwrap`s and `assert`s in the code, and these should be the last ones left which ought to return errors (the remaining ones seem to uphold internal invariants).

**Description**
Implements error handling for various conditions, which are then returned to the caller. Including, but not limited to:
- running out of memory when creating a command pool
- running out of memory when creating a frame buffer for a render pass
- invalid dimensions when creating a texture

**Testing**
Tested with core and player.

Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
2020-07-29 18:10:33 +00:00
Gabriel Majeri
a5f72d26d3 Handle DeviceLost in triage_submissions 2020-07-29 20:17:48 +03:00
Gabriel Majeri
62f1f9c438 Error types for conv module 2020-07-29 20:17:46 +03:00
Kunal Mohan
0ef76a7643 Add mip level count and array layer count validation to texture_create_view 2020-07-29 21:47:28 +05:30
Gabriel Majeri
2f06d3e4f9 Return out of memory condition from render pass 2020-07-29 09:58:46 +03:00
Gabriel Majeri
e860dd995f Handle command pool creation error 2020-07-29 09:56:42 +03:00
Dzmitry Malyshau
d2c1e725db Make level and layer count for texture view optional 2020-07-28 22:55:39 -04:00
Dzmitry Malyshau
bf862b7907 Clarity renames according to the Gecko review 2020-07-28 16:58:28 -04:00
Dzmitry Malyshau
b16640cdc4 Refactor pipeline creation to check the resource counts earlier 2020-07-28 13:55:07 -04:00
Dzmitry Malyshau
6e10518f12 Reformat the alignment errors, add a stride check 2020-07-28 11:48:49 -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
bors[bot]
645b43b0c7
Merge #839
839: Fix push constant pipeline invalidation r=kvark a=cwfitzgerald

**Connections**

Fixes #821

**Description**

We need to invalidate everything if push constants change. This code is kinda ugly but this is try three and it's the least terrible I got.

**Testing**

Pinging @Wumpf :)

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2020-07-24 22:26:30 +00:00
Connor Fitzgerald
b9498952a1 Fix push constant pipeline invalidation 2020-07-24 18:19:36 -04:00
bors[bot]
102d69eb58
Merge #832
832: Return errors from device functions r=kvark a=GabrielMajeri

**Connections**
Part of #638 

**Description**
Lots of changes, but they should be easily reviewable commit-by-commit.

- Error types for most of the fallible resource creation errors in `device/mod.rs`

- Removed assertions and replaced them with error types

- All of the `BufferMap`, `BufferNotMapped` etc. errors were united in a single `BufferAccessError`, since it was pretty weird to have so many overlapping error types.

- Removed all `unwrap`s of `gfx-hal` errors - they are now returned to the caller.

**Testing**
Checked with core and tested with `wgpu-rs` (see https://github.com/gfx-rs/wgpu-rs/pull/469)

Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
2020-07-24 20:43:56 +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
bors[bot]
0591c48fd2
Merge #833
833: Switch pipeline flag to mutation of depth/stencil r=startoaster a=kvark

**Connections**
Reported on the matrix

**Description**
If the pass mutates depth/stencil, but the pipeline doesn't, it's not a bug!

**Testing**
on it...

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-07-24 02:26:50 +00:00
Dzmitry Malyshau
33d6eff6c9 Switch pipeline flag to mutation of depth/stencil 2020-07-23 22:24:21 -04:00
bors[bot]
8a2ee26fff
Merge #831
831: Carry RefCount in future suspects in order to prevent early removal r=cwfitzgerald a=kvark

**Connections**
Fixes  #830

**Description**
see https://github.com/gfx-rs/wgpu/issues/830#issuecomment-662825775

**Testing**
Tested on harmony + Sponza

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-07-23 16:09:02 +00:00
Dzmitry Malyshau
da34c918d3 Carry RefCount in future suspects in order to prevent early removal 2020-07-23 01:38:32 -04:00
Andrea Nardi
e8a9d70a72 implemented Debug for RenderBundleEncoder
Signed-off-by: Andrea Nardi <buongiorno19972@gmail.com>
2020-07-22 18:29:42 +02:00
Dzmitry Malyshau
0c00df71b8 Detach MultiRefCount from RefCount completely 2020-07-22 11:27:47 -04:00
bors[bot]
b904d1ee4a
Merge #825
825: Add depth clamping support r=cwfitzgerald a=kvark

**Connections**
Implements https://github.com/gpuweb/gpuweb/pull/900

**Description**
Depth clamping is useful for shadow mapping and stuff. We'd want to use it in our `shadow` example.

**Testing**
Untested, should work though :)

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2020-07-22 15:16:20 +00:00
Dzmitry Malyshau
82d149b871 Naga update, remove spirv_headers dependency 2020-07-22 11:05:42 -04:00
Dzmitry Malyshau
21be559a9f Add depth clamping support 2020-07-22 11:03:36 -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