From bfc7be2b801dc85c9f834b552ba998e31aef020b Mon Sep 17 00:00:00 2001 From: edde746 <86283021+edde746@users.noreply.github.com> Date: Tue, 10 Mar 2026 19:42:19 +0100 Subject: [PATCH] fix: default to Vulkan on Windows close #653 --- windows/runner/mpv/mpv_player.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/windows/runner/mpv/mpv_player.cpp b/windows/runner/mpv/mpv_player.cpp index b911a849..c9c076eb 100644 --- a/windows/runner/mpv/mpv_player.cpp +++ b/windows/runner/mpv/mpv_player.cpp @@ -111,6 +111,9 @@ bool MpvPlayer::Initialize(HWND container, HWND flutter_window) { // Configure mpv for embedded playback. LogToFile("MpvPlayer::Initialize - setting mpv options"); + // Use gpu-next + Vulkan to avoid D3D11 driver crashes (GH-653) + mpv_set_option_string(mpv_, "vo", "gpu-next"); + mpv_set_option_string(mpv_, "gpu-api", "vulkan"); // hwdec is set from Flutter via setProperty based on user preference mpv_set_option_string(mpv_, "keep-open", "yes"); mpv_set_option_string(mpv_, "idle", "yes"); @@ -546,7 +549,7 @@ void MpvPlayer::UpdateHDRMode(double sigPeak) { // - target-colorspace-hint=yes // - Windows HDR is enabled in Display Settings // - Display supports HDR - // No explicit DXGI calls needed - mpv's gpu/d3d11 handles it + // No explicit DXGI calls needed - mpv's gpu-next/vulkan handles it } } // namespace mpv