summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorJames Ross-Gowan <rossy@jrg.systems>2019-10-11 00:14:28 +0300
committerJames Ross-Gowan <rossy@jrg.systems>2019-10-13 22:31:33 +1100
commit4809a3f48d41f5414057e965c0f18e0279cc2abe (patch)
tree57ee90773613aae35fcd893664cf3f7b13e19131 /video
parenta85fa2d2de92a89258da6b8bf6d814cf47824a0e (diff)
downloadmpv-4809a3f48d41f5414057e965c0f18e0279cc2abe.tar.bz2
mpv-4809a3f48d41f5414057e965c0f18e0279cc2abe.tar.xz
vo_gpu/d3d11: utilize actual backbuffer values for bit depth
And if backbuffer is not around, return an error value utilized elsewhere already.
Diffstat (limited to 'video')
-rw-r--r--video/out/d3d11/context.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/video/out/d3d11/context.c b/video/out/d3d11/context.c
index 17bcdcc1f6..003e3ff173 100644
--- a/video/out/d3d11/context.c
+++ b/video/out/d3d11/context.c
@@ -162,7 +162,12 @@ static bool d3d11_reconfig(struct ra_ctx *ctx)
static int d3d11_color_depth(struct ra_swapchain *sw)
{
- return 8;
+ struct priv *p = sw->priv;
+
+ if (!p->backbuffer)
+ return 0;
+
+ return p->backbuffer->params.format->component_depth[0];
}
static bool d3d11_start_frame(struct ra_swapchain *sw, struct ra_fbo *out_fbo)