diff options
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/r600/r600_texture.c | 8 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/radeon_winsys.h | 1 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_texture.c | 4 | ||||
-rw-r--r-- | src/gallium/winsys/amdgpu/drm/amdgpu_surface.c | 2 | ||||
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_surface.c | 6 |
5 files changed, 13 insertions, 8 deletions
diff --git a/src/gallium/drivers/r600/r600_texture.c b/src/gallium/drivers/r600/r600_texture.c index c39c00c2e3e..f86a12c4688 100644 --- a/src/gallium/drivers/r600/r600_texture.c +++ b/src/gallium/drivers/r600/r600_texture.c @@ -245,8 +245,8 @@ static int r600_init_surface(struct r600_common_screen *rscreen, if (!(ptex->flags & R600_RESOURCE_FLAG_FORCE_TILING)) flags |= RADEON_SURF_OPTIMIZE_FOR_SPACE; - r = rscreen->ws->surface_init(rscreen->ws, ptex, flags, bpe, - array_mode, surface); + r = rscreen->ws->surface_init(rscreen->ws, ptex, ptex->nr_samples, + flags, bpe, array_mode, surface); if (r) { return r; } @@ -616,8 +616,8 @@ void r600_texture_get_fmask_info(struct r600_common_screen *rscreen, bpe *= 2; } - if (rscreen->ws->surface_init(rscreen->ws, &templ, flags, bpe, - RADEON_SURF_MODE_2D, &fmask)) { + if (rscreen->ws->surface_init(rscreen->ws, &templ, templ.nr_samples, + flags, bpe, RADEON_SURF_MODE_2D, &fmask)) { R600_ERR("Got error in surface_init while allocating FMASK.\n"); return; } diff --git a/src/gallium/drivers/radeon/radeon_winsys.h b/src/gallium/drivers/radeon/radeon_winsys.h index fae4fb7a95d..abf70ce762b 100644 --- a/src/gallium/drivers/radeon/radeon_winsys.h +++ b/src/gallium/drivers/radeon/radeon_winsys.h @@ -649,6 +649,7 @@ struct radeon_winsys { */ int (*surface_init)(struct radeon_winsys *ws, const struct pipe_resource *tex, + unsigned num_color_samples, unsigned flags, unsigned bpe, enum radeon_surf_mode mode, struct radeon_surf *surf); diff --git a/src/gallium/drivers/radeonsi/si_texture.c b/src/gallium/drivers/radeonsi/si_texture.c index 81a70153f32..1e328b90b62 100644 --- a/src/gallium/drivers/radeonsi/si_texture.c +++ b/src/gallium/drivers/radeonsi/si_texture.c @@ -301,8 +301,8 @@ static int si_init_surface(struct si_screen *sscreen, if (!(ptex->flags & SI_RESOURCE_FLAG_FORCE_TILING)) flags |= RADEON_SURF_OPTIMIZE_FOR_SPACE; - r = sscreen->ws->surface_init(sscreen->ws, ptex, flags, bpe, - array_mode, surface); + r = sscreen->ws->surface_init(sscreen->ws, ptex, ptex->nr_samples, + flags, bpe, array_mode, surface); if (r) { return r; } diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c b/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c index b5a1ebb1628..d5fa37bb6d9 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_surface.c @@ -62,6 +62,7 @@ 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) @@ -85,6 +86,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.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 61220ed7fe3..4677a3bea7c 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_surface.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_surface.c @@ -222,6 +222,7 @@ static void surf_drm_to_winsys(struct radeon_drm_winsys *ws, 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) @@ -269,8 +270,9 @@ static int radeon_winsys_surface_init(struct radeon_winsys *rws, return -1; } - if (radeon_winsys_surface_init(rws, &templ, fmask_flags, bpe, - RADEON_SURF_MODE_2D, &fmask)) { + if (radeon_winsys_surface_init(rws, &templ, num_color_samples, + fmask_flags, bpe, RADEON_SURF_MODE_2D, + &fmask)) { fprintf(stderr, "Got error in surface_init while allocating FMASK.\n"); return -1; } |