diff options
Diffstat (limited to 'src/amd/vulkan/radv_device.c')
-rw-r--r-- | src/amd/vulkan/radv_device.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 22500bfc130..9c82fd059f8 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -3615,12 +3615,22 @@ radv_calc_decompress_on_z_planes(struct radv_device *device, max_zplanes = max_zplanes + 1; } else { - if (iview->image->info.samples <= 1) - max_zplanes = 5; - else if (iview->image->info.samples <= 4) - max_zplanes = 3; - else - max_zplanes = 2; + if (iview->vk_format == VK_FORMAT_D16_UNORM) { + /* Do not enable Z plane compression for 16-bit depth + * surfaces because isn't supported on GFX8. Only + * 32-bit depth surfaces are supported by the hardware. + * This allows to maintain shader compatibility and to + * reduce the number of depth decompressions. + */ + max_zplanes = 1; + } else { + if (iview->image->info.samples <= 1) + max_zplanes = 5; + else if (iview->image->info.samples <= 4) + max_zplanes = 3; + else + max_zplanes = 2; + } } return max_zplanes; |