9309 Commits

Author SHA1 Message Date
Robert Bamler
065d6546c4 Check for spv language version
When checking for capabilities in SPIR-V,
`capabilities_available == None` indicates that all capabilities are
available. However, some capabilities are not even defined for all
language versions, so we still need to check if the requested
capabilities even exist in the language version we're using.
2025-04-28 16:37:45 +02:00
Robert Bamler
2271480f17 Add intrinsics for dot4{I,U}8Packed to changelog 2025-04-28 16:37:45 +02:00
Robert Bamler
5b20979e9b Use intrinsics for dot4{I, U}8Packed on spv 2025-04-28 16:37:45 +02:00
Robert Bamler
fe05765602 Use intrinsics for dot4{I, U}8Packed in HLSL 2025-04-28 16:37:45 +02:00
renovate[bot]
892f629025
chore(deps): update cargo.lock (#7644)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-28 00:41:56 -04:00
Kevin Reid
640e031919
Make BufferSlice's size non-optional. (#7640)
It used to be that `wgpu::Buffer` did not know its own size, and so slices had to potentially not know their endpoints. Now, buffers do, so slices can. This makes the code simpler, without modifying the API.
2025-04-27 16:38:23 +00:00
Connor Fitzgerald
65eb10ed5a Switch cts_runner to clearer no_main style of wasm compat 2025-04-27 18:34:52 +02:00
Connor Fitzgerald
267f14632f Reduce versions to minimum required 2025-04-27 18:34:52 +02:00
Connor Fitzgerald
9c32742dbe Move xtask dependencies into Cargo.toml 2025-04-27 18:34:52 +02:00
Connor Fitzgerald
eb4a2b77d7 Bring xtasks back into workspace 2025-04-27 18:34:52 +02:00
Connor Fitzgerald
8235cd2932 Use no_main to allow xtasks to compile on wasm 2025-04-27 18:34:52 +02:00
Connor Fitzgerald
fa702f9141 Move everything to workspace dependencies 2025-04-27 18:34:52 +02:00
Wouter de Bruijn
30b247a8d1
[naga glsl-out] Differentiate between support for std140 and std430 (#7579)
* [naga glsl-out] Differentiate between support for `std140` and `std430` layout, and emit `std140` in Uniforms when possible

* [naga glsl-out] Remove storage buffer std140 layout fallback, and error when we are unable to assign an explicit memory layout for uniform and storage globals

Co-authored-by: teoxoy <28601907+teoxoy@users.noreply.github.com>

---------

Co-authored-by: teoxoy <28601907+teoxoy@users.noreply.github.com>
2025-04-26 13:55:02 +02:00
renovate[bot]
273072d82c
chore(config): migrate config renovate.json (#7636)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-26 01:45:07 +00:00
Kevin Reid
b93b55920a Expand minimal-versions CI job to cover all packages, use -Zdirect-minimal-versions, but not deny warnings. 2025-04-25 14:40:12 -04:00
Kevin Reid
9727e75ad7 Update Cargo.toml to direct-minimal-versions consistency. 2025-04-25 14:40:12 -04:00
renovate[bot]
82821ae5d1
chore(deps): update rust crate encase to 0.11.0 (#7637) 2025-04-25 17:33:52 +00:00
renovate[bot]
5f3f7028fc
chore(deps): update cargo.lock (#7635)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-25 14:53:30 +00:00
Mads Marquart
949c5af934 [metal] Do not glob-import enum variants
The `metal` crate is currently unsound regarding unknown/future enum
variants, see https://github.com/gfx-rs/metal-rs/issues/209 and
https://github.com/rust-lang/rfcs/pull/3803.

`objc2-metal` fixes this by emitting C enums as a newtype + constants
for each variant, but that prevents us from importing the
variants/constants. So this commit converts to a pattern that works with
that in preparation for the migration.
2025-04-25 10:26:42 -04:00
Mads Marquart
78a5b22458 [metal] Import prefixed metal items
A lot of Metal types are prefixed with MTL, which makes it quite clear
where they're coming from. This means that we don't loose any clarity if
we import them instead of having them prefixed with `metal::`.

This will make it easier to migrate to `objc2-metal` since that crate is
named differently from the `metal` crate.
2025-04-25 10:26:42 -04:00
Jasper St. Pierre
38b6663f3c
validation: Fix type compatibility for streams vs. vertex inputs (#7600)
The old is_compatible_with handled scalar/scalar, scalar/vector, vector/vector, but was missing vector/scalar.

Since is_compatible_with is only used by vertex shader inputs, and vertex shader inputs can't be matrices (only scalars and vectors), we can actually simplify this by removing the other match and just only checking the kind.

Fixes #7568
2025-04-25 15:08:27 +02:00
teoxoy
6a7aa14fbd add changelog entry 2025-04-25 12:39:45 +02:00
teoxoy
cc406f919e [vk] use destructuring for cache keys
If fields are unused, they shouldn't be part of the cache key.
2025-04-25 12:39:45 +02:00
teoxoy
d14849df48 [vk] add support for rendering to slices of 3D textures 2025-04-25 12:39:45 +02:00
teoxoy
f728a92366 [vk] add TextureView::raw_format 2025-04-25 12:39:45 +02:00
teoxoy
2d73eb3967 [vk] move framebuffer cache into CommandEncoder
This makes texture view destruction cheap since users of wgpu-hal are required to keep resources referenced by encoders alive for at least as long as the encoder is alive.

This is also a prerequisite to implement rendering to slices of 3D textures (by creating temporary texture views).

On the other hand the cache won't be as effective but that is probably ok, we can reevaluate the implementation if it turns out to be a problem.
2025-04-25 12:39:45 +02:00
teoxoy
da8ff2a0d5 [vk] fix raw_pass not being part of FramebufferKey 2025-04-25 12:39:45 +02:00
teoxoy
d4b46d6099 [vk] remove usage of imageless framebuffers
Imageless framebuffers are not needed, we know which views will be attached to the render pass already. Even if we wanted to more aggressively cache imageless framebuffers that wouldn't be possible since they still require specifiying view usage, texture usage and view formats.

Removing usage of imageless framebuffers simplifies the code substantially.
2025-04-25 12:39:45 +02:00
teoxoy
2bb8325f85 [vk] require VK_KHR_maintenance1 (in preparation for creating 2D texture views from slices of 3D textures) 2025-04-25 12:39:45 +02:00
teoxoy
d714e3d95a [d3d12,metal,gl] add support for rendering to slices of 3D textures 2025-04-25 12:39:45 +02:00
teoxoy
15477b84a9 [wgpu-hal] make begin_render_pass fallible 2025-04-25 12:39:45 +02:00
teoxoy
5ecc48d494 add RenderPassColorAttachment::depth_slice 2025-04-25 12:39:45 +02:00
teoxoy
6058dd4296 [wgpu-core] allow 2D-Array texture views with a single layer to be used as render attachments 2025-04-25 12:39:45 +02:00
Connor Fitzgerald
a439fe4bfa
Use lockfileMaintence for non-breaking changes (#7629) 2025-04-25 11:28:26 +02:00
Erich Gubler
96c1fb11de
docs(CHANGELOG): s/Bux Fixes/Bug Fixes (#7628) 2025-04-24 21:19:01 +00:00
Jim Blandy
02bf7f40cd
Add some missing CHANGELOG.md entries. (#7627) 2025-04-24 17:00:07 -04:00
Jim Blandy
5bc3c9da3c [naga] Constrain textureLoad array index args to i32 or u32.
In `naga::valid::expression`, require that
`Expression::ImageLoad::array_index` be either `i32` or `u32`, not
just an integral type of any size.
2025-04-24 13:45:12 -07:00
Jim Blandy
7c5f705580 [naga] Allow textureLoad's sample index arg to be unsigned.
Permit the `sample_index` argument of `textureLoad` overloads to be
either `i32` or `u32`.
2025-04-24 13:45:12 -07:00
Teodor Tanasoaia
195217b269
allow read-write and read-only storage textures without TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES (#7623) 2025-04-24 11:45:24 -04:00
Florian Denis
1806414771
[wgpu-types]: Expose wgpu::Limits::defaults() (#7622) 2025-04-24 09:56:14 -04:00
Connor Fitzgerald
ffbef20168
Schedule renovate (#7620) 2025-04-23 22:27:19 +00:00
renovate[bot]
1d6c1d020c
Update Rust crate which to v7 (#7619)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-23 22:00:17 +00:00
renovate[bot]
d1a1a59e50
Update Rust crate ordered-float to v5 (#7618)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-23 21:43:28 +00:00
renovate[bot]
c40738c521
Update codecov/codecov-action action to v5 (#7613)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-23 17:42:56 -04:00
renovate[bot]
3727b67253
Update Rust crate env_logger to 0.11.0 (#7609)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-23 21:38:52 +00:00
renovate[bot]
018fd31fb1
Update Rust crate metal to 0.32.0 (#7611)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-23 21:08:18 +00:00
renovate[bot]
20d5da7e07
Update Minor Updates (#7607)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-04-23 20:59:26 +00:00
renovate[bot]
7ccf1e5ac2
Configure Renovate (#7606)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-04-23 20:34:44 +00:00
Connor Fitzgerald
ec102222f9
Disable dependabot (#7603) 2025-04-23 18:47:26 +02:00
Zachary Harrold
35f131ff10
Remove default features from petgraph (#7591) 2025-04-23 03:30:36 +00:00