Commit Graph

3011 Commits

Author SHA1 Message Date
Connor Fitzgerald
3deb4f5fb6 Improve documentation of ImageDataLayout 2021-07-12 02:16:38 -04:00
bors[bot]
e5142b3cdc Merge #1623
1623: Enable All Backends for Trace Player r=cwfitzgerald a=zicklag

**Connections**
None

**Description**
I just spent a bit of time trying to figure out how to get the trace player to play an OpenGL trace before realizing that only the primary backends were enabled at instance creation. This just enables all backends in the trace player. I believe that this should be harmless as it shouldn't change anything for traces on the primary supported backends.

**Testing**
It's not tested specifically, but it's such a minor change it shouldn't matter, I think.


Co-authored-by: Zicklag <zicklag@katharostech.com>
2021-07-10 01:51:22 +00:00
Zicklag
0614ccea7e Enable All Backends for Trace Player 2021-07-09 20:42:59 -05:00
bors[bot]
e27fbb821b Merge #1612
1612: Update `web-sys` r=grovesNL a=a1phyr

`wgpu` uses unstable APIs so the version has to be pinned and manually updated.

No breaking changes happened in `0.3.51` so this update is easy.

Co-authored-by: Benoît du Garreau <bdgdlm@outlook.com>
2021-07-07 18:44:46 +00:00
Benoît du Garreau
8bd9e151cd Update web-sys 2021-07-07 16:09:15 +02:00
bors[bot]
4781d9da7b Merge #1607
1607: Fix Downlevel Vertex Stage Storage Buffer Check r=kvark a=cwfitzgerald

**Connections**

Fixes a bug in #1599. Also follows up on #1583 marking all of hello-compute as a failure.

**Testing**

Tests now pass on rpi4.


Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2021-07-07 14:01:37 +00:00
Connor Fitzgerald
90ef8141f9 Fully skip all rpi hello-compute tests due to non-determinism 2021-07-06 21:43:47 -04:00
Connor Fitzgerald
bd1c153a2f Rename testing framework's segfault to skip 2021-07-06 21:43:47 -04:00
Connor Fitzgerald
8ded21862e Fix downlevel vertex stage storage buffer check 2021-07-06 21:43:47 -04:00
bors[bot]
d2a27e0c4e Merge #1604
1604: Upgrade `arrayvec` to 0.7 r=kvark a=a1phyr

Upgrade `arrayvec` to version 0.7 (using const generics).

Co-authored-by: Benoît du Garreau <bdgdlm@outlook.com>
2021-07-06 05:31:22 +00:00
Dzmitry Malyshau
2efccb2bf8 hal/vk: fix indirect stage flag 2021-07-06 00:56:43 -04:00
bors[bot]
782a5bc831 Merge #1606
1606: Fix macos build r=cwfitzgerald a=scoopr

Building on macos failed with
```
   Compiling wgpu-hal v0.9.0 (/Users/scoopr/Code/ext/wgpu/wgpu-hal)
error[E0609]: no field `entry` on type `&vulkan::Instance`
   --> /Users/scoopr/Code/ext/wgpu/wgpu-hal/src/vulkan/instance.rs:267:61
    |
267 |             let metal_loader = ext::MetalSurface::new(&self.entry, &self.shared.raw);
    |                                                             ^^^^^ unknown field
    |
    = note: available fields are: `shared`, `extensions`

error: aborting due to previous error
```

The PR fixes the issue.

Co-authored-by: Mikko Lehtonen <scoopr@iki.fi>
2021-07-06 00:25:08 +00:00
Mikko Lehtonen
7e277c2ed9 Fix macos build 2021-07-06 02:08:19 +03:00
Benoît du Garreau
e7269e72f3 Upgrade arrayvec to 0.7 2021-07-06 00:45:24 +02:00
bors[bot]
118cf2cdba Merge #1599
1599: Fix Limits for lava/llvmpipe and re-enable and re-work CI r=kvark,groves,wumpf a=cwfitzgerald

**Connections**

No longer fixes #1551.

**Description**

This PR has a couple things going on at once.

- Fixes limits for llvmpipe, lavapipe, and rpi4.
- Added a downlevel limit to express that RPI4 does not allow storage buffers in vertex shaders on GL.
- Added a `Limits::downlevel_default()` that takes minimum limits from GLES and adds some more documentation on how to choose limits.
- Moved all examples to the new downlevel limits
- Reworks CI to re-enable software testing and unify instructions.

