d3d11: get real on the wire bits per color channel

This commit is contained in:
Kacper Michajłow 2024-03-06 05:42:28 +01:00 committed by sfan5
parent 2b0c7b1aa4
commit 16e3d7dca6
1 changed files with 5 additions and 0 deletions

View File

@ -154,6 +154,11 @@ static bool d3d11_reconfig(struct ra_ctx *ctx)
static int d3d11_color_depth(struct ra_swapchain *sw)
{
struct priv *p = sw->priv;
DXGI_OUTPUT_DESC1 desc1;
if (mp_get_dxgi_output_desc(p->swapchain, &desc1))
return desc1.BitsPerColor;
DXGI_SWAP_CHAIN_DESC desc;
HRESULT hr = IDXGISwapChain_GetDesc(p->swapchain, &desc);