Commit 1b232faf authored by Steve Lhomme's avatar Steve Lhomme Committed by Thomas Guillem

d3d11_fmt: the texture dimensions don't depend on the pixel width like the pitch

(cherry picked from commit ff6c207c)
Signed-off-by: Thomas Guillem's avatarThomas Guillem <thomas@gllm.fr>
parent 88bf1825
......@@ -482,8 +482,8 @@ int AllocateTextures( vlc_object_t *obj, d3d11_device_t *d3d_dev,
textures[picture_count * D3D11_MAX_SHADER_VIEW + plane] = slicedTexture;
ID3D11Texture2D_AddRef(slicedTexture);
} else {
texDesc.Height = planes[plane].i_lines;
texDesc.Width = planes[plane].i_pitch;
texDesc.Height = fmt->i_height * p_chroma_desc->p[plane].h.num / p_chroma_desc->p[plane].h.den;
texDesc.Width = fmt->i_width * p_chroma_desc->p[plane].w.num / p_chroma_desc->p[plane].w.den;
hr = ID3D11Device_CreateTexture2D( d3d_dev->d3ddevice, &texDesc, NULL, &textures[picture_count * D3D11_MAX_SHADER_VIEW + plane] );
if (FAILED(hr)) {
msg_Err(obj, "CreateTexture2D failed for the %d pool. (hr=0x%0lx)", pool_size, hr);
......
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