Skip to content

Commit

Permalink
compile: more derives for output models
Browse files Browse the repository at this point in the history
  • Loading branch information
chyyran committed Sep 6, 2024
1 parent 1e3224b commit 2701d94
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
3 changes: 1 addition & 2 deletions spirv-cross2/src/compile/glsl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,8 @@ pub struct CompilerOptions {
impl Sealed for GlslVersion {}

/// GLSL language version.
#[derive(Debug)]
#[non_exhaustive]
#[derive(Default)]
#[derive(Default, Debug, Copy, Clone, Eq, PartialEq)]
pub enum GlslVersion {
/// #version 110
Glsl110,
Expand Down
2 changes: 1 addition & 1 deletion spirv-cross2/src/compile/hlsl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ pub struct CompilerOptions {
}

/// HLSL Shader model.
#[derive(Debug, Copy, Clone)]
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
#[non_exhaustive]
#[derive(Default)]
pub enum HlslShaderModel {
Expand Down
11 changes: 7 additions & 4 deletions spirv-cross2/src/compile/msl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -465,11 +465,14 @@ pub struct CompilerOptions {
/// The version of Metal Shading Language to compile to.
///
/// Defaults to MSL 1.2.
#[derive(Copy, Clone)]
#[derive(Copy, Clone, Eq, PartialEq)]
pub struct MslVersion {
major: u32,
minor: u32,
patch: u32,
/// The major version of MSL.
pub major: u32,
/// The minor version of MSL.
pub minor: u32,
/// The patch version of MSL.
pub patch: u32,
}

impl MslVersion {
Expand Down

0 comments on commit 2701d94

Please sign in to comment.