projects
/
platform
/
upstream
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9e6f414
)
radeonsi: improve rounding of zmin
author
Filip Gawin
<filip.gawin@zoho.com>
Mon, 16 Aug 2021 11:13:43 +0000
(13:13 +0200)
committer
Marge Bot
<eric+marge@anholt.net>
Tue, 17 Aug 2021 01:09:51 +0000
(
01:09
+0000)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12389>
src/gallium/drivers/radeonsi/si_clear.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/radeonsi/si_clear.c
b/src/gallium/drivers/radeonsi/si_clear.c
index
7f236fe
..
48283c0
100644
(file)
--- a/
src/gallium/drivers/radeonsi/si_clear.c
+++ b/
src/gallium/drivers/radeonsi/si_clear.c
@@
-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) {