summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorentin Noël <corentin.noel@collabora.com>2023-08-22 17:33:11 +0200
committerCorentin Noël <corentin.noel@collabora.com>2023-08-22 17:33:11 +0200
commit6cd964a597fc80d8b1142cd7ac307c1bdccbaea3 (patch)
treed0e1174059b75ad4c84c8b4af73c52951e6fc759
parenta841bb9a2db7f9155f972a9c681df2f91924129b (diff)
p_state: Decrease the size of pipe_box - 24 -> 16 bytestintou/pipe_box
This is a direct port of https://gitlab.freedesktop.org/mesa/mesa/-/commit/3dfe61ed6ec6773c2373ec7a139b7dfe794f60c8
-rw-r--r--src/gallium/include/pipe/p_state.h11
1 files 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;
};