From f58247882a2906217fd829eaace96a9691edff50 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Thu, 13 Jun 2024 21:51:27 +0200 Subject: [PATCH] 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: 5db73986725 ("gallium: add interface for fixed-rate surface/texture compression") Acked-by: Mike Blumenkrantz Reviewed-by: Alyssa Rosenzweig Reviewed-by: Adam Jackson Part-of: --- src/gallium/include/pipe/p_state.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index 096b96c061d..40510470be8 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -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 */