Skip to content

Commit

Permalink
Remove unused macro arm
Browse files Browse the repository at this point in the history
  • Loading branch information
est31 committed May 14, 2022
1 parent b9bffaf commit f4117f2
Showing 1 changed file with 0 additions and 53 deletions.
53 changes: 0 additions & 53 deletions src/uniforms/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,59 +396,6 @@ macro_rules! impl_uniform_block_basic {
}
}
);

([$base_ty:expr; $num:expr], $simd_ty:expr) => (
impl UniformBlock for [$base_ty:expr; $num:expr] {
fn matches(layout: &program::BlockLayout, base_offset: usize)
-> Result<(), LayoutMismatchError>
{
if let &BlockLayout::BasicType { ty, offset_in_buffer } = layout {
if ty != $simd_ty {
return Err(LayoutMismatchError::TypeMismatch {
expected: ty,
obtained: $simd_ty,
});
}

if offset_in_buffer != base_offset {
return Err(LayoutMismatchError::OffsetMismatch {
expected: offset_in_buffer,
obtained: base_offset,
});
}

Ok(())

} else if let &BlockLayout::Array { ref content, length } = layout {
if length != $num || <$base_ty as UniformBlock>::matches(content).is_err() {
return Err(LayoutMismatchError::LayoutMismatch {
expected: layout.clone(),
obtained: BlockLayout::Array {
content: Box::new(<$base_ty as UniformBlock>::build_layout(base_offset)),
length: $num,
},
});
}

Ok(())

} else {
Err(LayoutMismatchError::LayoutMismatch {
expected: layout.clone(),
obtained: self.build_layout(base_offset),
})
}
}

#[inline]
fn build_layout(base_offset: usize) -> program::BlockLayout {
BlockLayout::BasicType {
ty: $simd_ty,
offset_in_buffer: base_offset,
}
}
}
)
}

impl AsUniformValue for i8 {
Expand Down

0 comments on commit f4117f2

Please sign in to comment.