aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/host1x
diff options
context:
space:
mode:
authorSDK-Chan <sdkchan@eden-emu.dev>2025-07-14 22:30:07 +0200
committercrueter <crueter@eden-emu.dev>2025-07-14 22:30:07 +0200
commita8564a09b7b2aac98a0319d40f8e5bc6984f8f1d (patch)
tree74ee8356a03473da47cbec78beedc6652e885bbb /src/video_core/host1x
parent2e092010e62d2810efc3dbe7b4d4b3d3cf873cdc (diff)
[host1x] FreeBSD: Fix random crashes due to CUDA/VAAPI check sideeffects (#64)
FreeBSD doesn't support NVDEC, CUDA, and partially supports VAAPI (mostly for firefox). Implementing VAAPI for other use cases would be a little bit complicated so, I chose to switch it off for FreeBSD. This PR ensures that FFmpeg will always default to software decoding on FreeBSD, but should remain the same functionalities for other OS's. The results are slight CPU increases while decoding in software mode, but still neglectable and they don't really harm performance. Co-authored-by: MaranBr <maranbr@eden-emu.dev> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/64 Co-authored-by: SDK-Chan <sdkchan@eden-emu.dev> Co-committed-by: SDK-Chan <sdkchan@eden-emu.dev>
Diffstat (limited to 'src/video_core/host1x')
-rw-r--r--src/video_core/host1x/ffmpeg/ffmpeg.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/video_core/host1x/ffmpeg/ffmpeg.cpp b/src/video_core/host1x/ffmpeg/ffmpeg.cpp
index 9b718f2591..5321c8c98c 100644
--- a/src/video_core/host1x/ffmpeg/ffmpeg.cpp
+++ b/src/video_core/host1x/ffmpeg/ffmpeg.cpp
@@ -26,13 +26,14 @@ namespace {
constexpr AVPixelFormat PreferredGpuFormat = AV_PIX_FMT_NV12;
constexpr AVPixelFormat PreferredCpuFormat = AV_PIX_FMT_YUV420P;
constexpr std::array PreferredGpuDecoders = {
- AV_HWDEVICE_TYPE_CUDA,
#ifdef _WIN32
+ AV_HWDEVICE_TYPE_CUDA,
AV_HWDEVICE_TYPE_D3D11VA,
AV_HWDEVICE_TYPE_DXVA2,
+#elif defined(__FreeBSD__)
+ AV_HWDEVICE_TYPE_VDPAU,
#elif defined(__unix__)
AV_HWDEVICE_TYPE_VAAPI,
- AV_HWDEVICE_TYPE_VDPAU,
#endif
AV_HWDEVICE_TYPE_VULKAN,
};