diff options
author | Marek Olšák <[email protected]> | 2018-06-21 22:54:59 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-06-25 18:33:58 -0400 |
commit | 166250f4e5486e1e44ed97a8ab2ee0691e41cfa1 (patch) | |
tree | 9e3688cc2c5c468a563594a7d8f7e1897fb67c3f /src/gallium/drivers/radeonsi/si_clear.c | |
parent | 3da693b7d98782437c25b1f6c2d0efb3a398246b (diff) |
radeonsi: move CMASK size computation into ac_surface
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_clear.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_clear.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/gallium/drivers/radeonsi/si_clear.c b/src/gallium/drivers/radeonsi/si_clear.c index 53c255c5808..2054e753530 100644 --- a/src/gallium/drivers/radeonsi/si_clear.c +++ b/src/gallium/drivers/radeonsi/si_clear.c @@ -42,24 +42,20 @@ static void si_alloc_separate_cmask(struct si_screen *sscreen, assert(tex->cmask.size == 0); - si_texture_get_cmask_info(sscreen, tex, &tex->cmask); - if (!tex->cmask.size) + if (!tex->surface.cmask_size) return; tex->cmask_buffer = si_aligned_buffer_create(&sscreen->b, SI_RESOURCE_FLAG_UNMAPPABLE, PIPE_USAGE_DEFAULT, - tex->cmask.size, - tex->cmask.alignment); - if (tex->cmask_buffer == NULL) { - tex->cmask.size = 0; + tex->surface.cmask_size, + tex->surface.cmask_alignment); + if (tex->cmask_buffer == NULL) return; - } - /* update colorbuffer state bits */ + tex->cmask.size = tex->surface.cmask_size; tex->cmask.base_address_reg = tex->cmask_buffer->gpu_address >> 8; - tex->cb_color_info |= S_028C70_FAST_CLEAR(1); p_atomic_inc(&sscreen->compressed_colortex_counter); |