summaryrefslogtreecommitdiffstats
path: root/video/out/d3d11/ra_d3d11.h
diff options
context:
space:
mode:
authorJames Ross-Gowan <rossy@jrg.systems>2017-11-01 22:38:41 +1100
committerJames Ross-Gowan <rossy@jrg.systems>2017-11-07 20:27:13 +1100
commite7bf5576e599593b1bba5bbf2a7cd6d4270c7809 (patch)
tree8a91e157cbd47bdd6f9bdbb40f2b0722ad5d3d53 /video/out/d3d11/ra_d3d11.h
parentb258d82d6eab5cec7f27f4d6780bf991d28aadef (diff)
downloadmpv-e7bf5576e599593b1bba5bbf2a7cd6d4270c7809.tar.bz2
mpv-e7bf5576e599593b1bba5bbf2a7cd6d4270c7809.tar.xz
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.
Diffstat (limited to 'video/out/d3d11/ra_d3d11.h')
-rw-r--r--video/out/d3d11/ra_d3d11.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/video/out/d3d11/ra_d3d11.h b/video/out/d3d11/ra_d3d11.h
index eeadc7994e..54033b6cee 100644
--- a/video/out/d3d11/ra_d3d11.h
+++ b/video/out/d3d11/ra_d3d11.h
@@ -22,8 +22,9 @@ struct ra_tex *ra_d3d11_wrap_tex(struct ra *ra, ID3D11Resource *res);
// As above, but for a D3D11VA video resource. The fmt parameter selects which
// plane of a planar format will be mapped when the RA texture is used.
+// array_slice should be set for texture arrays and is ignored for non-arrays.
struct ra_tex *ra_d3d11_wrap_tex_video(struct ra *ra, ID3D11Texture2D *res,
- int w, int h,
+ int w, int h, int array_slice,
const struct ra_format *fmt);
// Get the underlying D3D11 device from an RA instance. The returned device is