Module: Mesa
Branch: main
Commit: 5c30d462b9b7e0ad89771bf7271cd89ad2a25a54
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=5c30d462b9b7e0ad89771bf7271cd89ad2a25a54

Author: Timur Kristóf <[email protected]>
Date:   Wed Oct  4 21:50:47 2023 +0200

radv: Disable HTILE on exclusive images with transfer queues when SDMA doesn't 
support it.

Signed-off-by: Timur Kristóf <[email protected]>
Reviewed-by: Samuel Pitoiset <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25834>

---

 src/amd/vulkan/radv_image.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c
index 07d6dea71af..ec9f1364b2f 100644
--- a/src/amd/vulkan/radv_image.c
+++ b/src/amd/vulkan/radv_image.c
@@ -2325,6 +2325,12 @@ bool
 radv_layout_is_htile_compressed(const struct radv_device *device, const struct 
radv_image *image, VkImageLayout layout,
                                 unsigned queue_mask)
 {
+   /* Don't compress exclusive images used on transfer queues when SDMA 
doesn't support HTILE.
+    * Note that HTILE is already disabled on concurrent images when not 
supported.
+    */
+   if (queue_mask == BITFIELD_BIT(RADV_QUEUE_TRANSFER) && 
!device->physical_device->rad_info.sdma_supports_compression)
+      return false;
+
    switch (layout) {
    case VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL:
    case VK_IMAGE_LAYOUT_DEPTH_ATTACHMENT_OPTIMAL:

Reply via email to