vo_gpu/d3d11: utilize actual backbuffer values for bit depth

And if backbuffer is not around, return an error value utilized
elsewhere already.
This commit is contained in:
James Ross-Gowan 2019-10-11 00:14:28 +03:00
parent a85fa2d2de
commit 4809a3f48d
1 changed files with 6 additions and 1 deletions

View File

@ -162,7 +162,12 @@ static bool d3d11_reconfig(struct ra_ctx *ctx)
static int d3d11_color_depth(struct ra_swapchain *sw) 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) static bool d3d11_start_frame(struct ra_swapchain *sw, struct ra_fbo *out_fbo)