On 5 June 2016 at 08:51, Emil Velikov <emil.l.veli...@gmail.com> wrote:
> On 4 June 2016 at 21:55, Dave Airlie <airl...@gmail.com> wrote:
>> From: Dave Airlie <airl...@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 <airl...@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, but we should be able to build from git
without wayland headers.

Dave.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to