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

Emil Velikov emil.l.velikov at gmail.com
Sat Jun 4 23:29:46 UTC 2016


On 5 June 2016 at 00:12, Dave Airlie <airlied at gmail.com> wrote:
> On 5 June 2016 at 08:51, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>> On 4 June 2016 at 21:55, 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
>>>
>> This is what we had in first place, only to realise that it makes
>> things fragile and the resulting, non git archive, tarballs were
>> broken.
>>
>> I can see where you're coming from with this but it isn't the right
>> solution, I'm afraid. Yes the patch that 'broke' it is a bandaid, yes
>> it is a hack. The proper fix is the one Jason mentioned - stop using
>> CPP to parse things.
>>
>> If we are to have this, it should be in master only, with a big fat
>> WARNING. Both in the commit message and the makefile.
>
> Until its fixed properly, maybe just make building tarballs error out
> if the two defines aren't
> present, so it isn't fragile,
Hmm I guess we can do that - it feels like stacking band-aids, but
let's hope it won't be needed for long.

> but we should be able to build from git
> without wayland headers.
>
It shouldn't require something you've not explicitly requested, yes.

Thanks
Emil


More information about the mesa-dev mailing list