Skip to content

Commit

Permalink
Fix encoding names on structs whose name is unknown
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Aug 1, 2023
1 parent 88b3aa2 commit c1f874b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ pub struct MTLScissorRect {

unsafe impl Encode for MTLScissorRect {
const ENCODING: Encoding = Encoding::Struct(
"MTLScissorRect",
"?",
&[
NSUInteger::ENCODING,
NSUInteger::ENCODING,
Expand All @@ -155,7 +155,7 @@ pub struct MTLViewport {

unsafe impl Encode for MTLViewport {
const ENCODING: Encoding = Encoding::Struct(
"MTLViewport",
"?",
&[
f64::ENCODING,
f64::ENCODING,
Expand Down Expand Up @@ -198,7 +198,7 @@ pub struct VertexAmplificationViewMapping {

unsafe impl Encode for VertexAmplificationViewMapping {
const ENCODING: Encoding = Encoding::Struct(
"VertexAmplificationViewMapping",
"?",
&[u32::ENCODING, u32::ENCODING],
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/renderpass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub struct MTLClearColor {

unsafe impl Encode for MTLClearColor {
const ENCODING: Encoding = Encoding::Struct(
"MTLClearColor",
"?",
&[f64::ENCODING, f64::ENCODING, f64::ENCODING, f64::ENCODING],
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/resource.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ pub struct MTLSizeAndAlign {

unsafe impl Encode for MTLSizeAndAlign {
const ENCODING: Encoding = Encoding::Struct(
"MTLSizeAndAlign",
"?",
&[NSUInteger::ENCODING, NSUInteger::ENCODING],
);
}
Expand Down
4 changes: 2 additions & 2 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ pub struct MTLRegion {

unsafe impl Encode for MTLRegion {
const ENCODING: Encoding =
Encoding::Struct("MTLRegion", &[MTLOrigin::ENCODING, MTLSize::ENCODING]);
Encoding::Struct("?", &[MTLOrigin::ENCODING, MTLSize::ENCODING]);
}

impl MTLRegion {
Expand Down Expand Up @@ -112,7 +112,7 @@ pub struct MTLSamplePosition {

unsafe impl Encode for MTLSamplePosition {
const ENCODING: Encoding =
Encoding::Struct("MTLSamplePosition", &[f32::ENCODING, f32::ENCODING]);
Encoding::Struct("?", &[f32::ENCODING, f32::ENCODING]);
}

#[repr(C)]
Expand Down

0 comments on commit c1f874b

Please sign in to comment.