Commit Graph

1798 Commits

Author SHA1 Message Date
Dzmitry Malyshau
ffd47fbc0e Remove Vulkan Portability support 2021-04-29 11:42:26 -04:00
Dzmitry Malyshau
6f9c254061 Changelog for 0.8 2021-04-29 11:33:17 -04:00
bors[bot]
c539c1f4ab
Merge #1358
1358: Big refactor of the profiling usage r=kvark a=kvark

**Connections**

**Description**
Improves the profiling markers in many ways:
  1. remove unnecessary leftovers from the `tracing` era, such as querying device/adapter features. These are one-time and light-weight. It's unlikely we are going to be interested in them.
  2. add markers to where it really matters, such as `maintain` pieces, `submit` phases, render pass preparation, etc.
  3. shorten the markers to be strictly the function names, passing the class name as a tag

**Testing**
Tested on vange-rs

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-04-29 06:08:14 +00:00
Dzmitry Malyshau
6ff618aafb Big refactor of the profiling usage 2021-04-29 02:06:58 -04:00
bors[bot]
acd21eeeb1
Merge #1315
1315: Add buffer arrays r=kvark a=csnewman

**Connections**
https://github.com/gfx-rs/wgpu-rs/pull/850

**Description**
Adds buffer array bindings

**Testing**
TODO
<!--
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: Chandler Newman <chandler2newman@hotmail.co.uk>
2021-04-29 04:40:54 +00:00
Chandler Newman
904ec7a5ee Add uniform and storage buffer arrays 2021-04-29 00:38:04 -04:00
bors[bot]
c727b1a7f5
Merge #1355
1355: Add shader compile markers r=kvark a=kvark

**Connections**
Picks up https://github.com/gfx-rs/gfx/pull/3736 and prior PRs

**Description**
Allows clearly seeing the times spent in shader translation code.

**Testing**
Tested on vange-rs

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-04-27 16:24:37 +00:00
Dzmitry Malyshau
087bd07f55 Add shader compile markers 2021-04-27 12:23:28 -04:00
bors[bot]
13015c8621
Merge #1354
1354: Update profiling to 1.0 r=kvark a=kvark

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

**Description**
Some crates like to release 1.0

**Testing**
Should work

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-04-26 16:00:46 +00:00
Dzmitry Malyshau
6c7f2b917f Update profiling to 1.0 2021-04-26 11:59:15 -04:00
bors[bot]
ba1b2c5f19
Merge #1353
1353: Update naga to gfx-23 r=kvark a=kvark

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

**Description**
Just a bunch of Naga fixes

**Testing**
To be tested in wgpu-rs

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-04-26 15:21:41 +00:00
Dzmitry Malyshau
03c4e0969e Update naga to gfx-23 2021-04-26 11:10:22 -04:00
bors[bot]
adfa1245d8
Merge #1351
1351: Hard error on SPIRV parsing failure when VALIDATION is requested r=cwfitzgerald a=kvark

**Connections**
Follow-up from https://github.com/gfx-rs/wgpu/issues/1350#issuecomment-825186159

**Description**
If the user provided SPIR-V, and they requested VALIDATION, and we fail to parse the file - there is no point to proceed.
VALIDATION flag should be a gaurantee of safe operation, so we can't just throw the same SPIR-V at SPIRV-Cross and pretend that it's ok.

**Testing**
Tested on noclip shaders

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2021-04-22 23:21:39 +00:00
Dzmitry Malyshau
525efda7b2 Hard error on SPIRV parsing failure when VALIDATION is requested 2021-04-22 17:18:16 -04:00
bors[bot]
fe07d272b1
Merge #1348
1348: Change error type for the backend shader r=kvark a=kvark

**Connections**
Fixes #1347

**Description**
Issues a better error for this case

**Testing**
Should work

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-04-21 21:07:49 +00:00
Dzmitry Malyshau
bc4c5c8f03 Change error type for the backend shader 2021-04-21 17:06:58 -04:00
bors[bot]
43798a502f
Merge #1346
1346: Make implicit ids actually errors to start with r=kvark a=kvark

**Connections**
Follow-up to #1341

**Description**
Turns out, leaving the indices `Vacant` is also not an option, since the `hub.rs` code considers this an internal error (unexpected), and panics.

