radv: fix missing ZRANGE_PRECISION(1) for GFX9+
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 8 Jun 2018 15:59:49 +0000 (17:59 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Sat, 9 Jun 2018 08:57:01 +0000 (10:57 +0200)
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 <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_device.c

index 68bd1757824e06adfb6e798c2030e48bf95976f5..5936b43093e1603586154a1aec829b761795df6b 100644 (file)
@@ -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);