Commit Graph

9013 Commits

Author SHA1 Message Date
Elie Michel
0ae0446f3a [cli] Add support for .{vert,frag,comp}.glsl files (#2462) 2023-09-13 15:23:58 +02:00
Theo
1281c1156c [spv-out] Always give structs with runtime arrays a Block decoration (#2455) 2023-09-12 19:59:31 +02:00
Jim Blandy
0f36a745cf [wgsl-out] Don't include type parameter in splat expressions. (#2469)
Generate `vec4(1.0)` instead of `vec4<f32>(1.0)`, since WGSL requires
us to infer the type parameter anyway.
2023-09-12 19:34:24 +02:00
dependabot[bot]
7fea9e934e Bump serde_json from 1.0.105 to 1.0.106 (#4129)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.105 to 1.0.106.
- [Release notes](https://github.com/serde-rs/json/releases)
- [Commits](https://github.com/serde-rs/json/compare/v1.0.105...v1.0.106)

---
updated-dependencies:
- dependency-name: serde_json
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-11 22:12:43 +02:00
Jim Blandy
b17eaf76a3 snapshots::convert_spv: Print input name before processing. (#2467)
When `convert_spv` fails, this makes it easier to tell which file it
was trying to process.
2023-09-11 18:32:56 +02:00
Nicolas Silva
012304ea11 Update naga to 0.13.0@git:cc87b8f9eb30bb55d0735b89d3df3e099e1a6e7c (#4130)
Co-authored-by: Nicolas Silva <nical@fastnmail.com>
2023-09-11 15:57:43 +02:00
Jim Blandy
cc87b8f9eb Don't warn about unused mut in tests when "validate" feature is off. (#2466) 2023-09-11 11:59:14 +02:00
Fredrik Fornwall
a0eb1f5462 [wgsl-in] Allow sign() to take int argument (#2463) 2023-09-06 09:29:35 -07:00
dependabot[bot]
9a91953537 Bump bytemuck from 1.13.1 to 1.14.0 (#4123)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-06 09:29:52 -04:00
Fredrik Fornwall
978e6df645 Use || instead of | 2023-09-05 18:05:13 -07:00
Jim Blandy
3bd3c6ffb2 [glsl-in] Move arg_type_walker method from Frontend to Context. 2023-09-05 14:00:17 -07:00
Jim Blandy
9bcb5691a5 [glsl-in] Doc fix. 2023-09-05 14:00:17 -07:00
Jim Blandy
4daed67075 [glsl-in] Document Frontend::add_entry_point. 2023-09-05 14:00:17 -07:00
teoxoy
7c3c6a9d47 [glsl-in] move module and active body to Context 2023-09-05 14:00:17 -07:00
teoxoy
843557a48b [glsl-in] refactor: use Context::add_expression in all places 2023-09-05 14:00:17 -07:00
Connor Fitzgerald
4235b0dd1c Fix D3D12 Surface Leak (#4106) 2023-09-05 18:06:33 +00:00
Jim Blandy
7634ae6112 wgpu_core: Add logging to Instance::new.
For each backend `blah`, log::debug/trace whether we were able to
populate `Instance::blah`.
2023-09-05 13:47:27 -04:00
Luke Jones
d17165f08b Enable vulkan presentation on Intel Mesa >= v21.2 (#4110)
Due to an issue with Mesa versions less than 21.2 presentation on Vulkan
was forced to Nvidia only. This in itself brought new issues around the
Nvidia driver specfic format modifers.

As of Mesa 21.2 the Intel vulkan issue is fixed. This commit enables
presentation on versions 21.2 and above for Intel.

References:
- https://github.com/NVIDIA/egl-wayland/issues/72

Closes [#4101](https://github.com/gfx-rs/wgpu/issues/4101)
2023-09-05 14:20:04 +00:00
Jim Blandy
ff807295da hal/vulkan: Instance::required_extensions -> desired_extensions (#4115)
Rename `wgpu_hal::vulkan::Instance::required_extensions` to
`desired_extensions`, to match its behavior. Document the function to
clarify its role.
2023-09-05 13:41:46 +00:00
dependabot[bot]
9591505af1 Bump actions/checkout from 3 to 4 (#4117)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-05 15:27:38 +02:00
dependabot[bot]
e8e53fb31c Bump serde from 1.0.186 to 1.0.188 (#4091)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.186 to 1.0.188.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.186...v1.0.188)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-05 15:20:04 +02:00
dependabot[bot]
e451195500 Bump thiserror from 1.0.47 to 1.0.48 (#4112)
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.47 to 1.0.48.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.47...1.0.48)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-05 15:11:05 +02:00
Jim Blandy
54a7f0eac9 Skip test_multithreaded_compute on MoltenVK. (#4096)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-09-04 03:54:39 +00:00
Fredrik Fornwall
5329aa2bd5 [wgsl-in] Handle modf and frexp (#2454) 2023-09-02 08:55:35 +02:00
Fredrik Fornwall
f49314dbbd Fix validation and glsl parsing of ldexp (#2449)
Fixes #1908.
2023-09-01 18:44:48 +02:00
Kevin Reid
332cd0325d Add details to InstanceError and CreateSurfaceError. (#4066)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2023-09-01 01:48:31 -04:00
Patrik Buhring
41efabbd88 Fix limits interface on web. (#4107) 2023-09-01 05:46:00 +00:00
dependabot[bot]
4a12ab73ae Bump profiling from 1.0.9 to 1.0.10 (#4102)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-31 23:59:00 -04:00
Rajesh Malviya
625afc3b42 Drop texture clear_views in surface_texture_discard (#4057) 2023-08-30 17:58:47 -04:00
Frederik Magnus Johansen Vestre
0491d39232 Support dual source blending (#2427)
Co-authored-by: teoxoy <28601907+teoxoy@users.noreply.github.com>
2023-08-30 21:00:35 +02:00
Fredrik Fornwall
3bd2834b4f [wgsl-in] Handle all(bool) and any(bool) (#2445)
Fixes #1911.
2023-08-29 21:34:55 +02:00
Fredrik Fornwall
1192588486 [ci] Specify -HV 2018 to dxc (#2447)
This avoids breaking the build with the latest release of dxc, which
made HLSL the default.
2023-08-29 19:59:50 +02:00
SMG
e47dc2adad use WGSL for VertexFormat example types (#4035)
* use WGSL for VertexFormat example types

* Update CHANGELOG.md

* use f32 for all VertexFormat float types
2023-08-29 16:53:08 +00:00
Brad Werth
5c2c840159 Prevent Metal from crashing when a still-open encoder is deallocated, resolve issue #2077. (#4023) 2023-08-28 18:23:35 -07:00
Nicolas Silva
1ced67f056 Parametrize the size of the non-sampler descriptor heap in dx12 (#4077) 2023-08-25 21:51:29 +02:00
Nicolas Silva
399637e2b8 Bind group layout dedup (#3925)
* Remove generic parameter in compat::Manager.

The code is specific to bind group layout ids and the generic parameter gets in the way.

* Add a test.

The test actually covers wgpu's configuration where deduplication does not require the indirection rather than the new code. I used it to debug the new code with the configuration hard-coded. It's tedious to add a test to cover dedpuplication of bind group layouts for users of wgpu_core to provide their IDs, we can rely on the CTS which has test for that.

* Implement bind group layout deduplication for all configurations

Currently wgpu-core implement bind group layout deduplication only when it creates its own resource IDs. In other words it works for wgpu but not in Firefox.
This PR bridges the gap by allowing an optional indirection in bind group layouts: each BGL may store an ID referring to its "deduplicated" BGL.
When referring to a BGL the rest of the code must make sure to follow the indirection. The exception is command buffer processing which is considered hot code and where we first validate against the provided BGL ID and only follow the indirection if the initial check failed.

The main pain point with this approach is the various places where wgpu-core manually updates reference counts: we have to be careful about following the indirection to track the right BGL.

* Avoid making decisions based on the size of some generic type.
2023-08-25 21:48:22 +02:00
dependabot[bot]
ac2075e164 Bump serde from 1.0.185 to 1.0.186 (#4086)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.185 to 1.0.186.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.185...v1.0.186)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-24 12:47:27 +02:00
dependabot[bot]
c7e262c5d6 Bump serde from 1.0.183 to 1.0.185 (#4080)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-21 23:51:37 -04:00
dependabot[bot]
7c65aec9ea Bump ron from 0.8.0 to 0.8.1 (#4075)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-21 14:26:14 -04:00
dependabot[bot]
d755143c89 Bump png from 0.17.9 to 0.17.10 (#4079)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-21 14:26:04 -04:00
Jim Blandy
636bef9cd5 Tracker mod docs: fix explanation of index re-use. 2023-08-19 17:06:07 -07:00
Fredrik Fornwall
6aca2e2b5e Add vim .swp files to gitignore (#2448) 2023-08-19 17:35:22 +02:00
dependabot[bot]
1ee4bb502c Bump thiserror from 1.0.46 to 1.0.47 (#4074)
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.46 to 1.0.47.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.46...1.0.47)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-19 10:22:51 +02:00
Fredrik Fornwall
b001313947 [wgsl-in] Only splat 'scalar op vec', not '_ op vec' (#2444)
Change binary_op_splat() from splatting:

        vec op scalar
        _ op vec

to only splat:

        vec op scalar
        scalar op vec
2023-08-18 15:16:44 +02:00
Fredrik Fornwall
3da9355125 [wgsl-in] Avoid splatting all binary operator expressions (#2440)
* [wgsl-in] Avoid splatting all binary operator expressions

Fixes #2439.

* [wgsl-in] Expand binary_op_splat function comment
2023-08-18 13:07:24 +02:00
Fredrik Fornwall
bf324fb947 Make power_preference_from_env() respect WGPU_POWER_PREF=none (#4076)
Also update wgpu/README.md now that default() is None.
2023-08-18 11:05:34 +02:00
dependabot[bot]
6accf3266d Bump tokio from 1.31.0 to 1.32.0 (#4069)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-17 15:57:50 -04:00
dependabot[bot]
b9acec6780 Bump anyhow from 1.0.74 to 1.0.75 (#4070)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-17 15:57:45 -04:00
Teodor Tanasoaia
f58be7b8f1 DX12 set Features::VERTEX_WRITABLE_STORAGE based on the right FL (#4033) 2023-08-17 15:55:58 -04:00
Fredrik Fornwall
f6e99a4603 [wgsl-in] Handle repeated or missing @workgroup_size (#2435) 2023-08-17 13:20:10 +02:00