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:
parent
9e6f414766
commit
e6d996f8ff
|
@ -476,7 +476,7 @@ static uint32_t si_get_htile_clear_value(struct si_texture *tex, float depth)
|
||||||
const uint32_t smem = 0;
|
const uint32_t smem = 0;
|
||||||
|
|
||||||
/* Convert depthValue to 14-bit zmin/zmax uint values. */
|
/* 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;
|
const uint32_t zmax = zmin;
|
||||||
|
|
||||||
if (tex->htile_stencil_disabled) {
|
if (tex->htile_stencil_disabled) {
|
||||||
|
|
Loading…
Reference in New Issue