Commit Graph
9013 Commits
Author SHA1 Message Date
Joshua Groves 667f01ce17 [wgsl-in] Add descriptions for more errors 2021-03-04 00:10:58 -05:00
Connor Fitzgerald 9be3031cad [rs] Mark BufferMappedRange Send/Sync on native 2021-03-04 00:04:51 -05:00
Dzmitry Malyshau 3fcc0759ed GraphViz backend 2021-03-03 21:20:12 -05:00
bors[bot]andDzmitry Malyshau 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
Dzmitry Malyshau 20bcb44c85 Early tracing of buffer, texture, and view creation 2021-03-03 16:54:38 -05:00
Dzmitry Malyshau 7c1db12cdc Refactor implicit BGLs to support early tracing 2021-03-03 16:48:23 -05:00
Dzmitry Malyshau f7e1304c38 Expose CA surface creation 2021-03-03 15:43:55 -05:00
Dzmitry Malyshau 199e7e5f3b Trace pipeline creation before it actually happens 2021-03-03 15:18:48 -05:00
Joshua Groves 764bec5322 [wgsl-in] Expose location of parser errors 2021-03-03 10:26:47 -05:00
Dzmitry Malyshau 2c67d1873f Remove the Interface processor 2021-03-02 21:50:06 -05:00
Dzmitry Malyshau 89e37d6e90 Explicitly emit expressions by Statement::Emit 2021-03-02 21:50:06 -05:00
Igor Shaposhnik 230ec601ed [glsl-out] Fix array writing 2021-03-02 21:48:23 -05:00
Igor Shaposhnik 6e37f336bd [glsl-out] Set workgroup_size for compute shaders 2021-03-02 14:26:01 -05:00
bors[bot]andDzmitry Malyshau c3e95273ff Merge #1243
1243: Force-drop the token before calling fire_map_callbacks r=kvark a=kvark

**Connections**
Related to WebGPU update in Gecko

**Description**
Since the token was alive, technically, we saw an assertion firing up about concurrent access to the token root.

**Testing**
Tested in Gecko

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2021-03-02 19:12:58 +00:00
bors[bot]andOleg Andreev b53a00e730 [rs] Merge #778
778: Return None from get_swap_chain_preferred_format if the adapter does not support the surface r=kvark a=OlegOAndreev

Fixes #777 

Almost every other method in wgpu panics on failure, so I decided to make the return value an `Option<TextureFormat>`, not a `Result<Option<TextureFormat>>`

Co-authored-by: Oleg Andreev <ooandreev@yandex-team.ru>
2021-03-02 04:36:08 +00:00
bors[bot]andDzmitry Malyshau f94d2f9616 [rs] Merge #779
779: Update wgpu depth_or_array_layers r=kvark a=kvark

Based on https://github.com/gfx-rs/wgpu/pull/1241

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-02 04:26:42 +00:00
Dzmitry Malyshau 67655976e6 [rs] Update wgpu depth_or_array_layers 2021-03-01 23:26:08 -05:00
bors[bot]andDzmitry Malyshau 8a5668e0da Merge #1241
1241: Update Extent3d::depth and Limits to latest upstream r=grovesNL a=kvark

**Connections**
- https://github.com/gpuweb/gpuweb/pull/1390
- https://github.com/gpuweb/gpuweb/pull/1328
- https://github.com/gpuweb/gpuweb/pull/1163
- https://github.com/gpuweb/gpuweb/pull/1274

**Description**
Just an API update up to spec.

