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. --- DOCS/man/options.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'DOCS/man/options.rst') diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index d6dfc48535..7dd1dc6af9 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -4297,6 +4297,18 @@ 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. +``--d3d11va-zero-copy=`` + 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 + shader resource. Set this option to avoid that copy by sampling directly + from the decoder image. This may increase performance and reduce power + usage, but can cause the image to be sampled incorrectly on the bottom and + right edges due to padding, and may invoke driver bugs, since Direct3D 11 + technically does not allow sampling from a decoder surface (though most + drivers support it.) + + Currently only relevant for ``--gpu-api=d3d11``. + ``--spirv-compiler=`` Controls which compiler is used to translate GLSL to SPIR-V. This is (currently) only relevant for ``--gpu-api=vulkan``. The possible choices -- cgit v1.2.3