Problems loading ACES_DCTL files in Resolve 15 & MacOS

resolve
dctl
Tags: #<Tag:0x00007f964d170918> #<Tag:0x00007f964d170760>

(Scott Dyer) #1

Has anyone had success using @Paul_Dore 's DCTL on a Mac?

I keep getting import errors even though I am following the “install” directions from Blackmagic and placing the ACES_DCTL directory in the Resolve LUT/DCTL folder. Self-contained DCTLs still work fine but as soon as there is an include statement to import .h files, Resolve throws an error “Error Processing DaVinci CTL: DCTL/ACES_DCTL/ACES_Sample.dctl”.

The seemingly relevant line in the log file shows this error:
Metal Error Message: Compilation failed: program_source:1193:10: fatal error: 'Library/Application Support/Blackmagic Design/DaVinci Resolve/LUT/DCTL/ACES_DCTL/ACES_LIB/ACES_IDT.h' file not found
#include "/Library/Application Support/Blackmagic Design/DaVinci Resolve/LUT/DCTL/ACES_DCTL/ACES_LIB/ACES_IDT.h"

Has anyone gotten this to work on a Mac?
Has anybody else encountered similar issues?

Having similar problems on my MBP as well…

System Specs:
Mac OS 10.13.4
Mac Pro (Late 2013)
3 GHz 8-Core Intel Xeon E5
64 GB 1866 MHz DDR3
AMD FirePro D700 6144MB
DaVinci Resolve Studio 15 build 15.0.0B.046


(Scott Dyer) #2

This seems to happen even with the simplest scripts.

I copied the example files from Developer/DCTL called ‘ConvertToGrayscale.dctl’ and ‘ColorConversion.h’ into the LUT/DCTL folder. Files are at the same level since path to includes is relative.

I still get an error that it cannot find the include file.

Can anybody else try this on a Mac and see if they run into similar issues?


(Scott Dyer) #3

Update 2:

If I change the preferences to use OpenCL, the import for the basic ConvertToGrayscale.dctl seems to work.

However, using OpenCL with the ACES_DCTL, I still get issues. Below is an excerpt from the log file…

[0x700006911000] | GPUManager | ERROR | 2018-05-31 12:28:06,167 | OpenCL error detected: [CL_BUILD_ERROR] : OpenCL Build Error : Compiler build log: In file included from <program source>:1195: In file included from /Library/Application Support/Blackmagic Design/DaVinci Resolve/LUT/DCTL/ACES_DCTL/ACES_LIB/ACES_IDT.h:6: /Library/Application Support/Blackmagic Design/DaVinci Resolve/LUT/DCTL/ACES_DCTL/ACES_LIB/ACES_Functions.h:34:23: error: conflicting types for 'size' __DEVICE__ inline int size(float2 array[]) ^ /Library/Application Support/Blackmagic Design/DaVinci Resolve/LUT/DCTL/ACES_DCTL/ACES_LIB/ACES_Functions.h:28:23: note: previous definition is here __DEVICE__ inline int size(float array[]) ^ /Library/Application Support/Blackmagic Design/DaVinci Resolve/LUT/DCTL/ACES_DCTL/ACES_LIB/ACES_Functions.h:40:23: error: conflicting types for 'size' __DEVICE__ inline int size(float3 array[]) ^ /Library/Application Support/Blackmagic Design/DaVinci Resolve/LUT/DCTL/ACES_DCTL/ACES_LIB/ACES_Functions.h:28:23: note: previous definition is here __DEVICE__ inline int size(float array[]) ^ /Library/Application Support/Blackmagic Design/DaVinci Resolve/LUT/DCTL/ACES_DCTL/ACES_LIB/ACES_Functions.h:67:3: error: typedef redefinition with different types ('struct float5' vs 'struct __Reserved_Name__Do_not_use_float5') } float5; ^ /System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/3.2/include/cl_kernel.h:206:57: note: previous definition is here typedef struct __Reserved_Name__Do_not_use_float5 float5; ^ In file included from <program source>:1195: In file included from /Library/Application Support/Blackmagic Design/DaVinci Resolve/LUT/DCTL/ACES_DCTL/ACES_LIB/ACES_IDT.h:6: /Library/Application Support/Blackmagic Design/DaVinci Resolve/LUT/DCTL/ACES_DCTL/ACES_LIB/ACES_Functions.h:109:24: error: conflicting types for 'transpose' __DEVICE__ inline mat3 transpose(mat3 A) ^ /Library/Application Support/Blackma [0x700006911000] | GPUManager | ERROR | 2018-05-31 12:28:06,395 | OpenCL error detected: [CL_DEVICE_NOT_AVAILABLE] : OpenCL Error : Error: Build Program driver returned (-2) [0x700006911000] | GPUManager | ERROR | 2018-05-31 12:28:06,395 | OpenCL error detected: OpenCL Warning : clBuildProgram failed: could not build program for 0x1021c00 (AMD Radeon R9 M370X Compute Engine) (err:-2) [0x700006911000] | GPUManager | ERROR | 2018-05-31 12:28:06,395 | OpenCL error detected: [CL_BUILD_ERROR] : OpenCL Build Error : Compiler build log: In file included from <program source>:1195: In file included from /Library/Application Support/Blackmagic Design/DaVinci Resolve/LUT/DCTL/ACES_DCTL/ACES_LIB/ACES_IDT.h:6: /Library/Application Support/Blackmagic Design/DaVinci Resolve/LUT/DCTL/ACES_DCTL/ACES_LIB/ACES_Functions.h:34:23: error: conflicting types for 'size' __DEVICE__ inline int size(float2 array[]) ^ /Library/Application Support/Blackmagic Design/DaVinci Resolve/LUT/DCTL/ACES_DCTL/ACES_LIB/ACES_Functions.h:28:23: note: previous definition is here __DEVICE__ inline int size(float array[]) ^ /Library/Application Support/Blackmagic Design/DaVinci Resolve/LUT/DCTL/ACES_DCTL/ACES_LIB/ACES_Functions.h:40:23: error: conflicting types for 'size' __DEVICE__ inline int size(float3 array[]) ^ /Library/Application Support/Blackmagic Design/DaVinci Resolve/LUT/DCTL/ACES_DCTL/ACES_LIB/ACES_Functions.h:28:23: note: previous definition is here __DEVICE__ inline int size(float array[]) ^ /Library/Application Support/Blackmagic Design/DaVinci Resolve/LUT/DCTL/ACES_DCTL/ACES_LIB/ACES_Functions.h:67:3: error: typedef redefinition with different types ('struct float5' vs 'struct __Reserved_Name__Do_not_use_float5') } float5; ^ /System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/3.2/include/cl_kernel.h:206:57: note: previous definition is here typedef struct __Reserved_Name__Do_not_use_float5 float5;


