From 20dd75a9268a1adf0a8b47267ba2c5acc55cb207 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Wed, 23 May 2018 22:42:49 -0400 Subject: radeonsi: use storage_samples instead of color_samples in most places MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit and use pipe_resource::nr_storage_samples instead of r600_texture::num_color_samples. Tested-by: Dieter Nützel --- src/gallium/winsys/amdgpu/drm/amdgpu_surface.c | 3 +-- src/gallium/winsys/radeon/drm/radeon_drm_surface.c | 6 ++---- 2 files changed, 3 insertions(+), 6 deletions(-) (limited to 'src/gallium/winsys') diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c b/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c index eaf10349355..2f0d0f28fc1 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c @@ -62,7 +62,6 @@ static int amdgpu_surface_sanity(const struct pipe_resource *tex) static int amdgpu_surface_init(struct radeon_winsys *rws, const struct pipe_resource *tex, - unsigned num_color_samples, unsigned flags, unsigned bpe, enum radeon_surf_mode mode, struct radeon_surf *surf) @@ -86,7 +85,7 @@ static int amdgpu_surface_init(struct radeon_winsys *rws, config.info.depth = tex->depth0; config.info.array_size = tex->array_size; config.info.samples = tex->nr_samples; - config.info.color_samples = num_color_samples; + config.info.storage_samples = tex->nr_storage_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); diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_surface.c b/src/gallium/winsys/radeon/drm/radeon_drm_surface.c index d528a6fe638..fda1ba7870e 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_surface.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_surface.c @@ -282,7 +282,6 @@ static void si_compute_cmask(const struct radeon_info *info, static int radeon_winsys_surface_init(struct radeon_winsys *rws, const struct pipe_resource *tex, - unsigned num_color_samples, unsigned flags, unsigned bpe, enum radeon_surf_mode mode, struct radeon_surf *surf_ws) @@ -330,9 +329,8 @@ static int radeon_winsys_surface_init(struct radeon_winsys *rws, return -1; } - if (radeon_winsys_surface_init(rws, &templ, num_color_samples, - fmask_flags, bpe, RADEON_SURF_MODE_2D, - &fmask)) { + if (radeon_winsys_surface_init(rws, &templ, fmask_flags, bpe, + RADEON_SURF_MODE_2D, &fmask)) { fprintf(stderr, "Got error in surface_init while allocating FMASK.\n"); return -1; } -- cgit v1.2.3