BlackmagicRawSDK 2.1 CopyResource malloc versus new

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

carmen.pinto

  • Posts: 2
  • Joined: Tue Sep 21, 2021 11:59 am
  • Real Name: Carmen Pinto

BlackmagicRawSDK 2.1 CopyResource malloc versus new

PostWed Sep 22, 2021 9:50 am

Hello,

Using CopyResource from blackmagicRawResourceTypeBufferMetal -> blackmagicRawResourceTypeBufferCPU returns E_FAIL when the CPU buffer pointed to is allocated with tbb scalable_malloc versus new. blackmagicRawResourceTypeBufferCPU -> blackmagicRawResourceTypeBufferCPU results in S_OK. Is there a way to make CopyResource work with tbb scalable_malloc CPU buffers?

Using MacOS Catalina 10.15.7 .
Offline

Cameron Nichols

Blackmagic Design

  • Posts: 442
  • Joined: Mon Sep 04, 2017 4:05 am

Re: BlackmagicRawSDK 2.1 CopyResource malloc versus new

PostThu Sep 23, 2021 7:29 am

Hi Carmen,

This should work, but here are a few things to check:
  • You are using GPU/Metal pipeline (context + command queue).
  • The TBB scalable_malloc is page aligned (address and size).
  • Whether the memory pool used by TBB can be locked by Metal.
  • Ensure that there aren't already too many page memory allocations for system.
Please let me know if this helps.

Regards
Cameron
Offline

carmen.pinto

  • Posts: 2
  • Joined: Tue Sep 21, 2021 11:59 am
  • Real Name: Carmen Pinto

Re: BlackmagicRawSDK 2.1 CopyResource malloc versus new

PostThu Sep 23, 2021 9:07 am

Great, thank you. Looks like it wasn't aligned.

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 6 guests