[Mesa-dev] [PATCH 14/14] winsys/amdgpu: avoid flushed depth when possible

Marek Olšák maraeo at gmail.com
Sat Jul 2 16:42:41 UTC 2016


I made comments on patches 3 and 11. With those addressed, patches
1-4, 6-14 are:

Reviewed-by: Marek Olšák <marek.olsak at amd.com>

Marek

On Fri, Jul 1, 2016 at 4:25 PM, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
> From: Nicolai Hähnle <nicolai.haehnle at amd.com>
>
> If a depth/stencil texture has no mipmaps, we can always get a layout that is
> compatible with DB and TC.
> ---
>  src/gallium/winsys/amdgpu/drm/amdgpu_surface.c | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c b/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c
> index cafa75d..66a3534 100644
> --- a/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c
> +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c
> @@ -373,10 +373,15 @@ static int amdgpu_surface_init(struct radeon_winsys *rws,
>     AddrSurfInfoIn.flags.noStencil = (surf->flags & RADEON_SURF_SBUFFER) == 0;
>     AddrSurfInfoIn.flags.compressZ = AddrSurfInfoIn.flags.depth;
>
> -   /* TODO: update addrlib to a newer version, remove this, and
> -    * set flags.matchStencilTileCfg = 1 to fix stencil texturing.
> +   /* noStencil = 0 can result in a depth part that is incompatible with
> +    * texturing. So set noStencil = 1 when mipmaps are requested (in this case,
> +    * we end up setting stencil_adjusted when required).
> +    *
> +    * TODO: update addrlib to a newer version, remove this, and
> +    * use flags.matchStencilTileCfg = 1 as an alternative fix.
>      */
> -   AddrSurfInfoIn.flags.noStencil = 1;
> +  if (surf->last_level > 0)
> +      AddrSurfInfoIn.flags.noStencil = 1;
>
>     /* Set preferred macrotile parameters. This is usually required
>      * for shared resources. This is for 2D tiling only. */
> --
> 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