mirror of https://github.com/mpv-player/mpv
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:
parent
a85fa2d2de
commit
4809a3f48d
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue