summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKacper Michajłow <kasper93@gmail.com>2022-12-29 17:19:55 +0100
committerLeo Izen <leo.izen@gmail.com>2022-12-30 11:02:52 -0500
commitad65c8855b60df3c95026ee7b315eca31c59f3bc (patch)
tree2b9bab44a63cb0aa825873e4af7e0c8e4aa461e2
parenteb29aa4839254b9ec7420342da900e0329289547 (diff)
downloadmpv-ad65c8855b60df3c95026ee7b315eca31c59f3bc.tar.bz2
mpv-ad65c8855b60df3c95026ee7b315eca31c59f3bc.tar.xz
vo_opengl: do not blindly reject all Microsoft's OpenGL implementations
This change enables mpv to work in the WSL2 (WSLg) environment where OpenGL is implemented on top of D3D12. This reverts commit 149d98d244. Mentioned OpenGL implementation (GDI Generic) in the original change will be rejected by version check, so there is no need to handle it manually. Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
-rw-r--r--video/out/opengl/common.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/video/out/opengl/common.c b/video/out/opengl/common.c
index 8e8638df9f..cf680e9c4c 100644
--- a/video/out/opengl/common.c
+++ b/video/out/opengl/common.c
@@ -37,12 +37,12 @@
static bool is_software_gl(GL *gl)
{
const char *renderer = gl->GetString(GL_RENDERER);
- const char *vendor = gl->GetString(GL_VENDOR);
- return !(renderer && vendor) ||
+ // Note we don't attempt to blacklist Microsoft's fallback implementation.
+ // It only provides OpenGL 1.1 and will be skipped anyway.
+ return !renderer ||
strcmp(renderer, "Software Rasterizer") == 0 ||
strstr(renderer, "llvmpipe") ||
strstr(renderer, "softpipe") ||
- strcmp(vendor, "Microsoft Corporation") == 0 ||
strcmp(renderer, "Mesa X11") == 0 ||
strcmp(renderer, "Apple Software Renderer") == 0;
}