mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 03:08:05 +02:00
pan/afbc: Fix header alignment requirement on Midgard
This is actually 64 byte on Midgard. This makes pan_afbc_body_align() and pan_afbc_header_align() return the same value, so let's define one as a wrapper around the other. Not flagged as a fix because pan_image_layout() init is handling AFBC header alignment properly on Midgard already, but we want that fixed to cleanup the image layout logic. Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com> Reviewed-by: Eric R. Smith <eric.smith@collabora.com> Tested-by: Eric R. Smith <eric.smith@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35555>
This commit is contained in:
parent
883ce63db5
commit
1522fdc371
1 changed files with 5 additions and 8 deletions
|
|
@ -200,8 +200,10 @@ pan_afbc_header_align(unsigned arch, uint64_t modifier)
|
|||
{
|
||||
if (modifier & AFBC_FORMAT_MOD_TILED)
|
||||
return 4096;
|
||||
else
|
||||
else if (arch >= 6)
|
||||
return 128;
|
||||
else
|
||||
return 64;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -212,13 +214,8 @@ pan_afbc_header_align(unsigned arch, uint64_t modifier)
|
|||
static inline uint32_t
|
||||
pan_afbc_body_align(unsigned arch, uint64_t modifier)
|
||||
{
|
||||
if (modifier & AFBC_FORMAT_MOD_TILED)
|
||||
return 4096;
|
||||
|
||||
if (arch >= 6)
|
||||
return 128;
|
||||
|
||||
return 64;
|
||||
/* Body and header alignments are actually the same. */
|
||||
return pan_afbc_header_align(arch, modifier);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue