Commit ff6c207c authored by Steve Lhomme's avatar Steve Lhomme

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

parent 51142e1f
...@@ -482,8 +482,8 @@ int AllocateTextures( vlc_object_t *obj, d3d11_device_t *d3d_dev, ...@@ -482,8 +482,8 @@ int AllocateTextures( vlc_object_t *obj, d3d11_device_t *d3d_dev,
textures[picture_count * D3D11_MAX_SHADER_VIEW + plane] = slicedTexture; textures[picture_count * D3D11_MAX_SHADER_VIEW + plane] = slicedTexture;
ID3D11Texture2D_AddRef(slicedTexture); ID3D11Texture2D_AddRef(slicedTexture);
} else { } else {
texDesc.Height = planes[plane].i_lines; texDesc.Height = fmt->i_height * p_chroma_desc->p[plane].h.num / p_chroma_desc->p[plane].h.den;
texDesc.Width = planes[plane].i_pitch; 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] ); hr = ID3D11Device_CreateTexture2D( d3d_dev->d3ddevice, &texDesc, NULL, &textures[picture_count * D3D11_MAX_SHADER_VIEW + plane] );
if (FAILED(hr)) { if (FAILED(hr)) {
msg_Err(obj, "CreateTexture2D failed for the %d pool. (hr=0x%0lx)", pool_size, 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