[vlc-commits] d3d11_fmt: allow creating small textures
Steve Lhomme
git at videolan.org
Fri Dec 15 16:46:16 CET 2017
vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Fri Dec 15 15:28:05 2017 +0100| [5c81725ea4d513d6f47fcf7dd6e5bea54433489e] | committer: Thomas Guillem
d3d11_fmt: allow creating small textures
For anything smaller than 64 pixels it may give an error due to the width padding.
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5c81725ea4d513d6f47fcf7dd6e5bea54433489e
---
modules/video_chroma/d3d11_fmt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/modules/video_chroma/d3d11_fmt.c b/modules/video_chroma/d3d11_fmt.c
index cce11fec5b..5f9a5b911a 100644
--- a/modules/video_chroma/d3d11_fmt.c
+++ b/modules/video_chroma/d3d11_fmt.c
@@ -489,7 +489,8 @@ int AllocateTextures( vlc_object_t *obj, d3d11_device_t *d3d_dev,
p_chroma_desc->pixel_size * texDesc.Width );
goto error;
}
- if ( mappedResource.RowPitch >=
+ if ( fmt->i_width > 64 &&
+ mappedResource.RowPitch >=
2* (fmt->i_width * p_chroma_desc->p[0].w.num / p_chroma_desc->p[0].w.den * p_chroma_desc->pixel_size) )
{
msg_Err(obj, "Bogus %4.4s pitch detected. %d vs %d", (const char*)&fmt->i_chroma,
More information about the vlc-commits
mailing list