Group OpenClRender
- group OpenClRender
- Version
OpenCL rendering was added in version 1.5.
Defines
-
kOfxImageEffectPropOpenCLRenderSupported
Indicates whether a host or plug-in can support OpenCL Buffers render.
Type - string X 1
Property Set - plug-in descriptor (read/write), host descriptor (read only)
Default - “false” for a plug-in
Valid Values - This must be one of
”false” - the host or plug-in does not support OpenCL Buffers render
”true” - the host or plug-in can support OpenCL Buffers render
-
kOfxImageEffectPropOpenCLSupported
Indicates whether a host or plug-in can support OpenCL Images render.
Type - string X 1
Property Set - plug-in descriptor (read/write), host descriptor (read only)
Default - “false” for a plug-in
Valid Values - This must be one of
”false” - in which case the host or plug-in does not support OpenCL Images render
”true” - which means a host or plug-in can support OpenCL Images render
-
kOfxImageEffectPropOpenCLEnabled
Indicates that a plug-in SHOULD use OpenCL render in the current action.
If a plug-in and host have both set kOfxImageEffectPropOpenCLRenderSupported=”true” or have both set kOfxImageEffectPropOpenCLSupported=”true” then the host MAY set this property to indicate that it is passing images as OpenCL Buffers or Images.
When rendering using OpenCL Buffers, the cl_mem of the buffers are retrieved using kOfxImagePropData. When rendering using OpenCL Images, the cl_mem of the images are retrieved using kOfxImageEffectPropOpenCLImage. If both kOfxImageEffectPropOpenCLSupported (Buffers) and kOfxImageEffectPropOpenCLRenderSupported (Images) are enabled by the plug-in, it should use kOfxImageEffectPropOpenCLImage to determine which is being used by the host.
Type - int X 1
Property Set - inArgs property set of the following actions…
Valid Values
0 indicates that a plug-in SHOULD use OpenCL render in the render action
1 indicates that a plug-in SHOULD NOT use OpenCL render in the render action
-
kOfxImageEffectPropOpenCLCommandQueue
Indicates the OpenCL command queue that should be used for rendering.
Type - pointer X 1
Property Set - inArgs property set of the following actions…
This property contains a pointer to the command queue to be used for OpenCL rendering (cl_command_queue). In order to use it, reinterpret_cast<cl_command_queue>(pointer) is needed.
The plug-in SHOULD ensure that its render action enqueues any asynchronous OpenCL operations onto the supplied queue.
The plug-in SHOULD NOT wait for final asynchronous operations to complete before returning from the render action.
-
kOfxImageEffectPropOpenCLImage
Indicates the image handle of an image supplied as an OpenCL Image by the host.
Type - pointer X 1
Property Set - image handle returned by clipGetImage
This value should be cast to a cl_mem and used as the image handle when performing OpenCL Images operations. The property should be used (not kOfxImagePropData) when rendering with OpenCL Images (kOfxImageEffectPropOpenCLSupported), and should be used to determine whether Images or Buffers should be used if a plug-in supports both kOfxImageEffectPropOpenCLSupported and kOfxImageEffectPropOpenCLRenderSupported. Note: the kOfxImagePropRowBytes property is not required to be set by the host, since OpenCL Images do not have the concept of row bytes.
-
kOfxOpenCLProgramSuite
Typedefs
-
typedef struct OfxOpenCLProgramSuiteV1 OfxOpenCLProgramSuiteV1
OFX suite that allows a plug-in to get OpenCL programs compiled.
This is an optional suite the host can provide for building OpenCL programs for the plug-in, as an alternative to calling clCreateProgramWithSource / clBuildProgram. There are two advantages to doing this: The host can add flags (such as -cl-denorms-are-zero) to the build call, and may also cache program binaries for performance (however, if the source of the program or the OpenCL environment changes, the host must recompile so some mechanism such as hashing must be used).
-
struct OfxOpenCLProgramSuiteV1
- #include <ofxGPURender.h>
OFX suite that allows a plug-in to get OpenCL programs compiled.
This is an optional suite the host can provide for building OpenCL programs for the plug-in, as an alternative to calling clCreateProgramWithSource / clBuildProgram. There are two advantages to doing this: The host can add flags (such as -cl-denorms-are-zero) to the build call, and may also cache program binaries for performance (however, if the source of the program or the OpenCL environment changes, the host must recompile so some mechanism such as hashing must be used).
Public Members
-
OfxStatus (*compileProgram)(const char *pszProgramSource, int fOptional, void *pResult)
Compiles the OpenCL program.
-
OfxStatus (*compileProgram)(const char *pszProgramSource, int fOptional, void *pResult)