From e7bf5576e599593b1bba5bbf2a7cd6d4270c7809 Mon Sep 17 00:00:00 2001 From: James Ross-Gowan Date: Wed, 1 Nov 2017 22:38:41 +1100 Subject: vo_gpu: hwdec_d3d11va: allow zero-copy video decoding Like the manual says, this is technically undefined behaviour. See: https://msdn.microsoft.com/en-us/library/windows/desktop/ff476085.aspx In particular, MSDN says texture arrays created with the BIND_DECODER flag cannot be used with CreateShaderResourceView, which means they can't be sampled through SRVs like normal Direct3D textures. However, some programs (Google Chrome included) do this anyway for performance and power-usage reasons, and it appears to work with most drivers. Older AMD drivers had a "bug" with zero-copy decoding, but this appears to have been fixed. See #3255, #3464 and http://crbug.com/623029. --- options/options.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'options/options.c') diff --git a/options/options.c b/options/options.c index 3bf4ee1108..e295afa9bc 100644 --- a/options/options.c +++ b/options/options.c @@ -91,6 +91,7 @@ extern const struct m_sub_options opengl_conf; extern const struct m_sub_options vulkan_conf; extern const struct m_sub_options spirv_conf; extern const struct m_sub_options d3d11_conf; +extern const struct m_sub_options d3d11va_conf; extern const struct m_sub_options angle_conf; extern const struct m_sub_options cocoa_conf; @@ -702,6 +703,9 @@ const m_option_t mp_opts[] = { #if HAVE_D3D11 OPT_SUBSTRUCT("", d3d11_opts, d3d11_conf, 0), +#if HAVE_D3D_HWACCEL + OPT_SUBSTRUCT("", d3d11va_opts, d3d11va_conf, 0), +#endif #endif #if HAVE_EGL_ANGLE_WIN32 -- cgit v1.2.3