Commit Graph
8897 Commits
Author SHA1 Message Date
bors[bot]andDzmitry Malyshau 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]andDzmitry Malyshau 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]andDzmitry Malyshau 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
Jasper St. Pierre 0b9af95793 [glsl-in] Make sure to Load on a ValuePointer as well
Fixes issues with indexing vectors.
2021-07-02 01:44:57 -04:00
Jasper St. Pierre 78e1304d42 [glsl-in] Convert bool -> scalar cast to Select 2021-07-02 01:34:34 -04:00
bors[bot]andConnor Fitzgerald 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
Connor Fitzgerald 96375dfa1b Fix display of test failure reason 2021-07-02 00:57:19 -04:00
bors[bot]andConnor Fitzgerald 871cbed18a Merge #1584
1584: Update testing limits for rpi4 r=kvark a=cwfitzgerald

**Connections**

Related to #1574. Exposed #1583.

**Description**

Changes the reftesting limits to be tolerant of how the RPI4 renders. Fixes the debug half of #1577. 

Fixes some naming issues as well.

**Testing**

It is


Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2021-07-02 04:34:55 +00:00
Dzmitry Malyshau a92f7689f2 [mtl] detect binding incomatibility 2021-07-02 00:25:48 -04:00
Connor Fitzgerald 2bdc54ad32 Formatting woes 2021-07-02 00:13:33 -04:00
Connor Fitzgerald a336c9e160 Spell tolerance right 2021-07-02 00:13:33 -04:00
Connor Fitzgerald fc03160d19 Fix backend_failure plurality 2021-07-02 00:13:33 -04:00
Connor Fitzgerald 6c79b71d87 Mention --no-fail-fast in readme 2021-07-02 00:13:33 -04:00
Connor Fitzgerald f76200e725 Update testing limits for rpi4 2021-07-02 00:13:33 -04:00
Dzmitry Malyshau 579de425e5 hal/vk: fix sampler default LOD range 2021-07-02 00:05:36 -04:00
bors[bot]andDzmitry Malyshau 9ee728bd53 Merge #1578
1578: Fix destruction of resources r=kvark a=kvark

**Connections**
Fixes #1552
Also fixes the VVL about swapchain frame destruction.

**Description**
Swapchain view was never registered in the device's root Hub. So the old logic of adding it to "suspected resources" didn't fire up correctly. The new logic goes straight into the submission tracker.
This path will cease to exist when either Hubs are removed, or API changes of https://github.com/webgpu-native/webgpu-headers/issues/89 are accepted.

The other resource destruction errors happened because we gathered all the resources that were abandoned by the user, and held alive only by the submitted command buffers, and we added them to the suspected list. Then we'd scan the list in `maintain`, see that they can be removed, and try to associate their destruction with one of the submissions. But the current submission was not added yet! So the logic thinks it can just remove the resources right away in this case, assuming the submission is not found because it's long gone in past.

**Testing**
Tested on our examples.


Co-authored-by: Dzmitry Malyshau <kvark@fastmail.com>
2021-07-02 02:36:01 +00:00
João Capucho 6e9410c056 [glsl-in] More implicit casts for builtins 2021-07-01 21:02:19 -04:00
João Capucho 1e2aee2263 [glsl-in] Clamp function fixes
Allow vector sources and scalar selector
Do implicit conversions
2021-07-01 21:02:19 -04:00
João Capucho e277cd1b12 [glsl-in] Fix shifts between vectors and scalars 2021-07-01 21:02:19 -04:00
Robert Swain 377941a98f [msl-out] Add 'this' as a reserved keyword 2021-07-01 21:00:29 -04:00
Jasper St. Pierre cb8e9f2cad [glsl-in] Implicitly splat the inputs of clamp() 2021-07-01 18:32:33 +01:00
João Capucho 8880faf360 Address more comments 2021-07-01 11:19:28 -04:00
João Capucho a1749ab9c5 [glsl-out] Fix argument skipping 2021-07-01 11:19:28 -04:00
João Capucho 2bb15eb0a8 [glsl-in] Add support for texture arguments 2021-07-01 11:19:28 -04:00
João Capucho 4da665d3ba Address comments 2021-07-01 11:19:28 -04:00
João Capucho d0fd065096 [glsl-out]Handle texture/sampler function argument 2021-07-01 11:19:28 -04:00
João Capucho 7df4a52af9 [valid] Handle texture/sampler function argument 2021-07-01 11:19:28 -04:00
João Capucho f98b4e2f48 [spv-in] Support texture/sampler function argument 2021-07-01 11:19:28 -04:00
Dzmitry Malyshau 8db6f99a3e Suspect new resources for destruction only after the current submission is tracked 2021-07-01 02:02:16 -04:00
Dzmitry Malyshau f9f19faed6 Rewire the path of destruction for swapchain texture views 2021-07-01 01:39:12 -04:00
Jim Blandy e32f10f940 [spv-out] recyclable: Remove capacity reduction code. 2021-07-01 01:07:01 -04:00
Jim Blandy 3a1a2ed8b3 [spv-out] Move BlockContext into its own file.
Rearrange some code for easier visibility.

