gallium: decrease the size of pipe_box - 24 -> 16 bytes
authorMarek Olšák <marek.olsak@amd.com>
Sun, 2 Apr 2017 00:00:49 +0000 (02:00 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 4 Apr 2017 09:14:43 +0000 (11:14 +0200)
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@amd.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/include/pipe/p_state.h

index 392bb8b502d081a6e86f9128839505d207a37313..dc2b329f7a2cb45d9916f1e8dd72467d121202a8 100644 (file)
@@ -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;
 };