[prev in list] [next in list] [prev in thread] [next in thread]
List: mesa3d-dev
Subject: Re: [Mesa-dev] [PATCH] panfrost: Only tag AFBC addresses when sampling
From: Alyssa Rosenzweig <alyssa.rosenzweig () collabora ! com>
Date: 2019-06-28 13:17:00
Message-ID: 20190628131700.GA3180 () kevin
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
R-b, *blush*
On Fri, Jun 28, 2019 at 09:27:34AM +0200, Tomeu Vizoso wrote:
> Rendering to AFBC was broken, as the HW will complaint loudly if we pass
> a tagged pointer in bifrost_render_target.
>
> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
> Fixes: 3609b50a6443 ("panfrost: Merge AFBC slab with BO backing")
> ---
> src/gallium/drivers/panfrost/pan_context.c | 8 +++++++-
> src/gallium/drivers/panfrost/pan_resource.c | 7 +------
> 2 files changed, 8 insertions(+), 7 deletions(-)
>
> diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
> index 967d7116c249..be800ca6ce1c 100644
> --- a/src/gallium/drivers/panfrost/pan_context.c
> +++ b/src/gallium/drivers/panfrost/pan_context.c
> @@ -834,6 +834,11 @@ panfrost_upload_tex(
> unsigned first_layer = pview->u.tex.first_layer;
> unsigned last_layer = pview->u.tex.last_layer;
>
> + /* Lower-bit is set when sampling from colour AFBC */
> + bool is_afbc = rsrc->bo->layout == PAN_AFBC;
> + bool is_zs = rsrc->base.bind & PIPE_BIND_DEPTH_STENCIL;
> + unsigned afbc_bit = (is_afbc && !is_zs) ? 1 : 0;
> +
> /* Inject the addresses in, interleaving mip levels, cube faces, and
> * strides in that order */
>
> @@ -841,8 +846,9 @@ panfrost_upload_tex(
>
> for (unsigned l = first_level; l <= last_level; ++l) {
> for (unsigned f = first_layer; f <= last_layer; ++f) {
> +
> view->hw.payload[idx++] =
> - panfrost_get_texture_address(rsrc, l, f);
> + panfrost_get_texture_address(rsrc, l, f) + afbc_bit;
>
> if (has_manual_stride) {
> view->hw.payload[idx++] =
> diff --git a/src/gallium/drivers/panfrost/pan_resource.c b/src/gallium/drivers/panfrost/pan_resource.c
> index c5bda8093206..8db7e45af1b6 100644
> --- a/src/gallium/drivers/panfrost/pan_resource.c
> +++ b/src/gallium/drivers/panfrost/pan_resource.c
> @@ -756,12 +756,7 @@ panfrost_get_texture_address(
> unsigned level_offset = rsrc->bo->slices[level].offset;
> unsigned face_offset = face * rsrc->bo->cubemap_stride;
>
> - /* Lower-bit is set when sampling from colour AFBC */
> - bool is_afbc = rsrc->bo->layout == PAN_AFBC;
> - bool is_zs = rsrc->base.bind & PIPE_BIND_DEPTH_STENCIL;
> - unsigned afbc_bit = (is_afbc && !is_zs) ? 1 : 0;
> -
> - return rsrc->bo->gpu + level_offset + face_offset + afbc_bit;
> + return rsrc->bo->gpu + level_offset + face_offset;
> }
>
> static void
> --
> 2.20.1
>
["signature.asc" (application/pgp-signature)]
[Attachment #6 (text/plain)]
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic