plugin: If CUDA is requested, ensure it is loaded first
This commit is contained in:
parent
0f92a4b499
commit
5279993f4b
|
@ -975,6 +975,9 @@ if(HAVE_NVIDIA_CUDA)
|
||||||
"source/nvidia/cuda/nvidia-cuda-stream.hpp"
|
"source/nvidia/cuda/nvidia-cuda-stream.hpp"
|
||||||
"source/nvidia/cuda/nvidia-cuda-stream.cpp"
|
"source/nvidia/cuda/nvidia-cuda-stream.cpp"
|
||||||
)
|
)
|
||||||
|
list(APPEND PROJECT_DEFINITIONS
|
||||||
|
ENABLE_NVIDIA_CUDA
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(REQUIRE_OBSFE AND HAVE_OBSFE)
|
if(REQUIRE_OBSFE AND HAVE_OBSFE)
|
||||||
|
|
|
@ -24,6 +24,10 @@
|
||||||
#include "obs/gs/gs-vertexbuffer.hpp"
|
#include "obs/gs/gs-vertexbuffer.hpp"
|
||||||
#include "obs/obs-source-tracker.hpp"
|
#include "obs/obs-source-tracker.hpp"
|
||||||
|
|
||||||
|
#ifdef ENABLE_NVIDIA_CUDA
|
||||||
|
#include "nvidia/cuda/nvidia-cuda-obs.hpp"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_ENCODER_FFMPEG
|
#ifdef ENABLE_ENCODER_FFMPEG
|
||||||
#include "encoders/encoder-ffmpeg.hpp"
|
#include "encoders/encoder-ffmpeg.hpp"
|
||||||
#endif
|
#endif
|
||||||
|
@ -89,6 +93,11 @@ try {
|
||||||
// Initialize Source Tracker
|
// Initialize Source Tracker
|
||||||
streamfx::obs::source_tracker::initialize();
|
streamfx::obs::source_tracker::initialize();
|
||||||
|
|
||||||
|
#ifdef ENABLE_NVIDIA_CUDA
|
||||||
|
// Initialize CUDA if features requested it.
|
||||||
|
auto cuda = ::streamfx::nvidia::cuda::obs::get();
|
||||||
|
#endif
|
||||||
|
|
||||||
// GS Stuff
|
// GS Stuff
|
||||||
{
|
{
|
||||||
_gs_fstri_vb = std::make_shared<streamfx::obs::gs::vertex_buffer>(uint32_t(3), uint8_t(1));
|
_gs_fstri_vb = std::make_shared<streamfx::obs::gs::vertex_buffer>(uint32_t(3), uint8_t(1));
|
||||||
|
|
Loading…
Reference in New Issue