Skip to content

Commit

Permalink
fix MSL issue
Browse files Browse the repository at this point in the history
  • Loading branch information
teoxoy committed Mar 23, 2022
1 parent c19e9de commit d592d4c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/back/msl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ impl Options {

Ok(ResolvedBinding::BuiltIn {
built_in,
invariant,
invariant: invariant && matches!(mode, LocationMode::FragmentOutput),
})
}
crate::Binding::Location {
Expand Down
6 changes: 3 additions & 3 deletions tests/out/msl/interface.msl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ struct vertex_Input {
uint color [[attribute(10)]];
};
struct vertex_Output {
metal::float4 position [[position, invariant]];
metal::float4 position [[position]];
float varying [[user(loc1), center_perspective]];
float _point_size [[point_size]];
};
Expand All @@ -53,7 +53,7 @@ struct fragment_Output {
};
fragment fragment_Output fragment_(
fragment_Input varyings_1 [[stage_in]]
, metal::float4 position [[position, invariant]]
, metal::float4 position [[position]]
, bool front_facing [[front_facing]]
, uint sample_index [[sample_id]]
, uint sample_mask [[sample_mask]]
Expand Down Expand Up @@ -84,7 +84,7 @@ kernel void compute_(
struct vertex_two_structsInput {
};
struct vertex_two_structsOutput {
metal::float4 member_3 [[position, invariant]];
metal::float4 member_3 [[position]];
float _point_size [[point_size]];
};
vertex vertex_two_structsOutput vertex_two_structs(
Expand Down

0 comments on commit d592d4c

Please sign in to comment.