[vlc-devel] [PATCH 27/39] d3d11va: make the internal pool usable with the pixel shader

Steve Lhomme robux4 at videolabs.io
Fri Jun 2 16:46:30 CEST 2017


That will save a copy later.
---
 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 3a375a028a..ca94794825 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)) {
-- 
2.12.1



More information about the vlc-devel mailing list