**Testing**
Tested on Austin's examples in Gecko

Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2021-04-20 21:35:12 +00:00
Dzmitry Malyshau
8505a39f6a Make implicit ids actually errors to start with 2021-04-20 17:32:40 -04:00
bors[bot]
8704a6e3b5
Merge #1342
1342: Update gfx to the new image view API r=kvark a=kvark

**Connections**
Grabs https://github.com/gfx-rs/gfx/pull/3725 and https://github.com/gfx-rs/gfx/pull/3726
Addresses https://github.com/gfx-rs/wgpu-rs/discussions/868#discussioncomment-633648

**Description**
Updates gfx, also improves the error messages for pipeline creation a bit.

**Testing**
Not really, this is low-risk.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-04-20 15:11:07 +00:00
Dzmitry Malyshau
cc2e547d48 Update gfx to the new image view API 2021-04-20 10:16:30 -04:00
bors[bot]
9c47ae6183
Merge #1332
1332: Validate min/max blending factors r=kvark a=kvark

**Connections**
Based on #1325 
Matches https://github.com/gpuweb/gpuweb/pull/1635

**Description**
This PR refactors the color state errors, giving them more detailed context, and having a dedicated enum for them.
It also adds the check for the blend factors to be (1, 1) for the min/max operations.

**Testing**
Untested

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-04-20 13:37:39 +00:00
Dzmitry Malyshau
cac643507b Validate min/max blending factors 2021-04-20 09:37:07 -04:00
bors[bot]
8239307bcb
Merge #1341
1341: Mark unused implicit BGL ids as vacant r=kvark a=kvark

**Connections**
Fixes https://github.com/gfx-rs/wgpu/issues/1340

**Description**
This is not an ideal solution. We aren't marking the IDs as errors. But it's an improvement, and it resolves the crash in FF, supposedly.

**Testing**
Tested on wgpu-rs examples with implicit layouts

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-04-20 03:42:28 +00:00
Dzmitry Malyshau
de86f2a72f Mark unused implicit BGL ids as vacant 2021-04-19 23:35:33 -04:00
bors[bot]
523ef2dfec
Merge #1339
1339: Update naga to gfx-22, add interpolation sampling validation r=kvark a=kvark

**Connections**
Includes https://github.com/gfx-rs/gfx/pull/3729, https://github.com/gfx-rs/gfx/pull/3719, https://github.com/gfx-rs/naga/pull/689, https://github.com/gfx-rs/naga/pull/700, and other fixes

**Description**
Update gfx and naga to latest (gfx-22 tag).
The hope is for this to be the last tag release before 0.8

**Testing**
Tested on wgpu-rs examples

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-04-19 17:40:24 +00:00
Dzmitry Malyshau
27f51ca252 Update naga to gfx-22, add interpolation sampling validation 2021-04-19 13:33:36 -04:00
bors[bot]
b500fa86f1
Merge #1331
1331: Validate filtering r=cwfitzgerald a=kvark

**Connections**
See https://github.com/gpuweb/gpuweb/pull/1223

**Description**
This PR implements validation of sampler filtering (property in BGL), as well as the ability to filter non-filterable textures.

**Testing**
Untested

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-04-18 14:26:31 +00:00
Dzmitry Malyshau
280ba30c6c Don't compare booleans 2021-04-18 10:25:54 -04:00
Dzmitry Malyshau
92886b4995 Validate filtering samplers at BG creation 2021-04-18 10:25:54 -04:00
Dzmitry Malyshau
6d7ef8b8fd Validate filtered sampling 2021-04-18 10:25:54 -04:00
bors[bot]
a749f09bbf
Merge #1325
1325: Relax and imporve vertex attribute validation r=cwfitzgerald a=kvark

**Connections**
None

**Description**
Improves our validation of vertex attributes in the following ways:
  1. Relaxes the size matching, so that we allow the shaders to default some of the values we don't provide
  2. Require interpolation to match
  3. Make the error messages more detailed:

>     In Device::create_render_pipeline
    error in stage VERTEX
    error matching the stage input at 1 (Uint32x2 interpolated as None) against the previous stage outputs
    input type is not compatible with the provided Float32x2

**Testing**
Tested on wgpu-rs examples.

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-04-18 07:37:54 +00:00
bors[bot]
6a6a9a4aed
Merge #1333
1333: Update blending API names r=kvark a=kvark

**Connections**
Follows https://github.com/gpuweb/gpuweb/pull/1627 and https://github.com/gpuweb/gpuweb/pull/1633

**Description**
Makes the names clearer.