**Testing**

It is

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2021-07-04 19:23:23 +00:00
Connor Fitzgerald
130ddcf561 Unify CI and testing 2021-07-04 15:22:51 -04:00
bors[bot]
b5a73b6a80 Merge #1600
1600: Vulkan Timeline Semaphores r=kvark a=kvark

**Connections**
None

**Description**
One of the non-straightforward design decisions in wgpu-hal was to expose the fences with `D3D12Fence` semantics. Now that we got Vulkan, Metal, and GLES3, it became a bit concerning that all of these backends implemented this new fence API in the same convoluted way: via managing a pool of binary fences internally, which requires maintenance (done on submit() only). If that's the expected implementation, then the abstraction is wrong.

For this reason, it was important for me to try implementing this new semantics in a modern Vulkan way - via timeline semaphores. With this, we have 1:1 relation between `Api::Fence` and a Vulkan object. I believe the experiment is a success: Vulkan is now very efficient at fences!

**Testing**
Works on the examples!


Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2021-07-04 04:57:40 +00:00
Dzmitry Malyshau
3de1681eb0 hal/vk: enable timeline semaphores 2021-07-04 00:50:05 -04:00
Dzmitry Malyshau
8ae7d51c82 hal/vk: request timeline semaphores if available 2021-07-04 00:50:05 -04:00
bors[bot]
93eb33cf3b Merge #1598
1598: Fix memory leak in acquiring encoders r=kvark a=kvark

**Connections**
Fixes #1501 
Fixes #1531

**Description**
It was ... interesting. We were creating new command encoders all the time, but still trying to add them to the pool to re-use later. So we were constantly allocating and never freeing them, up until the end. Therefore, program as a whole was valid and non-leaking, if analyzed after termination.

**Testing**
Observed memory manually


Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2021-07-04 02:34:10 +00:00
Dzmitry Malyshau
b704a0542f Fix memory leak in acquiring encoders 2021-07-03 22:25:59 -04:00
Connor Fitzgerald
e2bcb72bf4 Please clippy 2021-07-03 22:15:34 -04:00
Connor Fitzgerald
861e84b178 Start adjusting CI 2021-07-03 22:15:16 -04:00
Connor Fitzgerald
26f3c03150 Add downlevel limit for vertex shader access to SSBO 2021-07-03 22:15:16 -04:00
Connor Fitzgerald
93cca6d182 Fix limits for rpi on vk 2021-07-03 22:15:16 -04:00
Connor Fitzgerald
a13b54ced8 Fix limits for llvmpipe 2021-07-03 22:15:16 -04:00
bors[bot]
762cdb3953 Merge #1589
1589: [GL] Fix min_storage_buffer_offset_alignment param r=kvark a=Gordon-F

**Connections**
Android Emulator (11) error:
```
2021-07-02 14:49:12.500 8292-8317/rust.example.cube E/emuglGLESv2_enc: device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glGetIntegerv:876 GL error 0x500
```

**Description**
As a workaround set this parameter to default value.


Co-authored-by: Gordon-F <ishaposhnik@icloud.com>
2021-07-04 00:33:32 +00:00
bors[bot]
fcba9325f8 Merge #1597
1597: hal/metal: bump storage limits r=kvark a=kvark

**Connections**
Fixes #1596

**Description**
The limits where just copied from the defaults. Then we updated the defaults...

**Testing**
Just ran locally


Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-07-04 00:27:35 +00:00
Dzmitry Malyshau
a4a4d541b8 hal/metal: bump storage limits 2021-07-03 20:26:15 -04:00
bors[bot]
fd183a99ba Merge #1594
1594: Generation of memory reports for Hubs r=cwfitzgerald a=kvark

**Connections**
Part of #1501 

**Description**
Tried to see if we aren't accidentally growing the hubs.

**Testing**
Examples...


Co-authored-by: Dzmitry Malyshau <kvark@fastmail.com>
2021-07-03 21:45:57 +00:00
Gordon-F
a077102457 [GL] Fix min_storage_buffer_offset_alignment param 2021-07-03 22:45:45 +03:00
Dzmitry Malyshau
d2a4af35af Generation of memory reports for Hubs 2021-07-03 01:51:04 -04:00
bors[bot]
edbe3b33fa Merge #1593
1593: Fix VVL on halmark example r=kvark a=kvark

