Commit Graph
8323 Commits
Author SHA1 Message Date
Igor Shaposhnik 7df4815c41 Remove gfx-rs development section from wgpu README 2021-06-24 15:05:17 +03:00
bors[bot]andConnor Fitzgerald 86e4b9ba03 Merge #1549
1549: Fix cargo-tarpaulin r=kvark a=cwfitzgerald

I have no way of actually testing this is tarpaulin is linux only, but this should work

Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2021-06-24 05:42:57 +00:00
Dzmitry Malyshau cfed43face Update submission indices on all stateless resources 2021-06-24 01:40:18 -04:00
Connor Fitzgerald f1a6fe12db Fix cargo-tarpaulin 2021-06-24 01:30:17 -04:00
bors[bot]andConnor Fitzgerald 632f85b703 Merge #1538
1538: Implement Integration and Example Tests r=kvark a=cwfitzgerald

**Connections**

Closes #1379! Closes #1465.

**Description**

This adds a testing framework for wgpu. This includes testing infrastructure for integration and example based reftests and other tests.

I have added env-based adapter and backend choices as a common utility in wgpu-rs. This is how the framework based examples choose their adapters, so WGPU_ADAPTER_NAME is how you can choose adapters based on a substring of the name.

I added explicit seeding to all examples that use random numbers so reftesting was deterministic. conservative-raster, mipmap, and texture-arrays (#1532) are broken and are marked as such. This testing framework will make CI fails if this is fixed, so tests don't fall out of date.

Note: as we get more integration tests, we can factor out more of the `pulling_common` to be common between all the tests. 

**Testing**

It is testing :)


Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2021-06-24 04:43:25 +00:00
Connor Fitzgerald 7b3a7db72e Disable CI testing pending further investigation 2021-06-24 00:39:16 -04:00
Connor Fitzgerald 9377149e85 Remove holes from wgpu-info 2021-06-23 21:29:44 -04:00
Connor Fitzgerald cfb84748bf Exclude llvmpipe due to segfaults 2021-06-23 20:51:24 -04:00
Connor Fitzgerald b060bf1afe Assorted touchups 2021-06-23 20:23:19 -04:00
Connor Fitzgerald 3356f5f993 PR comments 2021-06-23 19:10:11 -04:00
Connor Fitzgerald 18ac365f79 Please CI 2021-06-23 19:10:11 -04:00
Connor Fitzgerald c0664c2bb7 Begin robust exception system 2021-06-23 19:10:11 -04:00
Connor Fitzgerald ad0c8d4f78 Add documentation 2021-06-23 19:10:11 -04:00
Connor Fitzgerald 382fc751c7 Keep raising the mipmap limit 2021-06-23 19:10:11 -04:00
Connor Fitzgerald ccef63e914 Isolate hello-compute examples to own file 2021-06-23 19:10:11 -04:00
Connor Fitzgerald f47a54009d Finish reftest and test running infra 2021-06-23 19:10:11 -04:00
Connor Fitzgerald 54f1b0ac01 Begin wgpu-info 2021-06-23 19:10:11 -04:00
Connor Fitzgerald d094712cd4 Make screenshots pass on laptop 2021-06-23 19:10:11 -04:00
Connor Fitzgerald ec74722d57 Add image comparison to all examples 2021-06-23 19:10:11 -04:00
Connor Fitzgerald 22b8e2851f Remove loom 2021-06-23 19:10:11 -04:00
Connor Fitzgerald ebbbf2216b Add image comparison to the mipmap example 2021-06-23 19:10:11 -04:00
Connor Fitzgerald 3d8a4baeb8 Add out multiple tests of vertex pulling 2021-06-23 19:09:45 -04:00
Connor Fitzgerald 528a311dd1 Get test functioning 2021-06-23 19:09:44 -04:00
Connor Fitzgerald cfda2258f5 Finish fs_main 2021-06-23 19:09:44 -04:00
Connor Fitzgerald 6432c4f6d8 Massively refactor testing infrastructure to better share code 2021-06-23 19:09:44 -04:00
Connor Fitzgerald 03c7f0097a Unify testing and examples and add useful external utilities 2021-06-23 19:09:44 -04:00
Connor Fitzgerald 49b4bcb552 Finish out first vertex test 2021-06-23 19:09:44 -04:00
Connor Fitzgerald cecf357452 Fully convert testing infrastructure to wgpu-rs 2021-06-23 19:09:44 -04:00
bors[bot]andDzmitry Malyshau eeb9ead199 Merge #1547
1547: Don't merge stateless trackers from bind groups r=cwfitzgerald a=kvark

