anv: Fix the size/aperture space debug printouts to consider _ccs_size.
authorEmma Anholt <emma@anholt.net>
Mon, 9 Jan 2023 17:32:01 +0000 (09:32 -0800)
committerMarge Bot <emma+marge@anholt.net>
Wed, 11 Jan 2023 00:35:34 +0000 (00:35 +0000)
It's added in at anv_bo_vma_alloc_or_close(), so count it here too.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20540>

src/intel/vulkan/anv_batch_chain.c

index decc374..e426032 100644 (file)
@@ -1840,10 +1840,11 @@ anv_queue_exec_locked(struct anv_queue *queue,
               (float)total_size_kb / 1024.0f);
       for (uint32_t i = 0; i < execbuf.bo_count; i++) {
          const struct anv_bo *bo = execbuf.bos[i];
+         uint64_t size = bo->size + bo->_ccs_size;
 
          fprintf(stderr, "   BO: addr=0x%016"PRIx64"-0x%016"PRIx64" size=0x%010"PRIx64
                  " handle=%05u capture=%u name=%s\n",
-                 bo->offset, bo->offset + bo->size - 1, bo->size, bo->gem_handle,
+                 bo->offset, bo->offset + size - 1, size, bo->gem_handle,
                  (bo->flags & EXEC_OBJECT_CAPTURE) != 0, bo->name);
       }
    }