From 4e35eb1d699ebacad14dce2ff8d9992e3c06def2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sat, 20 Mar 2021 00:59:50 -0400 Subject: [PATCH] radeonsi: set better default depth clear value Acked-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_texture.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gallium/drivers/radeonsi/si_texture.c b/src/gallium/drivers/radeonsi/si_texture.c index ac244dbb840..386a5e5262d 100644 --- a/src/gallium/drivers/radeonsi/si_texture.c +++ b/src/gallium/drivers/radeonsi/si_texture.c @@ -918,6 +918,11 @@ static struct si_texture *si_texture_create_object(struct pipe_screen *screen, tex->is_depth = util_format_has_depth(util_format_description(tex->buffer.b.b.format)); tex->surface = *surface; + /* Use 1.0 as the default clear value to get optimal ZRANGE_PRECISION if we don't + * get a fast clear. + */ + tex->depth_clear_value = 1.0; + /* On GFX8, HTILE uses different tiling depending on the TC_COMPATIBLE_HTILE * setting, so we have to enable it if we enabled it at allocation. *