From 7c43c2ac49bb0db2602682ade2936b7cdb100586 Mon Sep 17 00:00:00 2001 From: Paulo Zanoni Date: Wed, 3 May 2023 14:54:55 -0700 Subject: [PATCH] iris: also avoid isl_memcpy_linear_to_tiled for Tile64 Just like we avoid it for Tile4, avoid it for Tile64. We can't easily notice this problem since Tile4 is preferred over Tile64, but if we patch isl_surf_choose_tiling() to choose Tile64 over Tile4, then we start getting more than 1600 failures in CI. These are the two most common error messages: ../src/gallium/drivers/iris/iris_resource.c:2168: get_image_offset_el: Assertion `z0_el == 0 && a0_el == 0' failed. ../src/intel/isl/isl_tiled_memcpy.c:857: linear_to_tiled: Assertion `!"" "unsupported tiling"' failed. Reviewed-by: Nanley Chery Signed-off-by: Paulo Zanoni Part-of: --- src/gallium/drivers/iris/iris_resource.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c index 17003c5707c..68f5a43c3e0 100644 --- a/src/gallium/drivers/iris/iris_resource.c +++ b/src/gallium/drivers/iris/iris_resource.c @@ -2634,8 +2634,8 @@ iris_transfer_map(struct pipe_context *ctx, if (prefer_cpu_access(res, box, usage, level, map_would_stall)) usage |= PIPE_MAP_DIRECTLY; - /* TODO: Teach iris_map_tiled_memcpy about Tile4... */ - if (res->surf.tiling == ISL_TILING_4) + /* TODO: Teach iris_map_tiled_memcpy about Tile4 and Tile64... */ + if (res->surf.tiling == ISL_TILING_4 || res->surf.tiling == ISL_TILING_64) usage &= ~PIPE_MAP_DIRECTLY; if (!(usage & PIPE_MAP_DIRECTLY)) { @@ -2760,10 +2760,11 @@ iris_texture_subdata(struct pipe_context *ctx, * take that path if we need the GPU to perform color compression, or * stall-avoidance blits. * - * TODO: Teach isl_memcpy_linear_to_tiled about Tile4... + * TODO: Teach isl_memcpy_linear_to_tiled about Tile4 and Tile64... */ if (surf->tiling == ISL_TILING_LINEAR || surf->tiling == ISL_TILING_4 || + surf->tiling == ISL_TILING_64 || isl_aux_usage_has_compression(res->aux.usage) || resource_is_busy(ice, res) || iris_bo_mmap_mode(res->bo) == IRIS_MMAP_NONE) {