Commit Graph

2761 Commits

Author SHA1 Message Date
bors[bot]
92936954d8 Merge #1274
1274: Update naga to gfx-17 r=kvark a=kvark

**Connections**
Includes https://github.com/gfx-rs/gfx/pull/3688

**Description**
Here comes the "gfx-17" naga train!

**Testing**
Tested on wgpu-rs examples

Co-authored-by: Dzmitry Malyshau <kvark@fastmail.com>
2021-03-19 17:44:28 +00:00
Dzmitry Malyshau
c52dad9d47 Update naga to gfx-17 2021-03-19 13:43:11 -04:00
bors[bot]
a2d8e10c7d [rs] Merge #792
792: Use implicit layout for hello-compute r=kvark a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-19 14:34:13 +00:00
bors[bot]
b3bc3d02e0 [rs] Merge #803
803: Shader fixes with binary expressions r=kvark a=kvark

Goes along with https://github.com/gfx-rs/naga/pull/599

Co-authored-by: Dzmitry Malyshau <kvark@fastmail.com>
2021-03-19 05:36:54 +00:00
Dzmitry Malyshau
b9c60811f8 [rs] Shader fixes with binary expressions 2021-03-19 01:34:19 -04:00
bors[bot]
c45ea6f5b1 [rs] Merge #800
800: Schedule event waits after redraw events are cleared r=kvark a=kvark

As @adamnemecek pointed out, our examples were busy waiting.
I investigated a bit and figured that our `WaitScheduled` was always interrupted by `RedrawEventsCleared`. So scheduling the wait in it works. Tested on Linux and macOS. CPU time of the cube example drops from 100% to single-digit.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-18 03:00:21 +00:00
Dzmitry Malyshau
070688a84d [rs] Schedule event waits after redraw events are cleared 2021-03-17 22:58:35 -04:00
bors[bot]
ba6015e2c7 Merge #1272
1272: Add sample count to framebuffer key r=kvark a=kvark

**Connections**
Fixes #1271

**Description**
The framebuffer is created for a pass, so naturally the hashmap key for a framebuffer has to include the pass key. Otherwise, we'd be overwriting the framebuffer entry, or using a framebuffer from a different pass. The sample count was missing from our FB key.

**Testing**
Tested on a trace from #1271 that I hand-ported to latest master.

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2021-03-17 16:15:30 +00:00
Dzmitry Malyshau
9673635125 Add sample count to framebuffer key 2021-03-17 12:13:11 -04:00
bors[bot]
0542ad585a [rs] Merge #798
798: Fix all the clippy lints r=kvark a=HalfVoxel

Clippy is now happy

Co-authored-by: Aron Granberg <aron.granberg@gmail.com>
2021-03-17 14:02:03 +00:00
Aron Granberg
162fe18e7d [rs] Fix all the clippy lints and add clippy/fmt CI 2021-03-17 14:40:25 +01:00
bors[bot]
af38afd58d [rs] Merge #799
799: Update naga to gfx-16 r=kvark a=kvark

Makes WGSL constants much more ergonomic to write, and fixes the issues we had with the water example.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-17 13:37:45 +00:00
Dzmitry Malyshau
2fae02d8b2 [rs] Update naga to gfx-16 2021-03-17 09:35:54 -04:00
bors[bot]
f89244e3c3 [rs] Merge #797
797: Move from `tracing` to `log` + `profiling` r=kvark a=cwfitzgerald

Continuation of https://github.com/gfx-rs/wgpu/pull/1268 into wgpu-rs

