diff options
author | Marek Olšák <[email protected]> | 2017-12-11 19:27:39 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-12-25 14:23:02 +0100 |
commit | 986e467e4c5c9610a01b0176c02c2310ed019ae8 (patch) | |
tree | c608a5876e4cb8b17319bfba760ebfb7cd622c16 /src/gallium/drivers/radeon | |
parent | 70b5e85fc3a79214b4f25db0e6d8fcc32d62a2f1 (diff) |
gallium/util: add util_num_layers helper
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r-- | src/gallium/drivers/radeon/r600_texture.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeon/r600_texture.c b/src/gallium/drivers/radeon/r600_texture.c index 66d4f02622f..34b3ab0cdeb 100644 --- a/src/gallium/drivers/radeon/r600_texture.c +++ b/src/gallium/drivers/radeon/r600_texture.c @@ -513,7 +513,7 @@ static void r600_reallocate_texture_inplace(struct r600_common_context *rctx, u_box_3d(0, 0, 0, u_minify(templ.width0, i), u_minify(templ.height0, i), - util_max_layer(&templ, i) + 1, &box); + util_num_layers(&templ, i), &box); rctx->dma_copy(&rctx->b, &new_tex->resource.b.b, i, 0, 0, 0, &rtex->resource.b.b, i, &box); @@ -935,7 +935,7 @@ void si_texture_get_cmask_info(struct si_screen *sscreen, out->slice_tile_max -= 1; out->alignment = MAX2(256, base_align); - out->size = (util_max_layer(&rtex->resource.b.b, 0) + 1) * + out->size = util_num_layers(&rtex->resource.b.b, 0) * align(slice_bytes, base_align); } @@ -1014,7 +1014,7 @@ static void r600_texture_get_htile_size(struct si_screen *sscreen, rtex->surface.htile_alignment = base_align; rtex->surface.htile_size = - (util_max_layer(&rtex->resource.b.b, 0) + 1) * + util_num_layers(&rtex->resource.b.b, 0) * align(slice_bytes, base_align); } @@ -1333,7 +1333,7 @@ r600_texture_create_object(struct pipe_screen *screen, fprintf(stderr, "VM start=0x%"PRIX64" end=0x%"PRIX64" | Texture %ix%ix%i, %i levels, %i samples, %s\n", rtex->resource.gpu_address, rtex->resource.gpu_address + rtex->resource.buf->size, - base->width0, base->height0, util_max_layer(base, 0)+1, base->last_level+1, + base->width0, base->height0, util_num_layers(base, 0), base->last_level+1, base->nr_samples ? base->nr_samples : 1, util_format_short_name(base->format)); } |