panfrost: store texfeat_bit in panfrost_format

To avoid increasing memory usage, make sure we pack this together with
the hw format.

This will be used in the next commit.

Fixes: 0c1fde956b ("panfrost: Add Valhall compressed formats")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31419>
This commit is contained in:
Erik Faye-Lund 2024-09-26 19:22:57 +02:00 committed by Marge Bot
parent 8072c901e1
commit 1637fa3d85
2 changed files with 4 additions and 1 deletions

View file

@ -149,6 +149,7 @@ const struct pan_blendable_format
[PIPE_FORMAT_##pipe] = { \
.hw = MALI_PACK_FMT(texfeat, swizzle, srgb), \
.bind = PAN_BIND_SAMPLER_VIEW, \
.texfeat_bit = MALI_##texfeat, \
}
#else
/* Map to interchange format, as compression is specified in the plane
@ -158,6 +159,7 @@ const struct pan_blendable_format
[PIPE_FORMAT_##pipe] = { \
.hw = MALI_PACK_FMT(interchange, swizzle, srgb), \
.bind = PAN_BIND_SAMPLER_VIEW, \
.texfeat_bit = MALI_##texfeat, \
}
#endif

View file

@ -43,7 +43,8 @@ typedef uint32_t mali_pixel_format;
#define PAN_BIND_VERTEX_BUFFER (1 << 4)
struct panfrost_format {
mali_pixel_format hw;
uint32_t hw : 22;
uint32_t texfeat_bit : 5;
unsigned bind;
};