[Mesa-stable] [Mesa-dev] [PATCH 1/1] vulkan/wsi/x11: Fix properly check if the system has DRI_MODIFIERS
Bas Nieuwenhuizen
bas at basnieuwenhuizen.nl
Fri May 4 21:22:22 UTC 2018
On Thu, May 3, 2018 at 8:10 PM, mercuriete <mercuriete at gmail.com> wrote:
> From: Abel Garcia Dorta <mercuriete at gmail.com>
>
> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=106180
>
> Fixes: c80c08e226 "vulkan/wsi/x11: Add support for DRI3 v1.2"
>
> Cc: <mesa-stable at lists.freedesktop.org>
> ---
> src/vulkan/wsi/wsi_common_x11.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/src/vulkan/wsi/wsi_common_x11.c b/src/vulkan/wsi/wsi_common_x11.c
> index 3a00caddfb..ee7b247ee1 100644
> --- a/src/vulkan/wsi/wsi_common_x11.c
> +++ b/src/vulkan/wsi/wsi_common_x11.c
> @@ -1055,10 +1055,7 @@ x11_image_init(VkDevice device_h, struct x11_swapchain *chain,
> image->pixmap = xcb_generate_id(chain->conn);
>
> #ifdef HAVE_DRI3_MODIFIERS
> - if (image->base.drm_modifier != DRM_FORMAT_MOD_INVALID) {
> - /* If the image has a modifier, we must have DRI3 v1.2. */
> - assert(chain->has_dri3_modifiers);
> -
> + if (chain->has_dri3_modifiers && image->base.drm_modifier != DRM_FORMAT_MOD_INVALID) {
I strongly suspect this is not the right fix, as it seems to be an
invariant we are trying to keep that if has_dri3_modifiers is false,
then the modifier has to be DRM_FORMAT_MOD_INVALID. So the question
is why are we still getting a modifier.
> cookie =
> xcb_dri3_pixmap_from_buffers_checked(chain->conn,
> image->pixmap,
> --
> 2.16.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-stable
mailing list