radv: improve rounding of zmin

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12388>
This commit is contained in:
Filip Gawin
2021-08-16 13:02:50 +02:00
committed by Marge Bot
parent 5ec6b6e9bb
commit 46d0126deb

View File

@@ -888,7 +888,7 @@ radv_get_htile_fast_clear_value(const struct radv_device *device, const struct r
uint32_t zmin, zmax;
/* Convert the depth value to 14-bit zmin/zmax values. */
zmin = ((value.depth * max_zval) + 0.5f);
zmin = lroundf(value.depth * max_zval);
zmax = zmin;
if (radv_image_tile_stencil_disabled(device, image)) {