mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
nil: Fix image align and size constraints
In order to use compressed images we have to align to at least (1<<16) though the kernel also likes (1<<21). This fixes the alignments/sizes so they can work with vm allocs Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
parent
a51b06c730
commit
be5a07aa52
1 changed files with 5 additions and 0 deletions
|
|
@ -439,6 +439,11 @@ nil_image_init(struct nv_device_info *dev,
|
|||
image->pte_kind = nil_choose_pte_kind(dev, info->format, info->samples,
|
||||
true /* TODO: compressed */);
|
||||
|
||||
image->align_B = MAX2(image->align_B, 4096);
|
||||
if (image->pte_kind >= 0xb && image->pte_kind <= 0xe)
|
||||
image->align_B = MAX2(image->align_B, (1 << 16));
|
||||
|
||||
image->size_B = ALIGN(image->size_B, image->align_B);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue