summaryrefslogtreecommitdiffstats
path: root/video/out/gpu/d3d11_helpers.h
diff options
context:
space:
mode:
authorJan Ekström <jeebjp@gmail.com>2018-05-06 03:01:58 +0300
committerJan Ekström <jeebjp@gmail.com>2019-10-30 02:41:25 +0200
commitfc29620ec876b8cf8a95e9d1aedd24e76ef3204c (patch)
treeca13858d0e9aba6dfbcf7e48cebc2b85526a1377 /video/out/gpu/d3d11_helpers.h
parent93dd77b38e4eefd13bc2d3aab24adaa46e72f728 (diff)
downloadmpv-fc29620ec876b8cf8a95e9d1aedd24e76ef3204c.tar.bz2
mpv-fc29620ec876b8cf8a95e9d1aedd24e76ef3204c.tar.xz
vo_gpu/d3d11: add support for configuring swap chain color space
By default utilizes the color space of the desktop on which the swap chain is located. If a specific value is defined, it will be instead be utilized. Enables configuration of the PQ color space (BT.2020 primaries, PQ transfer function) for HDR. Additionally, signals the swap chain color space to the renderer, so that the render looks correct without having to specify target-trc or target-prim manually. Due to all of the APIs being Win10+ only, will only work starting with Windows 10.
Diffstat (limited to 'video/out/gpu/d3d11_helpers.h')
-rw-r--r--video/out/gpu/d3d11_helpers.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/video/out/gpu/d3d11_helpers.h b/video/out/gpu/d3d11_helpers.h
index 5ce23c68cb..c115d330d5 100644
--- a/video/out/gpu/d3d11_helpers.h
+++ b/video/out/gpu/d3d11_helpers.h
@@ -78,6 +78,12 @@ struct d3d11_swapchain_opts {
int width;
int height;
DXGI_FORMAT format;
+ DXGI_COLOR_SPACE_TYPE color_space;
+
+ // mp_colorspace mapping of the configured swapchain colorspace
+ // shall be written into this memory location if configuration
+ // succeeds. Will be ignored if NULL.
+ struct mp_colorspace *configured_csp;
// Use DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL if possible
bool flip;