[Mesa-dev] [PATCH] anv/entrypoints: don't go using wayland/xcb unless they are configured

Jason Ekstrand jason at jlekstrand.net
Sat Jun 4 20:59:12 UTC 2016


On Sat, Jun 4, 2016 at 1:55 PM, Dave Airlie <airlied at gmail.com> wrote:

> From: Dave Airlie <airlied at redhat.com>
>
> The fix in:
> anv: let anv_entrypoints_gen.py generate proper Wayland/Xcb guards
>
> breaks things if wayland headers aren't installed.
>
> Separate things out properly to avoid that problem.
>
> Reported-by: Arjan van de Ven
> Signed-off-by: Dave Airlie <airlied at redhat.com>
> ---
>  src/intel/vulkan/Makefile.am | 14 +++++++++++---
>  1 file changed, 11 insertions(+), 3 deletions(-)
>
> diff --git a/src/intel/vulkan/Makefile.am b/src/intel/vulkan/Makefile.am
> index 3294fa4..0efcc4d 100644
> --- a/src/intel/vulkan/Makefile.am
> +++ b/src/intel/vulkan/Makefile.am
> @@ -124,11 +124,19 @@ VULKAN_LIB_DEPS += \
>  nodist_EXTRA_libvulkan_intel_la_SOURCES = dummy.cpp
>  libvulkan_intel_la_SOURCES = $(VULKAN_GEM_FILES)
>
> -VULKAN_ENTRYPOINT_CPPFLAGS = \
> -       $(XCB_DRI3_CFLAGS) \
> +VULKAN_ENTRYPOINT_CPPFLAGS =
> +
> +if HAVE_PLATFORM_WAYLAND
> +VULKAN_ENTRYPOINT_CPPFLAGS += \
>         $(WAYLAND_CFLAGS) \
> -       -DVK_USE_PLATFORM_XCB_KHR \
>         -DVK_USE_PLATFORM_WAYLAND_KHR
> +endif
> +
> +if HAVE_PLATFORM_X11
> +VULKAN_ENTRYPOINT_CPPFLAGS += \
> +       $(XCB_DRI3_CFLAGS) \
> +       -DVK_USE_PLATFORM_XCB_KHR
> +endif
>

We should probably put these in the "if HAVE_PLATFORM_FOO" sections above
rather than repeating it.  Other than that, this LGTM.  I think long-term,
we just need to make the generator less stupid but this does the trick for
now.  With things in the proper sections,

Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

The sad part is that we've now come full-circle.  This is more-or-less what
we had when I first merged in the driver.  :-(

--Jason


>
>  anv_entrypoints.h : anv_entrypoints_gen.py $(vulkan_include_HEADERS)
>         $(AM_V_GEN)$(CPP) $(VULKAN_ENTRYPOINT_CPPFLAGS)
> $(top_srcdir)/include/vulkan/vulkan_intel.h |\
> --
> 2.5.5
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20160604/99b45c14/attachment-0001.html>


More information about the mesa-dev mailing list