[Mesa-dev] [PATCH] radeonsi: don't enable surf index on shareable images.

Marek Olšák maraeo at gmail.com
Fri Aug 11 18:18:39 UTC 2017


On Fri, Aug 11, 2017 at 6:35 AM, Dave Airlie <airlied at gmail.com> wrote:
> From: Dave Airlie <airlied at redhat.com>
>
> This fixes the SteamVR menus, which were broken by this feature.

That's impossible. RADEON_SURF_SHAREABLE is already checked by
ac_surface.c. This patch is a no-op change.

Marek

>
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  src/gallium/winsys/amdgpu/drm/amdgpu_surface.c | 15 +++++++++------
>  1 file changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c b/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c
> index 99e4d77..2cbff58 100644
> --- a/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c
> +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c
> @@ -97,12 +97,15 @@ static int amdgpu_surface_init(struct radeon_winsys *rws,
>      * always use consecutive surface indices when FMASK is allocated between
>      * them.
>      */
> -   if (flags & RADEON_SURF_FMASK)
> -      config.info.surf_index = &ws->surf_index_fmask;
> -   else if (!(flags & RADEON_SURF_Z_OR_SBUFFER))
> -      config.info.surf_index = &ws->surf_index_color;
> -   else
> -      config.info.surf_index = NULL;
> +   if (!(flags & RADEON_SURF_SHAREABLE)) {
> +     if (flags & RADEON_SURF_FMASK)
> +       config.info.surf_index = &ws->surf_index_fmask;
> +     else if (!(flags & RADEON_SURF_Z_OR_SBUFFER))
> +       config.info.surf_index = &ws->surf_index_color;
> +     else
> +       config.info.surf_index = NULL;
> +   } else
> +     config.info.surf_index = NULL;
>
>     return ac_compute_surface(ws->addrlib, &ws->info, &config, mode, surf);
>  }
> --
> 2.9.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