**Testing**
Tested on wgpu-rs examples

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-03-02 04:09:19 +00:00
Dzmitry Malyshau d20ab66741 Force-drop the token before calling fire_map_callbacks 2021-03-01 16:34:07 -05:00
Dzmitry Malyshau 62ca24580d Add limits for textures sizes and vertex imputs 2021-03-01 12:10:40 -05:00
Dzmitry Malyshau 103e7763a3 Rename depth to depth_or_array_layers 2021-03-01 11:08:17 -05:00
Igor Shaposhnik 04b1f44396 [glsl-out] Fix atan2 math function 2021-03-01 10:42:09 -05:00
Oleg Andreev 5adaa23de9 [rs] Return None from get_swap_chain_preferred_format if the adapter does not support the surface. 2021-03-01 18:15:01 +03:00
Dzmitry Malyshau 69bf7f5f17 Miscellaneous fixes 2021-03-01 09:35:29 -05:00
Dzmitry Malyshau 96527290f3 [wgsl-in] encapsulate logic into parse_statement_restricted 2021-03-01 09:35:29 -05:00
Matúš Talčík 34c549d49d spv-in flow: fix loop 2021-03-01 09:27:44 -05:00
bors[bot]andImbris 3bb2835fb5 Merge #1240
1240: Fix issue with multiple queued mappings where the last one is not cancelled r=kvark a=Imberflur


**Connections**
Follow up from #1239

**Description**
In #1239 I missed the case where there are multiple rounds of mapping/unmapping with the last map not being cancelled. In practice it doesn't occur very often, but I did encounter it with settings/a scene that created a heavy GPU load.

Sorry for not catching this earlier!

