Skip to content

Commit

Permalink
libobs-opengl: Disable NV12/P010 on Windows
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
kkartaltepe authored and RytoEX committed Jul 22, 2024
1 parent 31963f8 commit 7912d06
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions libobs-opengl/gl-subsystem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7912d06

Please sign in to comment.