Mesa (staging/21.2): crocus: Honor scanout requirement from DRI

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Oct 11 16:26:39 UTC 2021


Module: Mesa
Branch: staging/21.2
Commit: d48f92406306bea5941546659abf2ecf40fa0b39
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d48f92406306bea5941546659abf2ecf40fa0b39

Author: Dave Airlie <airlied at redhat.com>
Date:   Fri Oct  8 08:35:19 2021 +1000

crocus: Honor scanout requirement from DRI

Translate PIPE_BIND_SCANOUT as ISL_SURF_USAGE_DISPLAY_BIT,
instead of PIPE_BIND_DISPLAY_TARGET.

PIPE_BIND_DISPLAY_TARGET isn't used for dri images and seem to
be set only for fake winsys buffers (which aren't displayed).
The trouble is that a fake buffer could be multisampled and we
cannot have multisampled surface with display bit.

Ported from iris 82b46667836647226387442b2feb9d7f1475bd36

Fixes: f3630548f1da ("crocus: initial gallium driver for Intel gfx 4-7")
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Reviewed-by: Emma Anholt <emma at anholt.net>
Tested-by: Jason Ekstrand <jason at jlekstrand.net>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5464
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13260>
(cherry picked from commit 40fdb35c651d982cdf727721dc46c29c928b2853)

---

 .pick_status.json                            | 2 +-
 src/gallium/drivers/crocus/crocus_resource.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 86996fb0565..65b18e397df 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -652,7 +652,7 @@
         "description": "crocus: Honor scanout requirement from DRI",
         "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 2c8ea3a6529..56b517a28b6 100644
--- a/src/gallium/drivers/crocus/crocus_resource.c
+++ b/src/gallium/drivers/crocus/crocus_resource.c
@@ -162,7 +162,7 @@ pipe_bind_to_isl_usage(unsigned bindings)
    if (bindings & (PIPE_BIND_SHADER_IMAGE | PIPE_BIND_SHADER_BUFFER))
       usage |= ISL_SURF_USAGE_STORAGE_BIT;
 
-   if (bindings & PIPE_BIND_DISPLAY_TARGET)
+   if (bindings & PIPE_BIND_SCANOUT)
       usage |= ISL_SURF_USAGE_DISPLAY_BIT;
    return usage;
 }



More information about the mesa-commit mailing list