[vlc-devel] [PATCH] direct3d11: fix the staging texture alignment
Steve Lhomme
robux4 at videolabs.io
Tue Mar 28 10:22:14 CEST 2017
---
modules/video_output/win32/direct3d11.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 57bf6331d5..555b0be603 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -821,8 +821,13 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned pool_size)
/* we need a staging texture */
video_format_t staging_fmt;
video_format_Copy(&staging_fmt, &vd->fmt);
- staging_fmt.i_width = staging_fmt.i_visible_width;
+ staging_fmt.i_width = staging_fmt.i_visible_width;
staging_fmt.i_height = staging_fmt.i_visible_height;
+ if (is_d3d11_opaque(staging_fmt.i_chroma))
+ {
+ staging_fmt.i_width = (staging_fmt.i_width + 1) & ~1;
+ staging_fmt.i_height = (staging_fmt.i_height + 1) & ~1;
+ }
if (AllocateTextures(vd, sys->picQuadConfig, &staging_fmt, 1, textures))
goto error;
--
2.11.1
More information about the vlc-devel
mailing list