Skip to content

Commit

Permalink
fix msl?
Browse files Browse the repository at this point in the history
  • Loading branch information
atlv24 committed Sep 28, 2024
1 parent e323b14 commit eefc34b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion naga/src/back/msl/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1207,7 +1207,7 @@ impl<W: Write> Writer<W> {
self.put_cast_to_uint_scalar_or_vector(address.coordinate, &context.expression)?;
write!(self.out, ", ")?;
self.put_expression(value, &context.expression, true)?;
writeln!(self.out, ", {NAMESPACE}::memory_order_relaxed);")?;
writeln!(self.out, ");")?;

Ok(())
}
Expand Down
4 changes: 2 additions & 2 deletions naga/tests/out/msl/atomicTexture-int64.msl
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ kernel void cs_main(
metal::uint3 id [[thread_position_in_threadgroup]]
, metal::texture2d<ulong, metal::access::write> image [[user(fake0)]]
) {
image.atomic_max(metal::uint2(metal::int2(0, 0)), 1uL, metal::memory_order_relaxed);
image.atomic_max(metal::uint2(metal::int2(0, 0)), 1uL);
metal::threadgroup_barrier(metal::mem_flags::mem_threadgroup);
image.atomic_min(metal::uint2(metal::int2(0, 0)), 1uL, metal::memory_order_relaxed);
image.atomic_min(metal::uint2(metal::int2(0, 0)), 1uL);
return;
}

0 comments on commit eefc34b

Please sign in to comment.