**Connections**
We have a bunch of VVL related to resource destruction on the halmark example.
It also seems to leak memory quite a ton and eventually hang the system.

**Description**
This PR fixes the logic of changing the command pools in halmark, its initialization sequence, and its destruction.

**Testing**
Tested on halmark and others


Co-authored-by: Dzmitry Malyshau <kvark@fastmail.com>
2021-07-03 05:13:18 +00:00
Dzmitry Malyshau
e2f97ea659 hal/gles: detect llvmpipe instead of lavapipe 2021-07-03 01:09:39 -04:00
Dzmitry Malyshau
497c6647ee hal/vulkan: fix instance destruction logic 2021-07-03 01:07:21 -04:00
Dzmitry Malyshau
b15f1ebfb7 halmark: fix the command pool recycling policy 2021-07-03 00:23:11 -04:00
bors[bot]
7ab950e465 Merge #1592
1592: Detailed limits check and error r=cwfitzgerald a=kvark

**Connections**
Related to #1590

**Description**
The old comparison "A < B" was simply wrong, because it would do every field in order and could bail out mid-way without reaching for all limits.

**Testing**
Untested


Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-07-03 01:12:43 +00:00
Dzmitry Malyshau
81b382f5cd Readme and clippy fixes 2021-07-02 20:43:01 -04:00
bors[bot]
62972c6c5f Merge #1591
1591: Expose calayer r=kvark a=Sineaggi

**Description**

This pr restores the ability to create a surface from a pre-existing CAMetalLayer. This is required for wgpu-native.

Co-authored-by: Clayton Walker <cwalker@sofi.org>
2021-07-03 00:23:25 +00:00
Dzmitry Malyshau
23b587246a Detailed limits check and error 2021-07-02 20:17:12 -04:00
Clayton Walker
25c452cbdd Add metal layer back in 2021-07-02 15:51:11 -06:00
bors[bot]
df2b0b5843 Merge #1585
1585: hal/egl fix support for context extensions r=cwfitzgerald a=kvark

**Connections**
Follow-up to #1584
Closes  #1577

**Description**
TIL that EGL extensions work differently from the EGL-1.5 stuff, and we are now treating them properly.

**Testing**
Basic testing on AMD


Co-authored-by: Dzmitry Malyshau <kvark@fastmail.com>
2021-07-02 19:29:15 +00:00
Dzmitry Malyshau
67625b2a54 hal/egl fix support for context extensions 2021-07-02 15:23:06 -04:00
bors[bot]
43c26e57e0 Merge #1588
1588: Update naga to 0b9af95 r=kvark a=kvark

**Connections**
Picks up https://github.com/gfx-rs/naga/pull/1060 for #1581

**Description**
Naga update

**Testing**
Untested


Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-07-02 06:00:13 +00:00
Dzmitry Malyshau
ba8fcb937d Update naga to 0b9af95 2021-07-02 01:58:19 -04:00
bors[bot]
aee26e3e3e Merge #1587
1587: hal/metal: mark buffer immutability r=kvark a=kvark

**Connections**
This improves Metal performance.

**Description**
Extracting data from Naga to mark some buffers as immutable.

**Testing**
Just ran the examples.


Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-07-02 05:56:16 +00:00
Dzmitry Malyshau
34389396f9 hal/metal: mark buffer immutability 2021-07-02 01:52:28 -04:00
bors[bot]
5c17063592 Merge #1586
1586: Assorted Fixes of Testing-Infra r=kvark a=cwfitzgerald

**Connections**

Couple of low hanging fruit issues solved here. The biggest thing done is moving the masks to associated functions instead of being members of the bitflags, this is done so `all()` only includes the actual members.

Follows up on 579de425e5 to mark vk/mipmap as passing


Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2021-07-02 05:19:36 +00:00
Connor Fitzgerald
1fb77c68da Mark vk mipmap example as passing 2021-07-02 01:15:23 -04:00
Connor Fitzgerald
53e2c95dc8 Fix wgpu-info display by moving masks to associated functions 2021-07-02 01:15:19 -04:00