diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/radeon/r600_texture.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index 3fa5f5eaa97..933a4a9bbe9 100644 --- a/src/gallium/drivers/radeon/r600_texture.c +++ b/src/gallium/drivers/radeon/r600_texture.c @@ -2485,8 +2485,11 @@ void vi_dcc_clear_level(struct r600_common_context *rctx, assert(rtex->resource.b.b.nr_samples <= 1); clear_size = rtex->surface.dcc_size; } else { + unsigned num_layers = util_max_layer(&rtex->resource.b.b, level) + 1; + dcc_offset += rtex->surface.u.legacy.level[level].dcc_offset; - clear_size = rtex->surface.u.legacy.level[level].dcc_fast_clear_size; + clear_size = rtex->surface.u.legacy.level[level].dcc_fast_clear_size * + num_layers; } rctx->clear_buffer(&rctx->b, dcc_buffer, dcc_offset, clear_size, |