vlc/vlc-3.0 | branch: master | Steve Lhomme <[email protected]> | Mon Feb 19 
14:50:10 2018 +0100| [fe45d722b71c59d85e4cc58a3177fcb8dfbc8676] | committer: 
Hugo Beauzée-Luyssen

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.

(cherry picked from commit 566fddfa311815eb8a44a922061618ef55565313)
Signed-off-by: Hugo Beauzée-Luyssen <[email protected]>

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

 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 f9b90e4c91..0c6a4ab2c0 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
[email protected]
https://mailman.videolan.org/listinfo/vlc-commits

Reply via email to