gallium: reduce pipe_resource.usage to 4 bits

This works around a bindgen bug, but also moves the value into a single
byte as per the addition of compression_rate it spanned over two bytes.

Fixes: 5db7398672 ("gallium: add interface for fixed-rate surface/texture compression")
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29720>
This commit is contained in:
Karol Herbst 2024-06-13 21:51:27 +02:00 committed by Marge Bot
parent 59937f62a6
commit f58247882a

View file

@ -581,7 +581,7 @@ struct pipe_resource
unsigned compression_rate:4; /**< Fixed-rate compresion bitrate if any */
unsigned usage:8; /**< PIPE_USAGE_x (not a bitmask) */
unsigned usage:4; /**< PIPE_USAGE_x (not a bitmask) */
unsigned bind; /**< bitmask of PIPE_BIND_x */
unsigned flags; /**< bitmask of PIPE_RESOURCE_FLAG_x */