From 94706f0de4a0bb73634ce7333d4182559504a107 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Fri, 8 Jun 2018 17:59:49 +0200 Subject: [PATCH] radv: fix missing ZRANGE_PRECISION(1) for GFX9+ ZRANGE_PRECISION(1) seems to be the default optimal value, but it was only set for VI and older chips. This fixes a rendering issue with Banished through DXVK, and might fix more than that. There is still the ZRANGE_PRECISION bug that we need to handle but that can be fixed later. Cc: mesa-stable@lists.freedesktop.org Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- src/amd/vulkan/radv_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 68bd1757824..5936b43093e 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -3969,7 +3969,8 @@ radv_initialise_ds_surface(struct radv_device *device, ds->db_z_info = S_028038_FORMAT(format) | S_028038_NUM_SAMPLES(util_logbase2(iview->image->info.samples)) | S_028038_SW_MODE(iview->image->surface.u.gfx9.surf.swizzle_mode) | - S_028038_MAXMIP(iview->image->info.levels - 1); + S_028038_MAXMIP(iview->image->info.levels - 1) | + S_028038_ZRANGE_PRECISION(1); ds->db_stencil_info = S_02803C_FORMAT(stencil_format) | S_02803C_SW_MODE(iview->image->surface.u.gfx9.stencil.swizzle_mode); -- 2.30.2