Skip to content

Commit 991ee61

Browse files
authored
Impl Hash on AdapterInfo and DeviceType (#6869)
1 parent 4124fbf commit 991ee61

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ By @wumpf in [#6849](https://github.com/gfx-rs/wgpu/pull/6849).
161161
- Return submission index in `map_async` and `on_submitted_work_done` to track down completion of async callbacks. By @eliemichel in [#6360](https://github.com/gfx-rs/wgpu/pull/6360).
162162
- Move raytracing alignments into HAL instead of in core. By @Vecvec in [#6563](https://github.com/gfx-rs/wgpu/pull/6563).
163163
- Allow for statically linking DXC rather than including separate `.dll` files. By @DouglasDwyer in [#6574](https://github.com/gfx-rs/wgpu/pull/6574).
164+
- `DeviceType` and `AdapterInfo` now impl `Hash` by @cwfitzgerald in [#6868](https://github.com/gfx-rs/wgpu/pull/6868)
164165

165166
#### Changes
166167

wgpu-types/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1756,7 +1756,7 @@ pub enum ShaderModel {
17561756

17571757
/// Supported physical device types.
17581758
#[repr(u8)]
1759-
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
1759+
#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)]
17601760
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
17611761
pub enum DeviceType {
17621762
/// Other or Unknown.
@@ -1774,7 +1774,7 @@ pub enum DeviceType {
17741774
//TODO: convert `vendor` and `device` to `u32`
17751775

17761776
/// Information about an adapter.
1777-
#[derive(Clone, Debug, Eq, PartialEq)]
1777+
#[derive(Clone, Debug, Eq, PartialEq, Hash)]
17781778
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
17791779
pub struct AdapterInfo {
17801780
/// Adapter name

0 commit comments

Comments
 (0)