Commit Graph

2761 Commits

Author SHA1 Message Date
Dzmitry Malyshau
bf862b7907 Clarity renames according to the Gecko review 2020-07-28 16:58:28 -04:00
bors[bot]
de36997986 [rs] Merge #487
487: Update to latest `wgpu-core` r=kvark a=GabrielMajeri

Pulls in the latest changes from `wgpu-core`, follow up for https://github.com/gfx-rs/wgpu/pull/841

Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
2020-07-28 19:58:28 +00:00
Gabriel Majeri
04c1ff27ea [rs] Update to latest wgpu-core 2020-07-28 21:32:39 +03:00
bors[bot]
5bd24d5085 Merge #843
843: Reformat the alignment errors, add a stride check r=GabrielMajeri a=kvark

**Connections**
Addresses [one of the things](https://community-tc.services.mozilla.com/tasks/JQlmdXSiSK2ufM7mX8F1Tg/runs/0/logs/https%3A%2F%2Fcommunity-tc.services.mozilla.com%2Fapi%2Fqueue%2Fv1%2Ftask%2FJQlmdXSiSK2ufM7mX8F1Tg%2Fruns%2F0%2Fartifacts%2Fpublic%2Flogs%2Flive.log#L1999) Servo hit on the CTS

**Description**
This change affects the unaligned* error messages: instead of printing the exact value, they now refer to the constant in the code. On one hand, this involves an extra redirection for anyone who hits this. But on the other hand, it makes them aware of the actual constants they should be respecting. I think it's better in the long term, especially if we change any of these.

**Testing**
Not tested, but should work!

r? @GabrielMajeri 

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2020-07-28 17:56:05 +00: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
bors[bot]
c77f4de5a6 Merge #841
841: Safe error handling for queue module r=kvark a=GabrielMajeri

**Connections**
Part of #638 

**Description**
Adds error types for the `queue.rs` module. The out-of-memory conditions are reported upwards, other internal `gfx-hal` errors are unwrapped.

**Testing**
Tested with core and player.


Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
2020-07-27 16:34:32 +00:00
Gabriel Majeri
8316e9e678 Safe error handling for queue module 2020-07-26 17:49:53 +03:00
bors[bot]
26eb6c0882 [rs] Merge #476
476: Convert to tracing for logging and add fmt logger r=kvark a=cwfitzgerald

wgpu-rs half of https://github.com/gfx-rs/wgpu/pull/835

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2020-07-26 04:46:37 +00:00
Connor Fitzgerald
927d80e0af [rs] Convert to tracing for logging and add fmt logger 2020-07-26 00:44:39 -04:00
bors[bot]
11b3a95671 Merge #835
835: Convert all logging to tracing and add fmt logger r=kvark a=cwfitzgerald

**Connections**

#289 ish.

**Description**

This converts us fully to tracing, allowing traces to show up in logs.

https://github.com/gfx-rs/wgpu-rs/pull/476 should be considered at the same time as this PR.

**Testing**

Ran examples in wgpu-rs.

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2020-07-26 04:00:54 +00:00
Connor Fitzgerald
cb485f3798 Convert all logging to tracing and add fmt logger 2020-07-25 19:33:21 -04:00
bors[bot]
67cab07e46 [rs] Merge #469
469: Update to latest `wgpu-core` device error handling r=kvark a=GabrielMajeri

Corresponding PR for https://github.com/gfx-rs/wgpu/pull/832

Co-authored-by: Gabriel Majeri <gabriel.majeri6@gmail.com>
2020-07-25 14:39:38 +00:00
Gabriel Majeri
3eec74cd9c [rs] Unwrap errors from device functions 2020-07-25 07:46:32 +03:00
bors[bot]
da863bd5f9 [rs] Merge #481
481: Remove screenshots from README r=grovesNL a=kvark

Screenshots cover a ton of space, and now we have a dedicated hosted gallery for them.
I'm open to the idea of having *some* smaller screenshots here. It's just difficult to draw the line. Maybe README should show a few screenshots of examples only, and the gallery would not have them?

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-07-25 03:52:41 +00:00
Dzmitry Malyshau
0ebc8adc58 [rs] Remove screenshots from README 2020-07-24 23:37:10 -04:00
bors[bot]
be70c758bb [rs] Merge #480
480: Fix the link to friend applications in the readme r=kvark a=memoryruins

The current link <sup> [1] </sup> brings one to a "Create new page" form for the wiki instead of the intended page <sup> [2] </sup>.
[1] https://github.com/gfx-rs/wgpu-rs/wiki/Applications
[2] https://github.com/gfx-rs/wgpu-rs/wiki/Applications-and-Libraries

Co-authored-by: memoryruins <memoryruinsmusic@gmail.com>
2020-07-25 00:42:55 +00: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
memoryruins
6dbbc0bd7a [rs] Fix the link to friend apllications in the readme
The current link brings one to a "Create new page" form for the wiki instead of the intended page.
2020-07-24 18:45:05 -04: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]
2c62e86792 [rs] Merge #479
479: Split framework limit situation into requested/required r=kvark a=cwfitzgerald

Requiring individual examples be responsible for panicing if their features aren't supported is a bit bug-prone, so this encodes requirements in the framework and enforces it in the framework.

Additionally made the verbs consistent.

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2020-07-24 21:39:46 +00:00
Connor Fitzgerald
41cadccf3a [rs] Split framework limit situation into requested/required, enforcing correctness in the framework 2020-07-24 17:37:04 -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
bors[bot]
53fa5104f7 [rs] Merge #475
475: Made RenderBundleEncoder derive Debug r=kvark a=Andful

