gallium: decrease the size of pipe_surface - 48 -> 40 bytes
authorMarek Olšák <marek.olsak@amd.com>
Sat, 1 Apr 2017 23:46:11 +0000 (01:46 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 4 Apr 2017 09:14:43 +0000 (11:14 +0200)
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/include/pipe/p_state.h

index 62f51926792ede8d561a9f24cd88dc33a564acde..a4692b60968f255753e9fd757d6c9676604ccaab 100644 (file)
@@ -407,15 +407,14 @@ union pipe_surface_desc {
 struct pipe_surface
 {
    struct pipe_reference reference;
+   enum pipe_format format:16;
+   unsigned writable:1;          /**< writable shader resource */
    struct pipe_resource *texture; /**< resource into which this is a view  */
    struct pipe_context *context; /**< context this surface belongs to */
-   enum pipe_format format;
 
    /* XXX width/height should be removed */
-   unsigned width;               /**< logical width in pixels */
-   unsigned height;              /**< logical height in pixels */
-
-   unsigned writable:1;          /**< writable shader resource */
+   uint16_t width;               /**< logical width in pixels */
+   uint16_t height;              /**< logical height in pixels */
 
    union pipe_surface_desc u;
 };