[vlc-commits] d3d11va: make the internal pool usable with the pixel shader
Steve Lhomme
git at videolan.org
Tue Jun 13 15:01:00 CEST 2017
vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Mon May 29 14:46:39 2017 +0200| [4f6e2aadc7160a2770868eb5c4271018ac28f604] | committer: Jean-Baptiste Kempf
d3d11va: make the internal pool usable with the pixel shader
That will save a copy later.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=4f6e2aadc7160a2770868eb5c4271018ac28f604
---
modules/codec/avcodec/d3d11va.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/modules/codec/avcodec/d3d11va.c b/modules/codec/avcodec/d3d11va.c
index fa2461a6bc..6bdfe2db46 100644
--- a/modules/codec/avcodec/d3d11va.c
+++ b/modules/codec/avcodec/d3d11va.c
@@ -830,6 +830,9 @@ static int DxCreateDecoderSurfaces(vlc_va_t *va, int codec_id, const video_forma
texDesc.BindFlags = D3D11_BIND_DECODER;
texDesc.CPUAccessFlags = 0;
+ if (DeviceSupportsFormat(dx_sys->d3ddev, texDesc.Format, D3D11_FORMAT_SUPPORT_SHADER_LOAD))
+ texDesc.BindFlags |= D3D11_BIND_SHADER_RESOURCE;
+
ID3D11Texture2D *p_texture;
hr = ID3D11Device_CreateTexture2D( dx_sys->d3ddev, &texDesc, NULL, &p_texture );
if (FAILED(hr)) {
More information about the vlc-commits
mailing list