4 Commits

Author SHA1 Message Date
Vecvec
efca3f5066
[spirv] Make ray queries safer (#8390) 2025-11-13 00:33:32 -05:00
Kevin Reid
37bd31ce5d Prune unused dependencies.
* Removed unnecessary dependency in `wgpu` on `hashbrown`.
* Removed unused dependencies in `naga-test`.
* Moved some dependencies in `wgpu-test` to `[dev-dependencies]`
  (see comment for why this is worth doing).

Candidates were discovered by `cargo clippy -- -Wunused-crate-dependencies`.
This command reports whether each dependency is unused in each *crate*,
so it has false positives when a dependency is used by only some crates
in a package, but it is still useful as a short-list.
2025-10-15 21:33:20 -04:00
Jamie Nicol
ba0b6b9b0e [vulkan, naga spv-out] Remap resource bindings
In order to support external textures, we must be able to map a single
external texture resource binding to multiple Vulkan descriptors. This
means we must be able to override the `Binding` and `DescriptorSet`
values for global variables when generating SPIR-V, rather than simply
passing through the group and binding values from Naga IR.

This patch extends the existing SPIR-V Naga backend's `BindingMap` to
contain a descriptor set and binding value in addition to the existing
array size. When creating BindGroupLayouts/BindGroups we use a
sequentially incrementing value for each entry's binding value,
continuing to just use the bind group index as the descriptor set
value.

The Naga backend looks up each resource in the map when emitting its
`Binding` and `DescriptorSet` decorations. If the entry cannot be
found in the map, it will either error or emit fake bindings based on
its configuration.
2025-09-24 17:55:35 +02:00
Magnus
54ce9f7f98
Update shader bencher to share some logic with snapshots (#8108)
Co-authored-by: Connor Fitzgerald <connorwadefitzgerald@gmail.com>
2025-09-11 00:55:42 +00:00