From 6cd964a597fc80d8b1142cd7ac307c1bdccbaea3 Mon Sep 17 00:00:00 2001 From: Corentin Noël Date: Tue, 22 Aug 2023 17:33:11 +0200 Subject: p_state: Decrease the size of pipe_box - 24 -> 16 bytes This is a direct port of https://gitlab.freedesktop.org/mesa/mesa/-/commit/3dfe61ed6ec6773c2373ec7a139b7dfe794f60c8 --- src/gallium/include/pipe/p_state.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h index 030d4ec..c1f0774 100644 --- a/src/gallium/include/pipe/p_state.h +++ b/src/gallium/include/pipe/p_state.h @@ -396,12 +396,15 @@ struct pipe_sampler_view */ struct pipe_box { + /* Fields only used by textures use int16_t instead of int. + * x and width are used by buffers, so they need the full 32-bit range. + */ int x; - int y; - int z; + int16_t y; + int16_t z; int width; - int height; - int depth; + int16_t height; + int16_t depth; }; -- cgit v1.2.3