From 7912d06b65042501837b5fc669e28cfa0412e020 Mon Sep 17 00:00:00 2001 From: Kurt Kartaltepe Date: Wed, 17 Jul 2024 19:11:23 -0700 Subject: [PATCH] libobs-opengl: Disable NV12/P010 on Windows These formats are used for texture encoding but the OpenGL texture encoding pipeline is not supported on Windows. This can also cause failure to initialize on Windows so it's better to disable the formats. --- libobs-opengl/gl-subsystem.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libobs-opengl/gl-subsystem.c b/libobs-opengl/gl-subsystem.c index 249a68ea8957d8..d0b05193dea190 100644 --- a/libobs-opengl/gl-subsystem.c +++ b/libobs-opengl/gl-subsystem.c @@ -1522,13 +1522,21 @@ void gs_swapchain_destroy(gs_swapchain_t *swapchain) bool device_nv12_available(gs_device_t *device) { UNUSED_PARAMETER(device); +#ifdef _WIN32 + return false; +#else return true; // always a split R8,R8G8 texture. +#endif } bool device_p010_available(gs_device_t *device) { UNUSED_PARAMETER(device); +#ifdef _WIN32 + return false; +#else return true; // always a split R16,R16G16 texture. +#endif } uint32_t gs_voltexture_get_width(const gs_texture_t *voltex)