[Mesa-dev] [PATCH] intel/blorp_blit: Simplify uncompressed level0 extent assignment
Jason Ekstrand
jason at jlekstrand.net
Mon Sep 26 21:17:58 UTC 2016
I think this is correct given that this function is never called on a
multisampled image. We should add an assert(samples == 1) somewhere just
to be clear.
On Sep 26, 2016 11:53 AM, "Nanley Chery" <nanleychery at gmail.com> wrote:
> These values are the same. Avoid the extra computation.
>
> Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
> ---
> src/intel/blorp/blorp_blit.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/src/intel/blorp/blorp_blit.c b/src/intel/blorp/blorp_blit.c
> index af46389..1c878e8 100644
> --- a/src/intel/blorp/blorp_blit.c
> +++ b/src/intel/blorp/blorp_blit.c
> @@ -1774,15 +1774,12 @@ surf_convert_to_uncompressed(const struct
> isl_device *isl_dev,
> *x /= fmtl->bw;
> *y /= fmtl->bh;
>
> - info->surf.logical_level0_px.width =
> - DIV_ROUND_UP(info->surf.logical_level0_px.width, fmtl->bw);
> - info->surf.logical_level0_px.height =
> - DIV_ROUND_UP(info->surf.logical_level0_px.height, fmtl->bh);
> -
> assert(info->surf.phys_level0_sa.width % fmtl->bw == 0);
> assert(info->surf.phys_level0_sa.height % fmtl->bh == 0);
> info->surf.phys_level0_sa.width /= fmtl->bw;
> info->surf.phys_level0_sa.height /= fmtl->bh;
> + info->surf.logical_level0_px.width = info->surf.phys_level0_sa.width;
> + info->surf.logical_level0_px.height = info->surf.phys_level0_sa.
> height;
>
> assert(info->tile_x_sa % fmtl->bw == 0);
> assert(info->tile_y_sa % fmtl->bh == 0);
> --
> 2.10.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160926/5978f295/attachment.html>
More information about the mesa-dev
mailing list