summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Ekström <jeebjp@gmail.com>2019-04-20 01:26:39 +0300
committerJan Ekström <jeebjp@gmail.com>2019-09-29 19:39:26 +0300
commit81639062997af9329de4aae8005735c1129e2fcd (patch)
treee3169411ccd289780dd9b780d7348000b6430422
parente205e179e031b8868786e1ec0816a78985ead527 (diff)
downloadmpv-81639062997af9329de4aae8005735c1129e2fcd.tar.bz2
mpv-81639062997af9329de4aae8005735c1129e2fcd.tar.xz
video/d3d11: add adapter selection by name into d3d11 options
This lets the user define an adapter name that can then be passed further into the internals.
-rw-r--r--DOCS/interface-changes.rst2
-rw-r--r--DOCS/man/options.rst10
-rw-r--r--video/out/d3d11/context.c3
3 files changed, 15 insertions, 0 deletions
diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst
index 55e8d910a2..8fe5b01f14 100644
--- a/DOCS/interface-changes.rst
+++ b/DOCS/interface-changes.rst
@@ -20,6 +20,8 @@ Interface changes
::
--- mpv 0.30.0 ---
+ - add `--d3d11-adapter` to enable explicit selection of a D3D11 rendering
+ adapter by name.
- rename `--drm-osd-plane-id` to `--drm-draw-plane`, `--drm-video-plane-id` to
`--drm-drmprime-video-plane` and `--drm-osd-size` to `--drm-draw-surface-size`
to better reflect what the options actually control, that the values they
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
index 0037f8e40a..44695e4659 100644
--- a/DOCS/man/options.rst
+++ b/DOCS/man/options.rst
@@ -4675,6 +4675,16 @@ The following video options are currently all specific to ``--vo=gpu`` and
Schedule each frame to be presented for this number of VBlank intervals.
(default: 1) Setting to 1 will enable VSync, setting to 0 will disable it.
+``--d3d11-adapter=<adapter name>``
+ Select a specific D3D11 adapter to utilize for D3D11 rendering.
+ Will pick the default adapter if unset. Alternatives are listed
+ when the d3d11 back-end is initialized with verbosity level verbose
+ or higher.
+
+ Hardware decoders utilizing the D3D11 rendering abstraction's helper
+ functionality to receive a device, such as D3D11VA or DXVA2's DXGI
+ mode, will be affected by this choice.
+
``--d3d11va-zero-copy=<yes|no>``
By default, when using hardware decoding with ``--gpu-api=d3d11``, the
video image will be copied (GPU-to-GPU) from the decoder surface to a
diff --git a/video/out/d3d11/context.c b/video/out/d3d11/context.c
index 062fdd2061..aa11f46d59 100644
--- a/video/out/d3d11/context.c
+++ b/video/out/d3d11/context.c
@@ -31,6 +31,7 @@ struct d3d11_opts {
int warp;
int flip;
int sync_interval;
+ char *adapter_name;
};
#define OPT_BASE_STRUCT struct d3d11_opts
@@ -52,6 +53,7 @@ const struct m_sub_options d3d11_conf = {
{"9_1", D3D_FEATURE_LEVEL_9_1})),
OPT_FLAG("d3d11-flip", flip, 0),
OPT_INTRANGE("d3d11-sync-interval", sync_interval, 0, 0, 4),
+ OPT_STRING("d3d11-adapter", adapter_name, 0),
{0}
},
.defaults = &(const struct d3d11_opts) {
@@ -59,6 +61,7 @@ const struct m_sub_options d3d11_conf = {
.warp = -1,
.flip = 1,
.sync_interval = 1,
+ .adapter_name = NULL,
},
.size = sizeof(struct d3d11_opts)
};