Skip to content

Conversation

kpreid
Copy link
Collaborator

@kpreid kpreid commented Aug 24, 2025

Connections
Fixes #7552.

Description
These new data structure types provide a narrow, public API for the tables naga::proc::Namer requires, fixing #7552.

Additionally, they use naga::FastHashSet instead of hashbrown::HashSet, which may be faster (benchmarks not conclusive but not worse).

Testing
cargo xtask test
cargo bench --bench wgpu-benchmark -- back/

Squash or Rebase?
Rebase

Checklist

  • Run cargo fmt.
  • Run taplo format.
  • Run cargo clippy --tests. If applicable, add:
    • --target wasm32-unknown-unknown
  • Run cargo xtask test to run tests.
  • If this contains user-facing changes, add a CHANGELOG.md entry.

@kpreid kpreid force-pushed the naga-kwset branch 2 times, most recently from 9751aaf to 2950bbd Compare August 24, 2025 02:56
@kpreid kpreid added the area: naga processing Passes over IR in the middle label Aug 24, 2025
@cwfitzgerald cwfitzgerald self-assigned this Aug 27, 2025
Copy link
Member

@cwfitzgerald cwfitzgerald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small quibbles, then good

These new data structure types provide a narrow, public API for the
tables `naga::proc::Namer` requires, fixing <gfx-rs#7552>.
Additionally, they use `naga::FastHashSet` instead of `hashbrown::HashSet`,
which may be faster (benchmarks not conclusive but not worse).

I also removed `RacyLock::get()` because types which implement `Deref`
generically should not also have methods, to avoid name conflicts.
@cwfitzgerald cwfitzgerald merged commit 1c8d769 into gfx-rs:trunk Aug 28, 2025
40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: naga processing Passes over IR in the middle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

naga::proc::Namer uses a different HashSet
2 participants