[Mesa-dev] [PATCH 6/9] gallium: decrease the size of pipe_box - 24 -> 16 bytes

Alex Deucher alexdeucher at gmail.com
Mon Apr 3 15:11:53 UTC 2017


On Sun, Apr 2, 2017 at 2:00 PM, Marek Olšák <maraeo at gmail.com> wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> Also:
>
> pipe_transfer: 48 -> 40 bytes.
> pipe_blit_info = 176 -> 160 bytes.
> ---
>  src/gallium/include/pipe/p_state.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
> index 392bb8b..6a147ef 100644
> --- a/src/gallium/include/pipe/p_state.h
> +++ b/src/gallium/include/pipe/p_state.h
> @@ -472,25 +472,25 @@ struct pipe_image_view
>     } u;
>  };
>
>
>  /**
>   * Subregion of 1D/2D/3D image resource.
>   */
>  struct pipe_box
>  {
>     int x;
> -   int y;
> -   int z;
> +   int16_t y;
> +   int16_t z;
>     int width;
> -   int height;
> -   int depth;
> +   int16_t height;
> +   int16_t depth;
>  };

Not specific to this patch per se, but will this cause any issues in
the future as max surface sizes supported by hw increase?  I feel like
we'll need to change this back at some point.

Alex

>
>
>  /**
>   * A memory object/resource such as a vertex buffer or texture.
>   */
>  struct pipe_resource
>  {
>     struct pipe_reference reference;
>     struct pipe_screen *screen; /**< screen that this texture belongs to */
> --
> 2.7.4
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list