(Charles Boileau) #4

Are you using Paul Dore’s scripts? I was able to make them work perfectly…


(Scott Dyer) #5

Well, I am trying to get them working.

Are you on Mac OS?
CUDA, OpenCL, or Metal?


(Charles Boileau) #6

Yes OSX 12.6 with Cuda. I see that you have the .h in your paths. Normally, you don’t point to that file specifically. But I’m sure you know this better than me.

Here are some that I made for testing: https://drive.google.com/drive/folders/1Daq1f5thycW2cLOb-zNck0U7Truv9nW4?usp=sharing


(Scott Dyer) #7

Ah, Cuda. I think the issues I’m having are specifically related to Metal and/or OpenCL. Unfortunately I can’t use Cuda with my graphics card.

Has anyone had success with getting a non-Cuda implementation working?


(Rémi Achard) #8

I just tested the DCTLs on Resolve 15 on my MacPro with an ATI cards (not Metal ready) and confirm the OpenCL backend is not working.

From what I saw, it’s mainly due to the scripts using C++ features like function overloading, default parameters, … that are supported by Cuda but not supported on the macOS OpenCL implementation (for me it’s 1.2, I think OpenCL support C++ langage features since 2.1 only).


(Scott Dyer) #9

Thank you for testing and confirming my suspicions.

It looks like we’ll need to hope Apple adds support for OpenCL 2.1+ (unlikely, considering their focus on Metal) or figure out how we need to modify the DCTL so it compiles in Metal.

Or, less convenient but more proactive, just put Resolve on a system with an NVIDIA card so I can use CUDA, which seems to work well.


(Thomas Mansencal) #10

@sdyer: OpenCL will never happen: https://developer.apple.com/macos/whats-new/#deprecationofopenglandopencl


(Scott Dyer) #11

Convenient timing for them to officially announce this. I think we all figured it was coming given their emphasis on Metal. Time to read the Metal documentation and try to figure out why it won’t find the include files in the DCTL…


(Julian Martinz) #12

Did you make any progress on this issue? Just spent two hours trying to make the dctls work on a new MacBook Pro. Moving include files between folders while investigating error logs. Just started to doubt my mind when I ultimately asked google to find this thread.