Page 1 of 1

BlackmagicRawSDK 2.1 CopyResource malloc versus new

PostPosted: Wed Sep 22, 2021 9:50 am
by carmen.pinto
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 .

Re: BlackmagicRawSDK 2.1 CopyResource malloc versus new

PostPosted: Thu Sep 23, 2021 7:29 am
by Cameron Nichols
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

Re: BlackmagicRawSDK 2.1 CopyResource malloc versus new

PostPosted: Thu Sep 23, 2021 9:07 am
by carmen.pinto
Great, thank you. Looks like it wasn't aligned.