Skip to content

Commit

Permalink
compile: rename ResourceBinding::PushConstant -> ResourceBinding::Pus…
Browse files Browse the repository at this point in the history
…hConstantBuffer
  • Loading branch information
chyyran committed Sep 5, 2024
1 parent a62a90e commit 33ebf12
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions spirv-cross2/src/compile/hlsl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ pub enum ResourceBinding {
binding: u32,
},
/// The push constant buffer.
PushConstant,
PushConstantBuffer,
}

impl ResourceBinding {
Expand All @@ -207,15 +207,15 @@ impl ResourceBinding {
const PUSH_CONSTANT_DESCRIPTOR_SET: u32 = !0;
match self {
ResourceBinding::Qualified { set, .. } => *set,
ResourceBinding::PushConstant => PUSH_CONSTANT_DESCRIPTOR_SET,
ResourceBinding::PushConstantBuffer => PUSH_CONSTANT_DESCRIPTOR_SET,
}
}

const fn binding(&self) -> u32 {
const PUSH_CONSTANT_BINDING: u32 = 0;
match self {
ResourceBinding::Qualified { binding, .. } => *binding,
ResourceBinding::PushConstant => PUSH_CONSTANT_BINDING,
ResourceBinding::PushConstantBuffer => PUSH_CONSTANT_BINDING,
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions spirv-cross2/src/compile/msl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ pub enum ResourceBinding {
binding: u32,
},
/// The push constant buffer.
PushConstant,
PushConstantBuffer,
/// The swizzle buffer, at the given index.
SwizzleBuffer(u32),
/// The buffer binding for buffer size
Expand All @@ -647,7 +647,7 @@ impl ResourceBinding {
| ResourceBinding::SwizzleBuffer(set)
| ResourceBinding::BufferSizeBuffer(set)
| ResourceBinding::ArgumentBuffer(set) => *set,
ResourceBinding::PushConstant => PUSH_CONSTANT_DESCRIPTOR_SET,
ResourceBinding::PushConstantBuffer => PUSH_CONSTANT_DESCRIPTOR_SET,
}
}

Expand All @@ -659,7 +659,7 @@ impl ResourceBinding {

match self {
ResourceBinding::Qualified { binding, .. } => *binding,
ResourceBinding::PushConstant => PUSH_CONSTANT_BINDING,
ResourceBinding::PushConstantBuffer => PUSH_CONSTANT_BINDING,
ResourceBinding::SwizzleBuffer(_) => SWIZZLE_BUFFER_BINDING,
ResourceBinding::BufferSizeBuffer(_) => BUFFER_SIZE_BUFFER_BINDING,
ResourceBinding::ArgumentBuffer(_) => ARGUMENT_BUFFER_BINDING,
Expand Down

0 comments on commit 33ebf12

Please sign in to comment.