[Mesa-dev] [PATCH] radv: don't decompress HTILE for 16-bit depth surfaces on GFX8
Samuel Pitoiset
samuel.pitoiset at gmail.com
Tue Dec 11 21:05:22 UTC 2018
GFX8 only natively supports TC-compatible HTILE for 32-bit surfaces,
while GFX9 also supports 16-bit surfaces. Though, it's possible
to enable it for 16-bit depth surfaces if no Z planes are
compressed and the driver does that.
However, it appears that trying to decompress such a surface
ends up by reporting VM faults. This is probably because the
hardware uses 32-bit instead of 16-bit. Anyways, decompressing
a surface when no Z planes are compressed is just dumb.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107563
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
src/amd/vulkan/radv_meta_decompress.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/amd/vulkan/radv_meta_decompress.c b/src/amd/vulkan/radv_meta_decompress.c
index fe8e114e91b..952765b16db 100644
--- a/src/amd/vulkan/radv_meta_decompress.c
+++ b/src/amd/vulkan/radv_meta_decompress.c
@@ -330,8 +330,15 @@ static void radv_process_depth_image_inplace(struct radv_cmd_buffer *cmd_buffer,
struct radv_meta_state *meta_state = &cmd_buffer->device->meta_state;
VkPipeline pipeline_h;
- if (!radv_image_has_htile(image))
+ if (!radv_image_has_htile(image) ||
+ /* Don't decompress HTILE for 16-bit depth surfaces that are
+ * TC-compatible because no Z planes are compressed on GFX8.
+ */
+ (cmd_buffer->device->physical_device->rad_info.chip_class == VI &&
+ radv_image_is_tc_compat_htile(image) &&
+ image->vk_format == VK_FORMAT_D16_UNORM)) {
return;
+ }
if (!meta_state->depth_decomp[samples_log2].decompress_pipeline) {
VkResult ret = create_pipeline(cmd_buffer->device, VK_NULL_HANDLE, samples,
--
2.20.0
More information about the mesa-dev
mailing list