This also includes the naga gfx-15 train.

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2021-03-17 13:17:03 +00:00
Aron Granberg
aa45e7668b [rs] Fix excessive buffer padding (#795)
* Fix excessive buffer padding

* Prettify

* cargo fmt

* Simplify code

* Style
2021-03-17 09:09:58 -04:00
bors[bot]
bb9a5a85d2 Merge #1270
1270: Update naga to gfx-16 r=kvark a=kvark

**Connections**
Picks up https://github.com/gfx-rs/gfx/pull/3684

**Description**
Just an update

**Testing**
Tested on wgpu-rs examples

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-17 13:08:07 +00:00
Dzmitry Malyshau
b97f5a5b24 Update naga to gfx-16 2021-03-17 09:07:08 -04:00
Connor Fitzgerald
3a131f5f60 [rs] Move from tracing to log + profiling 2021-03-17 01:34:38 -04:00
bors[bot]
2f3b398e38 Merge #1268
1268: Move from `tracing` to `log` + `profiling` r=kvark a=cwfitzgerald

**Connections**

Fixes #1211. Fixes #1189.

**Description**

Moves from `tracing` to `log` + `profiling`. I also removed some of the offending spans that were only for pushing commands onto a vector of commands.

**Testing**

Tested on wgpu-rs

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2021-03-17 05:30:36 +00:00
Connor Fitzgerald
cf6f9c3ca8 Move from tracing to log + profiling 2021-03-17 01:22:30 -04:00
bors[bot]
5d993efc85 Merge #1267
1267: Update naga to gfx-15 r=kvark a=kvark

**Connections**
Fixes #1228 (huge DX12 leak in command allocation)
Includes https://github.com/gfx-rs/gfx/pull/3676, https://github.com/gfx-rs/gfx/pull/3679, https://github.com/gfx-rs/gfx/pull/3680, https://github.com/gfx-rs/gfx/pull/3681, and the relevant Naga stuff.

**Description**
Updates Naga and gfx.

**Testing**
Tested on wgpu-rs examplse

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-16 17:07:20 +00:00
Luca Casonato
82932d1f59 chore: validate offset + size in get_mapped_range (#1266)
* chore: validate offset + size in get_mapped_range

This commit introduces out of bounds & offset validation for
buffer_get_mapped_range, like described in the WebGPU spec. See
https://gpuweb.github.io/gpuweb/#dom-gpubuffer-getmappedrange.

Closes #818

* review comments

* fmt

* fix test

* fix tests

* update error message

* review comment

* use wgt::BufferAddress

* clippy
2021-03-16 13:00:44 -04:00
Dzmitry Malyshau
3b1b11f441 Update naga to gfx-15 2021-03-16 12:52:32 -04:00
Wumpf
2bda1508f1 [rs] Added example for conservative rasterization (#791)
* Example for conservative rasterization

* Update to wgpu-core/types 717c2d73e7

* conservative-raster example: fix wglsl const & readme

* conservative raster example: optional lines, no more interaction
2021-03-15 22:33:44 -04:00
Dzmitry Malyshau
e80723aa12 [rs] Use implicit layout for hello-compute 2021-03-15 11:21:42 -04:00
Wumpf
717c2d73e7 Add CONSERVATIVE_RASTERIZATION native feature (#1263)
* Add CONSERVATIVE_RASTERIZATION native feature

* update gfx to cd3042d8c02d9dc7fc74ac8c292099c9789f6d43

* error for polygon mode not fill +conservative raster
2021-03-14 20:43:02 -04:00
bors[bot]
23c5e83167 [rs] Merge #790
790: Update to naga-14 r=kvark a=kvark

Depends on https://github.com/gfx-rs/wgpu/pull/1262
Makes our shaders nicer, and the uniformity analysis less cranky :)

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-14 05:51:10 +00:00
Dzmitry Malyshau
d1d941229c [rs] Update to naga-14 2021-03-14 00:50:35 -05:00
bors[bot]
5e15980bb5 Merge #1262
1262: Update to naga-14 r=kvark a=kvark

**Connections**
Depends on https://github.com/gfx-rs/naga/pull/552 and https://github.com/gfx-rs/gfx/pull/3675

**Description**
Just an update of Naga

**Testing**
Tested on wgpu-rs examples

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-14 05:28:46 +00:00
Dzmitry Malyshau
280c066e65 Update to naga-14 2021-03-14 00:27:57 -05:00
bors[bot]
7af0f3137d Merge #1258
1258: Lint all the things r=kvark a=kvark

**Connections**
Fixes #1250

**Description**
Refactors the code to satisfy the linter, configures it, and enables on CI.

**Testing**
`cargo clippy` saves the dau

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-12 17:40:57 +00:00
Dzmitry Malyshau
231bba03a1 Lint all the things 2021-03-12 12:39:04 -05:00
bors[bot]
763c14a6d9 Merge #1254
1254: Fix swapchain resize in the player r=kvark a=kvark

**Connections**
Fixes 1253

**Description**
I was fixing this recently, and I'm not sure how it worked, because there is a big inner `loop` that I didn't notice before 😅 .
So now we exit the inner loop upon resize.

**Testing**
Tested on the supplied API trace

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-10 20:37:37 +00:00
Dzmitry Malyshau
eef4a75454 Fix swapchain resize in the player 2021-03-10 15:34:21 -05:00
bors[bot]
db923b038e [rs] Merge #786
786: Update to naga-13 r=kvark a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-10 05:41:35 +00:00
Dzmitry Malyshau
d754964b08 [rs] Update to naga-13 2021-03-10 00:41:04 -05:00
bors[bot]
0fa52d3826 Merge #1252
1252: Fix Vulkan Portability check r=kvark a=kvark



Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-10 05:23:59 +00:00
Dzmitry Malyshau
80fe0d8fdd Fix Vulkan Portability check 2021-03-10 00:23:09 -05:00
Anthony Cowley
f01feacc2e Update gfx and naga to gfx-13 tag (#1248)
* wgpu-core: update gfx-hal usage related to sparse resources

* wgpu-core: support naga gfx-13

* Update gfx and naga dependencies to gfx-13 tag

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-10 00:04:16 -05:00
bors[bot]
6f49f041d3 Merge #1251
1251: Don't panic on pipeline creation errors r=kvark a=kvark

**Connections**
Related to Gecko crashes.

**Description**
We shouldn't ever panic in `wgpu`. The panic can only occur if there is internal inconsistency. For any invalid workloads, submitted by the user, we should produce errors instead.

**Testing**
Not tested

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-10 03:29:52 +00:00
Dzmitry Malyshau
4f7cd45ea7 Don't panic on pipeline creation errors 2021-03-09 22:24:57 -05:00
bors[bot]
37dbe5e32e Merge #1247
1247: Add license to the memory init tracker r=kvark a=kvark

**Connections**
Gecko's code lints complain...

**Description**
Add a license header like all the other files

**Testing**
should work!

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2021-03-04 15:43:42 +00:00
Dzmitry Malyshau
11af3d1286 Add license to the memory init tracker 2021-03-04 10:42:18 -05:00
bors[bot]
02f2d49ec0 Merge #1246
1246: Fix link to the "debugging tips" page r=kvark a=maroider

**Description**
The link was broken.

**Testing**
I used the link :P


Co-authored-by: Markus Røyset <maroider@protonmail.com>
2021-03-04 15:12:35 +00:00
Markus Røyset
c6b2f89254 Fix link to the "debugging tips" page 2021-03-04 11:03:52 +01:00
bors[bot]
f525302ad5 [rs] Merge #781
781: Mark BufferMappedRange Send/Sync on native r=kvark a=cwfitzgerald

This fixes an issue reported on the matrix where this was causing things to unnecessarily be !Send. There's no reason I can see that this couldn't be Send/Sync as we only use it like one would a slice. We might also consider backporting this to 0.7.

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2021-03-04 05:11:32 +00:00
Connor Fitzgerald
9be3031cad [rs] Mark BufferMappedRange Send/Sync on native 2021-03-04 00:04:51 -05:00
bors[bot]
b4672c1ef2 Merge #1245
1245: Trace pipeline creation before it actually happens r=kvark a=kvark

**Connections**
Fixes #1174

**Description**
We want to add descriptors to the trace before panicking if anything goes wacky.

**Testing**
tested on wgpu-rs examples

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-04 01:00:47 +00:00
Dzmitry Malyshau
10245cece9 Early tracing of swapchain-related things, clean up the hub API 2021-03-03 19:59:29 -05:00
Dzmitry Malyshau
fb1b98ebb1 Early tracing of the other device things 2021-03-03 17:24:09 -05:00