`make_local` doesn't need a PhysicalLayout `self`; make it a free function.
2021-07-01 01:06:18 -04:00
Jim Blandy f878a9dcaf [spv-out]: Introduce helpers for BlockContext code.
Give `BlockContext` its own `temp_list`, which it steals from `Writer` for a
bit.

Add `BlockContext::cached`, for getting cached expression ids.
2021-07-01 01:06:18 -04:00
Jim Blandy 9f7424c3af [spv-out]: Remove all #[allow(clippy::too_many_arguments)] attrs. 2021-07-01 01:06:18 -04:00
Jim Blandy 634632a382 [spv-out]: Introduce BlockContext.
This commit should should cause no visible change in behavior.

Many `back::spv::Writer` methods take long lists of arguments simply describing
the module and function we're generating code for, but these never change while
we generate a given function. This commit moves some of those values into a
`BlockContext` type, and turns those `Writer` methods into `BlockContext`
methods, so that code can access these values through `self`, rather than
threading them through everywhere as arguments.

Many uses of `self.foo` become `self.writer.foo`. Some of these can be
simplified, but to make this commit easier to review, most of those changes are
left to later commits.

This allows us to remove some `#[allow(clippy::too_many_arguments)]` attributes.
2021-07-01 01:06:18 -04:00
Jim Blandy e0b37667ca [spv-out] Move future BlockContext methods into their own impl block.
This commit should introduce no meaningful code changes. It's simply isolating
the `Writer` methods that should be `BlockContext` methods into their own impl
block, to make it easier to see the meaningful changes needed to introduce
`BlockContext`.
2021-07-01 01:06:18 -04:00
Jasper St. Pierre fbab3a3ba5 [glsl-in] Add support for texture function with LOD bias 2021-07-01 02:45:13 +01:00
Dzmitry Malyshau 6dfcde4429 Update changelog with wgpu-hal and bitflags rename 2021-06-30 15:16:11 -04:00
bors[bot]andDzmitry Malyshau d8888ccaa5 Merge #1576
1576: Switch all bitflag names to plural r=cwfitzgerald a=kvark

**Connections**
#1471 added a lot of singular bitflag names. Previously, we weren't really consistent.

**Description**
This PR changes all of the names to be plural, except for a few that don't imply singularity, and are matching WebGPU upstream. Maybe we need to convert them too?

**Testing**
self-tested


Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
2021-06-30 19:02:07 +00:00
Dzmitry Malyshau ba006cfaa7 Rename ColorWrite, TextureUsage, and BufferUsage 2021-06-30 14:57:38 -04:00
Dzmitry Malyshau 568ac3fa24 Switch all bitflag names to plural 2021-06-30 14:43:36 -04:00
c9ab6d06d2 Merge #1510
1510: OpenGL ES3 backend r=cwfitzgerald,Gordon-F,kvark a=kvark

**Connections**
Follow-up to #1471

**Description**
The new wgpu-hal backend for GLES3 ~~and WebGL2~~
Edit: WebGL2 is not included here

**Testing**
Examples!

Current status:
  - all examples work, minus the next issue
  - "mipmap" is buggy because we don't have a good way to do mipmap/layer selection
  - automated testing?


Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
Co-authored-by: Dzmitry Malyshau <dmalyshau@mozilla.com>
Co-authored-by: Dzmitry Malyshau <kvark@fastmail.com>
2021-06-30 16:08:33 +00:00
Dzmitry Malyshau 6f13eebb7b hal/gles: compressed ETC2 texture support 2021-06-30 12:06:59 -04:00
Gordon-F ef1194d69a [CI] Add dneto0 spirv-samples to lazy task 2021-06-30 12:00:33 -04:00
Dzmitry Malyshau 45074b2939 hal: more implementation comments 2021-06-30 02:31:13 -04:00