Mesa (main): v3dv: TFU destination must be UIF

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Mar 18 13:38:23 UTC 2022


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

Author: Iago Toral Quiroga <itoral at igalia.com>
Date:   Tue Mar 15 08:37:44 2022 +0100

v3dv: TFU destination must be UIF

We had some code that considered the possibility that the destination
might be linear when configuring TFU jobs, but we never actually allow
for this to happen since we avoid hitting these paths in that case, as
the TFU always produces UIF results. Instead, add an assert when
producing the TFU packet to ensure we are expecting a UIF result.

Reviewed-by: Alejandro Piñeiro <apinheiro at igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15342>

---

 src/broadcom/vulkan/v3dv_meta_copy.c    | 9 +++------
 src/broadcom/vulkan/v3dvx_meta_common.c | 3 +++
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/broadcom/vulkan/v3dv_meta_copy.c b/src/broadcom/vulkan/v3dv_meta_copy.c
index 290390f586f..937d152f22b 100644
--- a/src/broadcom/vulkan/v3dv_meta_copy.c
+++ b/src/broadcom/vulkan/v3dv_meta_copy.c
@@ -864,8 +864,7 @@ copy_image_tfu(struct v3dv_cmd_buffer *cmd_buffer,
          dst->mem->bo->handle,
          dst_offset,
          dst_slice->tiling,
-         dst_slice->tiling == V3D_TILING_RASTER ?
-                              dst_slice->stride : dst_slice->padded_height,
+         dst_slice->padded_height,
          dst->cpp,
          src->mem->bo->handle,
          src_offset,
@@ -1371,8 +1370,7 @@ copy_buffer_to_image_tfu(struct v3dv_cmd_buffer *cmd_buffer,
              dst_bo->handle,
              dst_offset,
              slice->tiling,
-             slice->tiling == V3D_TILING_RASTER ?
-                              slice->stride : slice->padded_height,
+             slice->padded_height,
              image->cpp,
              src_bo->handle,
              src_offset,
@@ -2896,8 +2894,7 @@ blit_tfu(struct v3dv_cmd_buffer *cmd_buffer,
          dst->mem->bo->handle,
          dst_offset,
          dst_slice->tiling,
-         dst_slice->tiling == V3D_TILING_RASTER ?
-                              dst_slice->stride : dst_slice->padded_height,
+         dst_slice->padded_height,
          dst->cpp,
          src->mem->bo->handle,
          src_offset,
diff --git a/src/broadcom/vulkan/v3dvx_meta_common.c b/src/broadcom/vulkan/v3dvx_meta_common.c
index 55ad2bd74a2..8b2e1612715 100644
--- a/src/broadcom/vulkan/v3dvx_meta_common.c
+++ b/src/broadcom/vulkan/v3dvx_meta_common.c
@@ -881,6 +881,9 @@ v3dX(meta_emit_tfu_job)(struct v3dv_cmd_buffer *cmd_buffer,
       break;
    }
 
+   /* The TFU can handle raster sources but always produces UIF results */
+   assert(dst_tiling != V3D_TILING_RASTER);
+
    /* If we're writing level 0 (!IOA_DIMTW), then we need to supply the
     * OPAD field for the destination (how many extra UIF blocks beyond
     * those necessary to cover the height).



More information about the mesa-commit mailing list