This is a continuation of the pull request #466 and should resolve the issue #458.

Co-authored-by: Andrea Nardi <buongiorno19972@gmail.com>
2020-07-24 19:11:05 +00:00
Dzmitry Malyshau
7e4ce4a4fe wait for buffer to be done in the player 2020-07-24 14:34:18 -04:00
bors[bot]
b98bf6da98 [rs] Merge #477
477: Add more cows r=cwfitzgerald,kvark a=Kimundi



Co-authored-by: Marvin Löbel <loebel.marvin@gmail.com>
2020-07-24 15:57:02 +00:00
Marvin Löbel
340f45200c [rs] Fix missing cows in some places 2020-07-24 17:24:30 +02:00
Andrea Nardi
9abd9f9449 [rs] Made RenderBundleEncoder derive Debug
Signed-off-by: Andrea Nardi <buongiorno19972@gmail.com>
2020-07-24 14:59:40 +02:00
bors[bot]
04248d07a2 [rs] Merge #473
473: Update wgpu, use defaults for rasterizer states, use depth-clamping r=straightforward a=kvark

Includes https://github.com/gfx-rs/wgpu/pull/833 last

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-07-24 02:36:24 +00:00
Dzmitry Malyshau
e97bda20b2 [rs] Update wgpu, use defaults for rasterizer states, use depth-clamping 2020-07-23 22:35:13 -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]
4f4ac22fad [rs] Merge #472
472: Fix two missed renames in docs r=grovesNL a=Kimundi



Co-authored-by: Marvin Löbel <loebel.marvin@gmail.com>
2020-07-24 00:15:57 +00:00
Marvin Löbel
e6793edb3e [rs] Fix two missed renames in docs 2020-07-24 02:08:01 +02:00
Dzmitry Malyshau
803eb819d8 [rs] Use ACCESS_TOKEN for deployment 2020-07-23 18:24:40 -04:00
Dzmitry Malyshau
2bda45684f [rs] Change deployment target to wgpu-rs.github.io (#471) 2020-07-23 16:51:10 -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
bors[bot]
487e378653 Merge #829
829: Fix typo in BufferUsage docs r=kvark a=cwfitzgerald

**Connections**

A couple people have bugged me about this in the past.

**Description**

Docs were wrong, they are now right.

**Testing**

Read it again :)


Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2020-07-23 02:38:23 +00:00
Connor Fitzgerald
308e72b521 Fix typo in BufferUsage docs 2020-07-22 20:55:08 -04:00
bors[bot]
c9db56d380 [rs] Merge #460
460: Replace borrowed slices in Descriptor structs with copy on write slices r=kvark a=Kimundi

This is the other half of https://github.com/gfx-rs/wgpu/pull/822

Co-authored-by: Marvin Löbel <loebel.marvin@gmail.com>
2020-07-22 22:55:16 +00:00
Marvin Löbel
50935bf1d3 [rs] Update wgpu-rs for the Cow changes in wgpu 2020-07-23 00:48:13 +02:00
bors[bot]
3e8ab741fd [rs] Merge #466
466: add debug trait for public types r=kvark a=Andful

This pull request is to resolve the issue #458.
This pull request is still incomplete. The only problematic trait is `RenderBundleEncoder`.
For the native version, `RenderBundleEncoder` does not implement `Debug`. This would have to be implemented in the wgpu project.
 FYI, Context does not need to implement `Debug`. The type that implements `Context` is used directly, i.e. `Arc<C>` is used and not `Arc<dyn Context>`


Co-authored-by: Andrea Nardi <buongiorno19972@gmail.com>
2020-07-22 20:18:29 +00:00
bors[bot]
ffc8251bc5 Merge #827
827: Make RenderBundleEncoder derive Debug r=kvark a=Andful

**Connections**
This pull request originated from https://github.com/gfx-rs/wgpu-rs/pull/466. This change is needed to make public types in `wgpu-rs` derive debug.

**Description**
Make RenderBundleEncoder derive Debug.

**Testing**


Co-authored-by: Andrea Nardi <buongiorno19972@gmail.com>
2020-07-22 20:14:20 +00:00
Andrea Nardi
fb48ff51c3 [rs] made fields of direct::Context private 2020-07-22 21:53:13 +02:00
Andrea Nardi
050abe522f [rs] implement debug for public types
Signed-off-by: Andrea Nardi <buongiorno19972@gmail.com>
2020-07-22 20:44:48 +02:00
Andrea Nardi
e8a9d70a72 implemented Debug for RenderBundleEncoder
Signed-off-by: Andrea Nardi <buongiorno19972@gmail.com>
2020-07-22 18:29:42 +02:00
bors[bot]
685522cf59 Merge #826
826: Detach MultiRefCount from RefCount completely r=cwfitzgerald a=kvark

**Connections**
Fixes #823

**Description**
The old way of trying to mix the new `MultiRefCount` with bits of existing infra with `RefCount` was not correct at all. We'd get into a situation where the refcount was already deleted, but the object is alive, for example. This PR detaches them completely.
To clarify: it's not great at all that we have manual refcounting on BGLs. And this de-duplication crap caused much more trouble than it's worth...

**Testing**
Tested on the wonderful example provided by @tiberiusferreira

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2020-07-22 15:28:16 +00:00