Skip to content
Snippets Groups Projects
Commit 5c81725e authored by Steve Lhomme's avatar Steve Lhomme Committed by Thomas Guillem
Browse files

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: default avatarThomas Guillem <thomas@gllm.fr>
parent dfb34fb6
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment