Skip to content

Commit

Permalink
HgiMetal: Only call didModifyRange on macOS.
Browse files Browse the repository at this point in the history
Signed-off-by: furby™ <devs@wabi.foundation>
  • Loading branch information
furby-tm committed Sep 9, 2024
1 parent b9e3ef4 commit 216237c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/HgiMetal/blitCmds.mm
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,8 @@
memcpy(dst + dstOffset, src, copyOp.byteSize);
}

#if defined(ARCH_OS_OSX)
// didModifyRange is unavailable for iOS and visionOS.
if (!sharedBuffer &&
[metalBuffer->GetBufferId()
respondsToSelector:@selector(didModifyRange:)]) {
Expand All @@ -372,6 +374,7 @@
[resource didModifyRange:range];
ARCH_PRAGMA_POP
}
#endif // defined(ARCH_OS_OSX)
}

void
Expand Down

0 comments on commit 216237c

Please sign in to comment.