Skip to content

Commit

Permalink
Revert "[naga] Remove unneeded PartialEq derivations."
Browse files Browse the repository at this point in the history
This reverts commit 975ccbd.
  • Loading branch information
Elabajaba committed Jul 9, 2024
1 parent 9f34acd commit 3e9742c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion naga/src/front/glsl/variables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ impl Frontend {
ty,
init,
};
let handle = ctx.module.constants.append(constant, meta);
let handle = ctx.module.constants.fetch_or_append(constant, meta);

let lookup = GlobalLookup {
kind: GlobalLookupKind::Constant(handle, ty),
Expand Down
10 changes: 4 additions & 6 deletions naga/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ pub enum Literal {
}

/// Pipeline-overridable constant.
#[derive(Debug, Clone)]
#[derive(Debug, PartialEq, Clone)]
#[cfg_attr(feature = "serialize", derive(Serialize))]
#[cfg_attr(feature = "deserialize", derive(Deserialize))]
#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
Expand All @@ -891,8 +891,7 @@ pub struct Override {
}

/// Constant value.
#[derive(Debug, Clone)]
#[cfg_attr(test, derive(PartialEq))]
#[derive(Debug, PartialEq, Clone)]
#[cfg_attr(feature = "serialize", derive(Serialize))]
#[cfg_attr(feature = "deserialize", derive(Deserialize))]
#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
Expand Down Expand Up @@ -954,7 +953,7 @@ pub struct ResourceBinding {
}

/// Variable defined at module level.
#[derive(Clone, Debug)]
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "serialize", derive(Serialize))]
#[cfg_attr(feature = "deserialize", derive(Deserialize))]
#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
Expand Down Expand Up @@ -1354,8 +1353,7 @@ bitflags::bitflags! {
///
/// [`Constant`]: Expression::Constant
/// [`Override`]: Expression::Override
#[derive(Clone, Debug)]
#[cfg_attr(test, derive(PartialEq))]
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(feature = "serialize", derive(Serialize))]
#[cfg_attr(feature = "deserialize", derive(Deserialize))]
#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
Expand Down

0 comments on commit 3e9742c

Please sign in to comment.