Mesa (staging/20.0): gallium: let the pipe drivers decide the supported modifiers

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Feb 7 17:36:20 UTC 2020


Module: Mesa
Branch: staging/20.0
Commit: 51f7d81dd25d7a77f481507d6dd0f0c08ba09de5
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=51f7d81dd25d7a77f481507d6dd0f0c08ba09de5

Author: James Xiong <james.xiong at intel.com>
Date:   Wed Jan 22 15:52:25 2020 -0800

gallium: let the pipe drivers decide the supported modifiers

fixes: ac0219cc5b ("gallium: dmabuf support for yuv formats that are not natively supported")

Signed-off-by: James Xiong <james.xiong at intel.com>
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3527>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3527>
(cherry picked from commit 205ce0bea5e14a855a86f8b9662ba34cdd372280)

---

 .pick_status.json                     | 2 +-
 src/gallium/state_trackers/dri/dri2.c | 8 ++------
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index cdb37d8ab0c..d1a98b1ada7 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -328,7 +328,7 @@
         "description": "gallium: let the pipe drivers decide the supported modifiers",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": "ac0219cc5b6afa6d0392a164b58e21ce95079930"
     },
diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c
index 05ebb4ef1d7..8b4402a74aa 100644
--- a/src/gallium/state_trackers/dri/dri2.c
+++ b/src/gallium/state_trackers/dri/dri2.c
@@ -1395,15 +1395,11 @@ dri2_query_dma_buf_modifiers(__DRIscreen *_screen, int fourcc, int max,
        (pscreen->is_format_supported(pscreen, format, screen->target, 0, 0,
                                      PIPE_BIND_RENDER_TARGET) ||
         pscreen->is_format_supported(pscreen, format, screen->target, 0, 0,
-                                     PIPE_BIND_SAMPLER_VIEW))) {
+                                     PIPE_BIND_SAMPLER_VIEW) ||
+        dri2_yuv_dma_buf_supported(screen, map))) {
       pscreen->query_dmabuf_modifiers(pscreen, format, max, modifiers,
                                       external_only, count);
       return true;
-   } else if (dri2_yuv_dma_buf_supported(screen, map)) {
-      *count = 1;
-      if (modifiers)
-         modifiers[0] = DRM_FORMAT_MOD_NONE;
-      return true;
    }
    return false;
 }



More information about the mesa-commit mailing list