radeonsi: improve rounding of zmin

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12389>
This commit is contained in:
Filip Gawin 2021-08-16 13:13:43 +02:00 committed by Marge Bot
parent 9e6f414766
commit e6d996f8ff
1 changed files with 1 additions and 1 deletions

View File

@ -476,7 +476,7 @@ static uint32_t si_get_htile_clear_value(struct si_texture *tex, float depth)
const uint32_t smem = 0;
/* Convert depthValue to 14-bit zmin/zmax uint values. */
const uint32_t zmin = (depth * max_z_value) + 0.5f;
const uint32_t zmin = lroundf(depth * max_z_value);
const uint32_t zmax = zmin;
if (tex->htile_stencil_disabled) {