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

Author: Sagar Ghuge <[email protected]>
Date:   Thu Oct 12 10:53:07 2023 -0700

blorp: Use the correct miptail start LOD for surfaces

Use the correct miptail start LOD for the surfaces involved in the
XY_BLOCK_COPY_BLT/XY_FAST_COLOR_BLT instructions.

Thanks to Lionel for pointing out the issue.

Fixes: 46f45d62d1 ("intel/isl: Start using miptails")

Signed-off-by: Sagar Ghuge <[email protected]>
Reviewed-by: Lionel Landwerlin <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25688>

---

 src/intel/blorp/blorp_genX_exec.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/intel/blorp/blorp_genX_exec.h 
b/src/intel/blorp/blorp_genX_exec.h
index 77ffaaa5d20..70aa7584ce9 100644
--- a/src/intel/blorp/blorp_genX_exec.h
+++ b/src/intel/blorp/blorp_genX_exec.h
@@ -2469,7 +2469,7 @@ blorp_xy_block_copy_blt(struct blorp_batch *batch,
          params->dst.view.base_array_layer + params->dst.z_offset;
       blt.DestinationSurfaceQPitch = isl_get_qpitch(dst_surf) >> 2;
       blt.DestinationLOD = params->dst.view.base_level;
-      blt.DestinationMipTailStartLOD = 15;
+      blt.DestinationMipTailStartLOD = dst_surf->miptail_start_level;
       blt.DestinationHorizontalAlign = isl_encode_halign(dst_align.width);
       blt.DestinationVerticalAlign = isl_encode_valign(dst_align.height);
       blt.DestinationDepthStencilResource = false;
@@ -2504,7 +2504,7 @@ blorp_xy_block_copy_blt(struct blorp_batch *batch,
          params->src.view.base_array_layer + params->src.z_offset;
       blt.SourceSurfaceQPitch = isl_get_qpitch(src_surf) >> 2;
       blt.SourceLOD = params->src.view.base_level;
-      blt.SourceMipTailStartLOD = 15;
+      blt.SourceMipTailStartLOD = src_surf->miptail_start_level;
       blt.SourceHorizontalAlign = isl_encode_halign(src_align.width);
       blt.SourceVerticalAlign = isl_encode_valign(src_align.height);
       blt.SourceDepthStencilResource = false;
@@ -2587,7 +2587,7 @@ blorp_xy_fast_color_blit(struct blorp_batch *batch,
          params->dst.view.base_array_layer + params->dst.z_offset;
       blt.DestinationSurfaceQPitch = isl_get_qpitch(dst_surf) >> 2;
       blt.DestinationLOD = params->dst.view.base_level;
-      blt.DestinationMipTailStartLOD = 15;
+      blt.DestinationMipTailStartLOD = dst_surf->miptail_start_level;
       blt.DestinationHorizontalAlign = isl_encode_halign(dst_align.width);
       blt.DestinationVerticalAlign = isl_encode_valign(dst_align.height);
       blt.DestinationDepthStencilResource = false;

Reply via email to