**Testing**
Using `wgpu-rs` capture example, after the first `map_async` I added in an `unmap` followed by another `map_async`.
<!--
Non-trivial functional changes would need to be tested through:
  - [wgpu-rs](https://github.com/gfx-rs/wgpu-rs) - test the examples.
  - [wgpu-native](https://github.com/gfx-rs/wgpu-native/) - check the generated C header for sanity.

Ideally, a PR needs to link to the draft PRs in these projects with relevant modifications.
See https://github.com/gfx-rs/wgpu/pull/666 for an example.
If you can add a unit/integration test here in `wgpu`, that would be best.
-->


Co-authored-by: Imbris <imbrisf@gmail.com>
2021-03-01 03:53:57 +00:00
Imbris 2c153f5d50 Fix issue with multiple queued mappings where the last one is not cancelled 2021-02-28 00:56:17 -05:00
Joshua Groves bb7105387d [wgsl-in] Use codespan to report errors 2021-02-28 00:07:37 -05:00
bors[bot]andDzmitry Malyshau 60fcb236b9 [rs] Merge #776
776: Update wgpu with the new vertex format r=kvark a=kvark

Based on https://github.com/gfx-rs/wgpu/pull/1235

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-02-28 03:57:40 +00:00
Dzmitry Malyshau 43423f922c [rs] Update wgpu with the new vertex format 2021-02-27 22:56:47 -05:00
bors[bot]andImbris ecbddedfaf Merge #1239
1239: Avoid panic when requesting to unmap a buffer that is pending mapping r=kvark a=Imberflur

**Connections**
Fix for #1238 

**Description**
This might not be the cleanest fix but it is quite minimal. I'm not sure what the exact intent is with the organization of things and with the async status enum, would be happy to hear critiques.

**Testing**
Tested against example in #1238 
<!--
Non-trivial functional changes would need to be tested through:
  - [wgpu-rs](https://github.com/gfx-rs/wgpu-rs) - test the examples.
  - [wgpu-native](https://github.com/gfx-rs/wgpu-native/) - check the generated C header for sanity.

Ideally, a PR needs to link to the draft PRs in these projects with relevant modifications.
See https://github.com/gfx-rs/wgpu/pull/666 for an example.
If you can add a unit/integration test here in `wgpu`, that would be best.
-->


Co-authored-by: Imbris <imbrisf@gmail.com>
2021-02-28 03:18:35 +00:00
Imbris c82a3a77d2 Avoid panic when requesting to unmap a buffer that is pending mapping 2021-02-27 17:38:53 -05:00
bors[bot]andDzmitry Malyshau c3a18c3d8b Merge #1235
1235: Update VertexFormat variants r=grovesNL a=kvark

**Connections**
Matches https://github.com/gpuweb/gpuweb/pull/1322 and https://github.com/gpuweb/gpuweb/pull/1469

**Description**
Just updates us to recent upstream API.
Also breaks lots of user code!

**Testing**
Not functional


Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-02-27 16:05:04 +00:00
Matúš Talčík 53f7f9de92 spv-in: fix if branches in CFG
format
2021-02-26 09:18:10 -05:00
Dzmitry Malyshau 7c2f4eac2e [spv] fix unsigned selector and bitcast 2021-02-26 09:17:32 -05:00
bors[bot]andAaron Hill 29058e03b0 Merge #1237
1237: Move `#[error]` attributes after the corresponding `#[derive]` r=kvark a=Aaron1011

**Connections**
See https://github.com/rust-lang/rust/issues/79202

**Description**
Fixes Nightly future-incompat warnings

**Testing**
There are no behavior changes intended.

Co-authored-by: Aaron Hill <aa1ronham@gmail.com>
2021-02-26 01:09:41 +00:00
bors[bot]andAaron Hill 39aa01d1b1 Merge #1236
1236: Update gfx to 0a201d1c406b5119ec11068293a40e50ec0be4c8 r=kvark a=Aaron1011

**Connections**
wgpu issue: #246
GFX PR: https://github.com/gfx-rs/gfx/pull/3653
Underlying libloading issue: https://github.com/nagisa/rust_libloading/issues/41

**Description**

Pulls in https://github.com/gfx-rs/gfx/pull/3653,
which fixes a segfault when using wgpu from a non-main thread.

**Testing**

The example in https://github.com/gfx-rs/wgpu/issues/246 should run successfully. I'm not certain how to add an integration test to the repository.

Co-authored-by: Aaron Hill <aa1ronham@gmail.com>
2021-02-26 01:03:12 +00:00
Aaron Hill 12b086d92d Move #[error] attributes after the corresponding #[derive]
This fixes Nightly warnings

See https://github.com/rust-lang/rust/issues/79202
2021-02-25 15:40:11 -05:00
Dzmitry Malyshau cf165f9a3e Update VertexFormat variants 2021-02-25 15:25:56 -05:00
Aaron Hill 8b4bec5d9a Update gfx to 0a201d1c406b5119ec11068293a40e50ec0be4c8
Fixes #246

Pulls in https://github.com/gfx-rs/gfx/pull/3653,
which fixes a segfault when using wgpu from a non-main thread.
2021-02-25 15:25:40 -05:00
bors[bot]andAndreas Reich 143d964f90 [rs] Merge #773
773: Panic on empty buffer slices r=kvark a=Wumpf

Fixes #735 
Can't really pass through zero sizes, so panic it is.

I'm really just here to update to latest wgpu version to get my recent fix there in a more convenient manner, but doing a PR with just that felt a bit boring ;-). Now I'm of course guilty of conflating things 🤔 

Co-authored-by: Andreas Reich <r_andreas2@web.de>
2021-02-25 15:59:36 +00:00
Dzmitry Malyshau afbcf05006 Move the convert from an example to a binary target 2021-02-25 10:05:21 -05:00
Dzmitry Malyshau cb45cd9011 [spv-in] dump the flow graph before it's serialized 2021-02-25 10:05:21 -05:00
Dzmitry Malyshau 1dc955551b [spv-out] use image_fetch where appropriate (#522) 2021-02-25 09:57:35 -05:00
Andreas Reich 2bc930d905 [rs] panic on empty buffer slice
Fixes #735
2021-02-25 09:59:17 +01:00
bors[bot]andPatrick LaFontaine 137d92c6b1 [rs] Merge #772
772: spelling error in skybox r=kvark a=Pat-Lafon



Co-authored-by: Patrick LaFontaine <32135464+Pat-Lafon@users.noreply.github.com>
2021-02-25 02:30:55 +00:00
Andreas Reich efc4c6dbea [rs] Upgrade to latest wgpu 2021-02-25 00:24:49 +01:00