From c73132f47a5a6be9c1918aa3e2a9cef64a5bc3f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Mon, 16 Sep 2024 02:47:39 +0200 Subject: [PATCH] d3d11/formats: don't add emulated formats if they would fail on upload Fixes: https://github.com/mpv-player/mpv/issues/14850 --- src/d3d11/formats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/d3d11/formats.c b/src/d3d11/formats.c index 7aaec268..da56b57c 100644 --- a/src/d3d11/formats.c +++ b/src/d3d11/formats.c @@ -280,7 +280,7 @@ void pl_d3d11_setup_formats(struct pl_gpu_t *gpu) fmt->fourcc = pl_fmt_fourcc(fmt); // If no caps, D3D11 only supports this for things we don't care about - if (!fmt->caps) { + if (!fmt->caps || (fmt->emulated && !(fmt->caps & PL_FMT_CAP_READWRITE))) { pl_free(fmt); continue; }