**Testing**
No need

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-04-15 15:27:26 +00:00
Dzmitry Malyshau
c744582052 Update blending API names 2021-04-15 11:25:04 -04:00
Dzmitry Malyshau
c0478c707d Address clippy issues on copying things 2021-04-14 15:23:20 -04:00
bors[bot]
f949643721
Merge #1329
1329: derive copy for DeviceType, BlendComponent, BlendState, PrimitiveStat… r=kvark a=adamnemecek

…e, MultisampleState, DepthBiasState, StencilFaceState, VertexAttribute, ImageDataLayout, BindGroupLayoutEntry, DrawIndirectArgs, DrawIndexedIndirectArgs, DispatchIndirectArgs



Co-authored-by: adamnemecek <adamnemecek@gmail.com>
2021-04-14 19:11:59 +00:00
adamnemecek
687bc81fac derive copy for DeviceType, BlendComponent, BlendState, PrimitiveState, MultisampleState, DepthBiasState, StencilFaceState, VertexAttribute, ImageDataLayout, BindGroupLayoutEntry, DrawIndirectArgs, DrawIndexedIndirectArgs, DispatchIndirectArgs 2021-04-14 12:09:35 -07:00
adamnemecek
6d3a514c43
updated gfx (#1327)
* updated gfx

* use long rev
2021-04-14 14:37:13 -04:00
Dzmitry Malyshau
78652e93f4 Make input stage errors more detailed 2021-04-13 23:01:02 -04:00
Dzmitry Malyshau
b7a0410e09 Relax vertex attribute matching, also check interpolation 2021-04-13 22:19:44 -04:00
Ashley
ff75948848
Allow non-storage textures to be able to be queried in validation (#1324)
* Improve the WrongUsage error and allow textures to use query

* Run cargo fmt

* Further improve the error

* Add more QUERY flags
2021-04-13 10:12:17 -04:00
Aaron Housh
c820cc8e73
Add Map Alignment type (#1322)
* Add Map Alignment type

* Fix clippy warnings

* Make buffer_map_async compare range start to MAP_ALIGNMENT
2021-04-12 13:28:46 -04:00
bors[bot]
27dbf076d5
Merge #1320
1320: Update naga to gfx-21 r=kvark a=kvark

**Connections**
See https://github.com/gfx-rs/gfx/pull/3720

**Description**
Brings a number of Naga fixes.

**Testing**
wgpu-rs examples

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-04-11 05:17:07 +00:00
Dzmitry Malyshau
1ba95585ba Update naga to gfx-21 2021-04-11 01:07:46 -04:00
bors[bot]
4c61a910fc
Merge #1313
1313: Don't panic on change_extend errors r=cwfitzgerald a=kvark

**Connections**
???

**Description**
We used to have leftover `unwrap()` for extending the usages of render targets.
Now these are all routed via `UsageConflicts` into actual errors.

**Testing**
Untested


Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-04-09 04:36:49 +00:00
Dzmitry Malyshau
191f33871b Don't panic on change_extend errors 2021-04-08 12:03:46 -04:00
bors[bot]
ff5e626bfd
Merge #1311
1311: Update gfx with the cmd buf freeing fix r=kvark a=kvark

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

**Description**
just an update

**Testing**
nopes

Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-04-06 14:29:47 +00:00
Dzmitry Malyshau
02442bcb5e Update gfx with the cmd buf freeing fix 2021-04-06 10:28:51 -04:00
bors[bot]
111bb5bec6
Merge #1310
1310: Updated `gpu-alloc` to rev 2cd1ad6 r=kvark a=francesco-cattoglio

**Connections**
Updated gpu-alloc to include the commit that fixed https://github.com/zakarumych/gpu-alloc/issues/41

**Description**
It is a simple update of a dependency.

**Testing**
I have not tested this change, I just made sure that everything was still compiling correctly.
<!--
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: Franz <francesco.cattoglio@gmail.com>
2021-04-06 13:27:07 +00:00
Franz
7a37f07ea0 Updated gpu-alloc to rev 2cd1ad6 2021-04-06 11:16:49 +02:00
bors[bot]
e430cf4bcc
Merge #1309
1309: Move depth clamping to primitive state r=kvark a=kvark

**Connections**
Matches https://github.com/gpuweb/gpuweb/pull/1583

**Description**
There are valid cases where we'd want the depth clamping happening without any depth/stencil attachment or state.

**Testing**
Untested


Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-04-05 20:02:40 +00:00