Mesa (staging/20.2): freedreno: Disallow tiled if SHARED and not QCOM_COMPRESSED
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Mon Nov 2 16:09:38 UTC 2020
Module: Mesa
Branch: staging/20.2
Commit: bfa8ac8c675b4536bc4eb86f054ed25586aabb8b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=bfa8ac8c675b4536bc4eb86f054ed25586aabb8b
Author: Rob Clark <robdclark at chromium.org>
Date: Sun Oct 25 14:13:38 2020 -0700
freedreno: Disallow tiled if SHARED and not QCOM_COMPRESSED
If the user is not aware of modifiers, and wants to allocate a shared
resource, we shouldn't leave them with tiled.
Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3678
Signed-off-by: Rob Clark <robdclark at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7308>
(cherry picked from commit 67238f95b52024b4e4b2acd0f750c15317ca3778)
---
.pick_status.json | 2 +-
src/gallium/drivers/freedreno/freedreno_resource.c | 6 +++++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 37ecee0a0af..842de7b272a 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -40,7 +40,7 @@
"description": "freedreno: Disallow tiled if SHARED and not QCOM_COMPRESSED",
"nominated": true,
"nomination_type": 0,
- "resolution": 0,
+ "resolution": 1,
"master_sha": null,
"because_sha": null
},
diff --git a/src/gallium/drivers/freedreno/freedreno_resource.c b/src/gallium/drivers/freedreno/freedreno_resource.c
index 17543842ca0..9c2f900502b 100644
--- a/src/gallium/drivers/freedreno/freedreno_resource.c
+++ b/src/gallium/drivers/freedreno/freedreno_resource.c
@@ -933,8 +933,12 @@ fd_resource_create_with_modifiers(struct pipe_screen *pscreen,
* should.)
*/
bool allow_ubwc = drm_find_modifier(DRM_FORMAT_MOD_INVALID, modifiers, count);
- if (tmpl->bind & PIPE_BIND_SHARED)
+ if (tmpl->bind & PIPE_BIND_SHARED) {
allow_ubwc = drm_find_modifier(DRM_FORMAT_MOD_QCOM_COMPRESSED, modifiers, count);
+ if (!allow_ubwc) {
+ linear = true;
+ }
+ }
allow_ubwc &= !(fd_mesa_debug & FD_DBG_NOUBWC);
More information about the mesa-commit
mailing list