Skip to content

Commit

Permalink
[Metal] Fix condition for compute buffer copy path.
Browse files Browse the repository at this point in the history
  • Loading branch information
mellinoe committed Mar 13, 2018
1 parent 903ea1c commit 10dcb69
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Veldrid/MTL/MTLCommandList.cs
Expand Up @@ -318,7 +318,7 @@ public override void UpdateBuffer(DeviceBuffer buffer, uint bufferOffsetInBytes,
MTLBuffer mtlSrc = Util.AssertSubtype<DeviceBuffer, MTLBuffer>(source);
MTLBuffer mtlDst = Util.AssertSubtype<DeviceBuffer, MTLBuffer>(destination);

if (sourceOffset % 4 != 0 || sizeInBytes % 4 != 0)
if (sourceOffset % 4 != 0 || destinationOffset % 4 != 0 || sizeInBytes % 4 != 0)
{
// Unaligned copy -- use special compute shader.
EnsureComputeEncoder();
Expand Down

0 comments on commit 10dcb69

Please sign in to comment.