vlc | branch: master | Steve Lhomme <rob...@ycbcr.xyz> | Mon Feb 19 14:50:10 
2018 +0100| [566fddfa311815eb8a44a922061618ef55565313] | committer: Steve Lhomme

direct3d11: limit the amount of pool slices on Winstore apps

They're limited in memory and don't like too many slices. In most cases
the d3d11va pool will be used instead.

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

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

diff --git a/modules/video_output/win32/direct3d11.c 
b/modules/video_output/win32/direct3d11.c
index a35fbcb240..ec95a06573 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -587,6 +587,13 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned 
pool_size)
     surface_fmt.i_width  = sys->picQuad.i_width;
     surface_fmt.i_height = sys->picQuad.i_height;
 
+#if VLC_WINSTORE_APP
+    /* Phones and the Xbox are memory constrained, rely on the d3d11va pool
+     * which is always smaller, we still get direct rendering from the decoder 
*/
+    if (is_d3d11_opaque(surface_fmt.i_chroma))
+        pool_size = __MIN(pool_size, 6);
+#endif
+
     if (SetupQuad( vd, &surface_fmt, &sys->picQuad, &sys->sys.rect_src_clipped,
                    sys->picQuadConfig, sys->picQuadPixelShader,
                    surface_fmt.projection_mode, vd->fmt.orientation ) != 
VLC_SUCCESS) {

_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to