Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gpu gain example #132

Merged
merged 23 commits into from
Mar 9, 2024
Merged

Gpu gain example #132

merged 23 commits into from
Mar 9, 2024

Conversation

garyo
Copy link
Contributor

@garyo garyo commented Nov 27, 2023

No description provided.

Per changes from Blackmagic Design

Signed-off-by: Gary Oberbrunner <[email protected]>
Also update support lib to handle CUDA/OpenCL/Metal render properties
and processing functions.

Signed-off-by: Gary Oberbrunner <[email protected]>
MacOS isn't hard; just add Metal frameworks to the link.
Linux and Windows will still need work, to link with CUDA.

Also fixed the Support include dir in `Examples/CMakeLists.txt`.

Signed-off-by: Gary Oberbrunner <[email protected]>
@garyo garyo added this to the Release 1.5 milestone Nov 27, 2023
@garyo garyo requested a review from john-paulsmith November 27, 2023 21:38
@garyo garyo self-assigned this Nov 27, 2023
@garyo garyo force-pushed the gpu-gain-example branch 5 times, most recently from 7c0601b to 7a6ed2a Compare December 29, 2023 15:06
Github CI runners have only ~14GB free space. CUDA takes a lot.
Using the "network" method with only a subset of packages may help.

Signed-off-by: Gary Oberbrunner <[email protected]>
Signed-off-by: Gary Oberbrunner <[email protected]>
Signed-off-by: Gary Oberbrunner <[email protected]>
Also add install step to build-cmake.sh. You can override the install
dir via `-DPLUGIN_INSTALLDIR=/any/absolute/path`.

Signed-off-by: Gary Oberbrunner <[email protected]>
@garyo garyo marked this pull request as ready for review December 29, 2023 17:33
@garyo garyo requested a review from SonyDennisAdams January 2, 2024 16:13
* Modify ofxGPURender.h to support OpenCL Images
* Add kOfxImageEffectActionBeginSequenceRender and kOfxImageEffectActionEndSequenceRender as required actions for some CUDA/Metal/OpenCL properties where they were not listed
* Also make documentation edits in the same header
* Modify GPUGain example to also support OpenCL Images and show how to disambiguate in the case where a plug-in supports both OpenCL Buffers and OpenCL Images

Signed-off-by: Dennis Adams <[email protected]>
@SonyDennisAdams
Copy link
Contributor

The build folder structure for GPUGain does not match the other examples:
build\Examples\GPUGain\Release\example-GPUGain.ofx. <= different than the rest
build\Examples\Release\example-Basic.ofx
build\Examples\Release\example-Custom.ofx
build\Examples\Release\example-DepthConverter.ofx
build\Examples\Release\example-Invert.ofx
build\Examples\Release\example-OpenGL.ofx
build\Examples\Release\example-Rectangle.ofx
build\Examples\Release\example-Test.ofx

@garyo garyo requested review from fxtech and revisionfx February 11, 2024 13:05
@garyo
Copy link
Contributor Author

garyo commented Feb 11, 2024

Also see #140 from @SonyDennisAdams

…l-images

Add OpenCL Image support to the updated GPU rendering extension:
@garyo
Copy link
Contributor Author

garyo commented Feb 25, 2024

GPUGain location should be fixed by c298169 (once it builds in CI)

Also clean up formatting of CMakeLists.txt and cmake/OpenFX.cmake
using `cmake-format`.

Signed-off-by: Gary Oberbrunner <[email protected]>
Signed-off-by: Gary Oberbrunner <[email protected]>
…ptions

Now all examples go into "OpenFX Examples" or "OpenFX
Examples (Support)" as they should.

Natron wouldn't load GPU Gain due to an exception on load due to host
properties not found, so I added code to trap and log those.

Signed-off-by: Gary Oberbrunner <[email protected]>
@SonyDennisAdams
Copy link
Contributor

@garyo
OpenCL Buffer and Image support confirmed on Windows and Mac. The build option OFX_SUPPORTS_OPENCLRENDER is OFF by default, but needs to be ON for this example to work. Also, on Mac in Support/Plugins/CMakeLists.txt I had to add "-framework OpenCL" otherwise I got link errors against the OpenCL host API (e.g., clBuildProgram).

SonyDennisAdams
SonyDennisAdams previously approved these changes Mar 7, 2024
Copy link
Contributor

@SonyDennisAdams SonyDennisAdams left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I confirmed Windows and Mac OpenCL Buffer and Image support work

Thanks for the review comments from @SonyDennisAdams.

Signed-off-by: Gary Oberbrunner <[email protected]>
@garyo garyo merged commit eb626d9 into main Mar 9, 2024
9 checks passed
@revisionfx
Copy link
Contributor

Another company just asked me why this is in Support but not in Examples folder?

Pierre

@garyo
Copy link
Contributor Author

garyo commented Apr 8, 2024

This example was created by Blackmagic, who generously donated it to us. It uses the C++ support lib. An example that doesn't use the support lib would be very welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

3 participants