Mesa (master): gallium: decrease the size of pipe_box - 24 -> 16 bytes
Marek Olšák
mareko at kemper.freedesktop.org
Tue Apr 4 10:17:55 UTC 2017
Module: Mesa
Branch: master
Commit: 3dfe61ed6ec6773c2373ec7a139b7dfe794f60c8
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3dfe61ed6ec6773c2373ec7a139b7dfe794f60c8
Author: Marek Olšák <marek.olsak at amd.com>
Date: Sun Apr 2 02:00:49 2017 +0200
gallium: decrease the size of pipe_box - 24 -> 16 bytes
Also:
pipe_transfer: 48 -> 40 bytes.
pipe_blit_info = 176 -> 160 bytes.
v2: add a comment at pipe_box
Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
Reviewed-by: Brian Paul <brianp at vmware.com>
---
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 392bb8b502..dc2b329f7a 100644
--- a/src/gallium/include/pipe/p_state.h
+++ b/src/gallium/include/pipe/p_state.h
@@ -478,12 +478,15 @@ struct pipe_image_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;
};
More information about the mesa-commit
mailing list