Mesa (staging/21.2): crocus/gen4: restrict memcpy mapping to gen5
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jul 27 18:59:26 UTC 2021
Module: Mesa
Branch: staging/21.2
Commit: 25b71cfa10cca0a041fc58276f607cabcb5c67d1
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=25b71cfa10cca0a041fc58276f607cabcb5c67d1
Author: Dave Airlie <airlied at redhat.com>
Date: Mon Jul 26 15:27:52 2021 +1000
crocus/gen4: restrict memcpy mapping to gen5
This is due to gen4 + 4.5 having some rather strange swizzling
that we can't actually detect properly in userspace
Fixes: f3630548f1da ("crocus: initial gallium driver for Intel gfx 4-7")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12058>
(cherry picked from commit 5bf6ec31ccf6c24a407df9443a534f8036d26861)
---
.pick_status.json | 2 +-
src/gallium/drivers/crocus/crocus_resource.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index a8561fcc48b..70eab4fbc76 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -454,7 +454,7 @@
"description": "crocus/gen4: restrict memcpy mapping to gen5",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": "f3630548f1da904ec6c63b43ece7e68afdb8867e"
},
diff --git a/src/gallium/drivers/crocus/crocus_resource.c b/src/gallium/drivers/crocus/crocus_resource.c
index e81356b1111..f189f1a4f99 100644
--- a/src/gallium/drivers/crocus/crocus_resource.c
+++ b/src/gallium/drivers/crocus/crocus_resource.c
@@ -1577,6 +1577,7 @@ crocus_transfer_map(struct pipe_context *ctx,
struct crocus_context *ice = (struct crocus_context *)ctx;
struct crocus_resource *res = (struct crocus_resource *)resource;
struct isl_surf *surf = &res->surf;
+ struct crocus_screen *screen = (struct crocus_screen *)ctx->screen;
if (usage & PIPE_MAP_DISCARD_WHOLE_RESOURCE) {
/* Replace the backing storage with a fresh buffer for non-async maps */
@@ -1690,7 +1691,7 @@ crocus_transfer_map(struct pipe_context *ctx,
if (surf->tiling == ISL_TILING_W) {
/* TODO: Teach crocus_map_tiled_memcpy about W-tiling... */
crocus_map_s8(map);
- } else if (surf->tiling != ISL_TILING_LINEAR) {
+ } else if (surf->tiling != ISL_TILING_LINEAR && screen->devinfo.ver > 4) {
crocus_map_tiled_memcpy(map);
} else {
crocus_map_direct(map);
More information about the mesa-commit
mailing list