mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
nv50: align pitch of linear surfaces correctly
This commit is contained in:
parent
eabb9b0fd9
commit
55bab45a7c
1 changed files with 2 additions and 1 deletions
|
|
@ -185,6 +185,7 @@ boolean
|
|||
nv50_miptree_init_layout_linear(struct nv50_miptree *mt)
|
||||
{
|
||||
struct pipe_resource *pt = &mt->base.base;
|
||||
const unsigned blocksize = util_format_get_blocksize(pt->format);
|
||||
|
||||
if (util_format_is_depth_or_stencil(pt->format))
|
||||
return FALSE;
|
||||
|
|
@ -194,7 +195,7 @@ nv50_miptree_init_layout_linear(struct nv50_miptree *mt)
|
|||
if (mt->ms_x | mt->ms_y)
|
||||
return FALSE;
|
||||
|
||||
mt->level[0].pitch = align(pt->width0, 64);
|
||||
mt->level[0].pitch = align(pt->width0 * blocksize, 64);
|
||||
|
||||
mt->total_size = mt->level[0].pitch * pt->height0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue