Mesa (master): gallium/vl: Set modifier field for winsys handle.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Nov 20 15:41:33 UTC 2020


Module: Mesa
Branch: master
Commit: 27612984a4d414d118d97ab17a9b2f66235d0884
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=27612984a4d414d118d97ab17a9b2f66235d0884

Author: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
Date:   Fri Nov 20 01:22:33 2020 +0100

gallium/vl: Set modifier field for winsys handle.

Fixes: c786150d ("radeonsi: Add modifier support")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3821
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7700>

---

 src/gallium/auxiliary/vl/vl_winsys_dri.c  | 3 +++
 src/gallium/auxiliary/vl/vl_winsys_dri3.c | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/src/gallium/auxiliary/vl/vl_winsys_dri.c b/src/gallium/auxiliary/vl/vl_winsys_dri.c
index 524f9f3a162..ceaa784b903 100644
--- a/src/gallium/auxiliary/vl/vl_winsys_dri.c
+++ b/src/gallium/auxiliary/vl/vl_winsys_dri.c
@@ -52,6 +52,8 @@
 #include "vl/vl_compositor.h"
 #include "vl/vl_winsys.h"
 
+#include "drm-uapi/drm_fourcc.h"
+
 struct vl_dri_screen
 {
    struct vl_screen base;
@@ -234,6 +236,7 @@ vl_dri2_screen_texture_from_drawable(struct vl_screen *vscreen, void *drawable)
    dri2_handle.type = WINSYS_HANDLE_TYPE_SHARED;
    dri2_handle.handle = back_left->name;
    dri2_handle.stride = back_left->pitch;
+   dri2_handle.modifier = DRM_FORMAT_MOD_INVALID;
 
    memset(&templ, 0, sizeof(templ));
    templ.target = PIPE_TEXTURE_2D;
diff --git a/src/gallium/auxiliary/vl/vl_winsys_dri3.c b/src/gallium/auxiliary/vl/vl_winsys_dri3.c
index 45a979e1bf6..8d5ad005367 100644
--- a/src/gallium/auxiliary/vl/vl_winsys_dri3.c
+++ b/src/gallium/auxiliary/vl/vl_winsys_dri3.c
@@ -45,6 +45,8 @@
 #include "vl/vl_compositor.h"
 #include "vl/vl_winsys.h"
 
+#include "drm-uapi/drm_fourcc.h"
+
 #define BACK_BUFFER_NUM 3
 
 struct vl_dri3_buffer
@@ -492,6 +494,7 @@ dri3_get_front_buffer(struct vl_dri3_screen *scrn)
    whandle.type = WINSYS_HANDLE_TYPE_FD;
    whandle.handle = (unsigned)fds[0];
    whandle.stride = bp_reply->stride;
+   whandle.modifier = DRM_FORMAT_MOD_INVALID;
    memset(&templ, 0, sizeof(templ));
    templ.bind = PIPE_BIND_RENDER_TARGET | PIPE_BIND_SAMPLER_VIEW;
    templ.format = vl_dri2_format_for_depth(&scrn->base, bp_reply->depth);



More information about the mesa-commit mailing list