Commit 5c81725e authored by Steve Lhomme's avatar Steve Lhomme Committed by 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's avatarThomas Guillem <thomas@gllm.fr>
parent dfb34fb6
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment