[vlc-commits] direct3d11: only use opaque input for direct rendering

Steve Lhomme git at videolan.org
Thu Aug 4 11:08:46 CEST 2016


vlc | branch: master | Steve Lhomme <robux4 at gmail.com> | Wed Aug  3 13:30:57 2016 +0200| [2fc50a52510e539578123b64cba5afabcddb78d4] | committer: Jean-Baptiste Kempf

direct3d11: only use opaque input for direct rendering

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

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

diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 925fba4..90be208 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -1189,7 +1189,8 @@ static int Direct3D11Open(vout_display_t *vd, video_format_t *fmt)
         for (const d3d_format_t *output_format = GetRenderFormatList();
              output_format->name != NULL; ++output_format)
         {
-            if( bits_per_channel <= output_format->bitsPerChannel )
+            if( bits_per_channel <= output_format->bitsPerChannel &&
+                !is_d3d11_opaque(output_format->fourcc) )
             {
                 if( SUCCEEDED( ID3D11Device_CheckFormatSupport(sys->d3ddevice,
                                                                output_format->formatTexture,
@@ -1217,7 +1218,8 @@ static int Direct3D11Open(vout_display_t *vd, video_format_t *fmt)
             if( SUCCEEDED( ID3D11Device_CheckFormatSupport(sys->d3ddevice,
                                                            output_format->formatTexture,
                                                            &i_formatSupport)) &&
-                    ( i_formatSupport & i_quadSupportFlags ) == i_quadSupportFlags )
+                    ( i_formatSupport & i_quadSupportFlags ) == i_quadSupportFlags &&
+                    !is_d3d11_opaque(output_format->fourcc) )
             {
                 msg_Dbg( vd, "Using pixel format %s for chroma %4.4s", output_format->name,
                              (char *)&i_src_chroma );



More information about the vlc-commits mailing list