[Mesa-dev] [PATCH 2/2] winsys/amdgpu: remove RADEON_SURF_FMASK leftover

Marek Olšák maraeo at gmail.com
Thu Jul 5 21:02:53 UTC 2018


From: Marek Olšák <marek.olsak at amd.com>

RADEON_SURF_FMASK is never set.
---
 src/gallium/winsys/amdgpu/drm/amdgpu_surface.c | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c b/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c
index d5fa37bb6d9..eaf10349355 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c
@@ -89,26 +89,23 @@ static int amdgpu_surface_init(struct radeon_winsys *rws,
    config.info.color_samples = num_color_samples;
    config.info.levels = tex->last_level + 1;
    config.info.num_channels = util_format_get_nr_components(tex->format);
    config.is_3d = !!(tex->target == PIPE_TEXTURE_3D);
    config.is_cube = !!(tex->target == PIPE_TEXTURE_CUBE);
 
    /* Use different surface counters for color and FMASK, so that MSAA MRTs
     * 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;
-
+   config.info.surf_index = &ws->surf_index_color;
    config.info.fmask_surf_index = &ws->surf_index_fmask;
 
+   if (flags & RADEON_SURF_Z_OR_SBUFFER)
+      config.info.surf_index = NULL;
+
    return ac_compute_surface(ws->addrlib, &ws->info, &config, mode, surf);
 }
 
 void amdgpu_surface_init_functions(struct amdgpu_winsys *ws)
 {
    ws->base.surface_init = amdgpu_surface_init;
 }
-- 
2.17.1



More information about the mesa-dev mailing list