**Connections**
Hinted by @pythonesque on the matrix
Follow-up to #1417

**Description**
This is an optimization only.

When a bind group is used, we need to ensure two things:
  1. stateful usages are merged in (buffers and textures)
  2. other resources are help alive by the command buffer

We used to merge all of the states into the local trackers. However, the local tracker already
keeps a strong reference to the whole bind group, so the resources in it are not going away.
Therefore, we can skip having them separately in the local trackers.

**Testing**
Untested.


Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
2021-06-23 20:16:24 +00:00
Dzmitry Malyshau c2f879b4f7 Don't merge stateless trackers from bind groups 2021-06-23 15:28:40 -04:00
bors[bot]andDispersia 6035e988a4 Merge #1546
1546: Fix readme in wgpu r=kvark a=Dispersia

**Description**
 Just fixes the logo image in the wgpu/wgpu directory, didn't move the logo.png down because several other places reference it still as well.


Co-authored-by: Dispersia <dispersias@gmail.com>
2021-06-23 18:34:22 +00:00
Dispersia ba7f4f1b7c Fix readme in wgpu 2021-06-23 10:27:02 -07:00
Gordon-F 64b9e45015 [msl-out] Add type for backend result 2021-06-23 11:16:45 -04:00
Jonathan Behrens 42f1f37741 [glsl-in] Deduplicate constants so array types match 2021-06-23 11:13:40 -04:00
Gordon-F 0a957f9427 [wgsl-out] Reduce global import usage 2021-06-23 11:10:12 -04:00
Gordon-F 1d4f2305b0 [msl-out] Reduce global import usage 2021-06-23 11:10:12 -04:00
Gordon-F 9e245d1fde [hlsl-out] Reduce global import usage 2021-06-23 11:10:12 -04:00
Gordon-F 7eeab393b2 [glsl-out] Reduce global import usage 2021-06-23 11:10:12 -04:00
Dzmitry Malyshau b8f430551b hal/mtl: fix supportsFamily call 2021-06-22 22:13:36 -04:00
bors[bot]andDzmitry Malyshau cb118e57f6 Merge #1540
1540: Test wgpu-rs more on CI r=scoopr a=kvark

**Connections**
https://github.com/gfx-rs/wgpu/pull/1539#issuecomment-866269882

**Description**
Enabling the build of `wgpu` with examples on all platforms, also covering by clippy.

**Testing**
Self-tested


Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-06-22 22:08:14 +00:00
Dzmitry Malyshau 36939477c5 Test wgpu-rs more on CI 2021-06-22 17:23:32 -04:00
bors[bot]andMikko Lehtonen eceffc1d35 Merge #1539
1539: Fix spirv feature by removing profiling::scope bit r=kvark a=scoopr

**Description**
Compilation failed with `spirv` featue enabled

**Testing**
Compiled with `spirv` feature enabled

Co-authored-by: Mikko Lehtonen <scoopr@iki.fi>
2021-06-22 20:01:32 +00:00
Mikko Lehtonen 886d2714e3 Fix spirv feature by removing profiling::scope bit 2021-06-22 22:23:03 +03:00
bors[bot]andDzmitry Malyshau 5f2df9af79 Merge #1518
1518: Make spirv an optional feature r=cwfitzgerald a=kvark

**Connections**
https://github.com/gfx-rs/naga/issues/940 shows how much SPIR-V parsing can be a pain.

**Description**
Keep it supported natively, but put it behind a feature flag. This allows to skip compilation of parts of Naga as well as dependencies like `petgraph`.
On my machine, compiling `wgpu-core` time is reduced from 40.87s to 35.36s, which is about 13% improvement.

**Testing**
Just compiling


Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-06-22 16:42:28 +00:00
Dzmitry Malyshau 4c03d286c6 Remove SPIRV entirely from wgpu-core 2021-06-22 12:35:22 -04:00
Igor Shaposhnik a5874eb0cf [wgsl-out] Fix Pointer writing 2021-06-22 12:29:14 -04:00
Gordon-F 0292a2897a Move FunctionCtx into back module 2021-06-22 10:23:27 -04:00
Gordon-F ec6b18a782 [glsl-out] Refactor FunctionCtx 2021-06-22 10:23:27 -04:00
Dzmitry Malyshau 064263272c Refactor control flow validation, allow break in switches 2021-06-22 00:24:50 -04:00
Gordon-F 9b823c1b60 [hlsl-out] Implement Access and Unary expressions 2021-06-21 16:41:00 -04:00