[Mesa-dev] [PATCH 15/39] gallium/util: Implement util_format_translate_3D

Emil Velikov emil.l.velikov at gmail.com
Mon May 16 18:16:44 UTC 2016


On 15 May 2016 at 11:45, Axel Davy <axel.davy at ens.fr> wrote:
> This is the equivalent of util_format_translate,
> but for volumes.
>
Nitpick: If you can wrap these ~72 that'll be great.

> Signed-off-by: Axel Davy <axel.davy at ens.fr>
> ---
>  src/gallium/auxiliary/util/u_format.c | 34 ++++++++++++++++++++++++++++++++++
>  src/gallium/auxiliary/util/u_format.h | 13 +++++++++++++
>  2 files changed, 47 insertions(+)
>
> diff --git a/src/gallium/auxiliary/util/u_format.c b/src/gallium/auxiliary/util/u_format.c
> index 34df01d..c0fda6f 100644
> --- a/src/gallium/auxiliary/util/u_format.c
> +++ b/src/gallium/auxiliary/util/u_format.c
> @@ -739,6 +739,40 @@ util_format_translate(enum pipe_format dst_format,
>     return TRUE;
>  }
>
> +boolean
> +util_format_translate_3D(enum pipe_format dst_format,
Use lower-case 3d - util_format_translate_3d

> +                         void *dst, unsigned dst_stride,
> +                         unsigned dst_slice_stride,
> +                         unsigned dst_x, unsigned dst_y,
> +                         unsigned dst_z,
> +                         enum pipe_format src_format,
> +                         const void *src, unsigned src_stride,
> +                         unsigned src_slice_stride,
> +                         unsigned src_x, unsigned src_y,
> +                         unsigned src_z, unsigned width,
> +                         unsigned height, unsigned depth)
> +{
> +   uint8_t *dst_layer;
> +   const uint8_t *src_layer;
> +   unsigned z;
Please add a blank line between variable declarations and code.

Thanks
Emil


More information about the mesa-dev mailing list