[vlc-commits] direct3d11: fix the chroma of the texture allocated to render from a sw source

Steve Lhomme git at videolan.org
Tue Oct 15 14:58:27 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Oct 15 14:04:08 2019 +0200| [b9194f6fabe3fea2428dff5720444aa885ab7550] | committer: Steve Lhomme

direct3d11: fix the chroma of the texture allocated to render from a sw source

The planes we use to copy from the incoming sw picture to the texture plane(s)
need to use a matching chroma with the DXGI format.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b9194f6fabe3fea2428dff5720444aa885ab7550
---

 modules/video_output/win32/direct3d11.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 56844a618b..e7d9b1ceab 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -1192,6 +1192,8 @@ static int Direct3D11CreateFormatResources(vout_display_t *vd, const video_forma
     {
         /* we need a staging texture */
         ID3D11Texture2D *textures[D3D11_MAX_SHADER_VIEW] = {0};
+        if (!is_d3d11_opaque(fmt->i_chroma))
+            sys->area.texture_source.i_chroma = sys->picQuad.textureFormat->fourcc;
 
         if (AllocateTextures(vd, &sys->d3d_dev, sys->picQuad.textureFormat, &sys->area.texture_source, 1, textures, sys->stagingPlanes))
         {



More information about the vlc-commits mailing list