Commit Graph

24 Commits

Author SHA1 Message Date
Michael Fabian 'Xaymar' Dirks fa8d66b951 code: Disable useless alignment styling and update standard 2023-05-14 03:25:07 +02:00
Michael Fabian 'Xaymar' Dirks 5a3954ae0e project: Fix License, License headers and Copyright information
Fixes several files incorrectly stated a different license from the actual project, as well as the copyright headers included in all files. This change has no effect on the licensing terms, it should clear up a bit of confusion by contributors. Plus the files get a bit smaller, and we have less duplicated information across the entire project.

Overall the project is GPLv2 if not built with Qt, and GPLv3 if it is built with Qt. There are no parts licensed under a different license, all have been adapted from other compatible licenses into GPLv2 or GPLv3.
2023-04-05 18:59:08 +02:00
Michael Fabian 'Xaymar' Dirks 08544b4116 cmake, code: Abuse pre-processor to disable/enable warnings 2023-04-05 18:58:39 +02:00
Michael Fabian 'Xaymar' Dirks 8e52bbf88b code: Ignore warnings from external code
May need to find a better solution such as disabling all warnings on third party code.
2023-04-05 18:58:38 +02:00
Michael Fabian 'Xaymar' Dirks 772d21a8b6 nvidia/cuda: Add cuMemsetD# functions 2023-04-05 18:51:15 +02:00
Michael Fabian 'Xaymar' Dirks 1a5dad8d97 nvidia/cuda: Add functions to get device name, UUId and LUId 2023-04-05 18:51:07 +02:00
Michael Fabian 'Xaymar' Dirks cd8abac142 nvidia/cuda: Adjust to match coding guidelines 2023-04-05 18:51:05 +02:00
Michael Fabian 'Xaymar' Dirks dcd4f7f9f0 nvidia/cuda: Apply coding guidelines 2023-04-05 18:50:59 +02:00
Michael Fabian 'Xaymar' Dirks d62da72ce5 util: Apply coding guidelines 2023-04-05 18:50:57 +02:00
Michael Fabian 'Xaymar' Dirks 47ef5dd995 nvidia/cuda: Add function to query version directly 2023-04-05 18:50:52 +02:00
Michael Fabian 'Xaymar' Dirks f316e0aa70 nvidia/cuda: Update to match CUDA 11.1 and later
Adds several new functions that may be required for operation
2023-04-05 18:50:52 +02:00
Michael Fabian 'Xaymar' Dirks 5adebc5f03 project: Apply formatting 2023-04-05 18:50:51 +02:00
Michael Fabian 'Xaymar' Dirks 9332d9377c nvidia/cuda: Add custom exception for CUDA 2023-04-05 18:50:50 +02:00
Michael Fabian 'Xaymar' Dirks 98f711523e nvidia/cuda: Use util::library and remove CUDA library argument
The CUDA library is always available as a singleton, so it does not make sense for it to be passed in. Instead we can simply grab it from the singleton and use it as it is, which makes the code easier to maintain and automates certain code.
2023-04-05 18:50:50 +02:00
Michael Fabian 'Xaymar' Dirks 63a5873413 project: Remove non-standard std:: prefix from types 2023-03-28 12:52:22 +02:00
Michael Fabian 'Xaymar' Dirks dbb71cf801 project: Code cleanup and reapply formatting
Changes applied:

* Moved utility files to /util/.
* Removed unused #includes.
* Removed unused ::ffmpeg::tools function.
* Removed unused variables.
* Fixed missing parentheses in the version macro.
* Fixed missing override on virtual function overrides and removed unnecessary virtual keyword from them.
* Disabled additional warning for ATL headers on MSVC only.
* Replaced direct printf parameters with their macro equivalent.
* Replaced C-style casts with C++-style casts.
* Applied clang-format again after an earlier change to the CMake file broke the integration for it.
2023-03-28 12:52:20 +02:00
Michael Fabian 'Xaymar' Dirks 5530d2d416 nvidia/cuda/cuda: Convert to global Singleton 2023-03-28 12:52:12 +02:00
Michael Fabian 'Xaymar' Dirks 9658c1ee0f nvidia/cuda: Remove 'cu_' prefix from types 2023-03-28 12:52:11 +02:00
Michael Fabian 'Xaymar' Dirks a40db1258a nvidia/cuda: Add cuCtxCreate, cuCtxSynchronize 2023-03-28 12:40:43 +02:00
Michael Fabian 'Xaymar' Dirks 4d8ff417e7 nvidia-cuda: Improve usage of CUDA resources and functions
Load additional functions from CUDA and add new enumerations to support them:
* cuDevicePrimaryCtxSetFlags allows us to sched scheduling mode for the GPU.
* cuCtxgetStreamPriorityRange allows us to check which priority levels are supported.
* cuStreamCreateWithPriority allows us to create streams with non-default priority.

The scheduler mode is now set to yield so that other threads can do work when we hit an eventual stalling problem. Streams can also now be created with higher priority and different flags, if necessary. In most cases this should allow CUDA resources to execute even while the GPU is under heavy load.
2020-04-17 11:44:37 +02:00
Michael Fabian 'Xaymar' Dirks 908d1f0a20 project: Modernize code to proper C++ 2020-04-09 00:17:25 +02:00
Michael Fabian 'Xaymar' Dirks a138f95126 cmake: Fix clang support in native OBS Studio build 2020-04-05 06:50:21 +02:00
Michael Fabian 'Xaymar' Dirks cc9d3486b2 project: Fix Linux support by fixing errors and warnings
With this, GCC 8 and above should now be able to compile the project both in obs-studio and as a standalone install. Some features are currently still not fully supported and require extra work, but the majority of things are supported and work out of the box. Exact feature parity can be looked up here on the wiki: https://github.com/Xaymar/obs-StreamFX/wiki/Platform-Feature-Parity

Related: #119 #98 #30
2020-04-02 20:37:45 +02:00
Michael Fabian 'Xaymar' Dirks 88213e81f6 nvidia-cuda: GPL compatible CUDA library interface
Due to the 'nvcuda' library being part of the driver, it falls in a clause of the GPL which allows us to load and interface with system drivers. Since we can't rely on Nvidias headers here (incompatible license), most of this was pulled from FFmpeg and other things were found out via testing.
2020-03-31 21:46:47 +02:00