Re: [Mesa-dev] [PATCH 00/14] BSD portability (Meson, ANV, RADV, VC4/5, SWR)

2018-01-05 Thread Dylan Baker
Thanks so much for working on this, especially the meson bits!

Quoting Greg V (2017-12-31 08:55:14)
> Hello everyone and happy new year! :)
> 
> This set of patches makes the Meson build work on FreeBSD, including 
> RADV, ANV, wayland-egl, VAAPI, VDPAU.
> 
> I also managed to get SWR working, but I haven't included the CPU 
> topology detection code in here. CPU topology is exposed as XML on 
> FreeBSD, so my implementation uses TinyXML2, which is a new dependency.
> And I couldn't even figure out how to link to it with all the libtool
> stuff. Had to test it with LD_PRELOAD :D
> This will be much easier to do with Meson.
> 
> Greg V (14):
>   util: fix ElfW macro
>   vc4, vc5: add ETIME fallback define
>   radv: add ETIME fallback define
>   anv: add ETIME fallback define
>   anv: use POSIX sysconf to get memory info on non-glibc systems
>   anv: remove unused Linux-specific include
>   anv: FreeBSD support in the allocator
>   meson: fix BSD build
>   meson: do not redeclare pkg-config dependencies (yet)
>   meson: handle LLVM 'x.x.xgit-revision' versions
>   meson: fix missing dependencies
>   swr: build on FreeBSD/DragonFlyBSD
>   swr: fix clang 5 null cast warning
>   meson: glsl: add missing nir header dependency
> 
>  meson.build| 74 
> --
>  src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c  |  3 +
>  src/compiler/glsl/meson.build  |  2 +-
>  src/gallium/drivers/radeonsi/meson.build   |  2 +-
>  src/gallium/drivers/swr/rasterizer/common/os.h |  3 +-
>  .../drivers/swr/rasterizer/core/threads.cpp|  4 +-
>  .../swr/rasterizer/memory/TilingFunctions.h|  6 +-
>  src/gallium/drivers/swr/swr_fence.cpp  |  2 +
>  src/gallium/drivers/vc4/vc4_bufmgr.c   |  4 ++
>  src/gallium/drivers/vc5/vc5_bufmgr.c   |  4 ++
>  src/intel/vulkan/anv_allocator.c   | 56 
>  src/intel/vulkan/anv_device.c  | 11 
>  src/intel/vulkan/anv_gem.c |  4 ++
>  src/intel/vulkan/anv_queue.c   |  5 +-
>  src/mesa/meson.build   |  1 +
>  src/util/build_id.c|  6 +-
>  16 files changed, 144 insertions(+), 43 deletions(-)
> 
> -- 
> 2.15.1
> 
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


signature.asc
Description: signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 00/14] BSD portability (Meson, ANV, RADV, VC4/5, SWR)

2018-01-17 Thread Dylan Baker
Just wanted to see how things were going on this, especially for the meson bits
as I'd like to get them merged before the 18.0 merge window closes.

Quoting Greg V (2017-12-31 08:55:14)
> Hello everyone and happy new year! :)
> 
> This set of patches makes the Meson build work on FreeBSD, including 
> RADV, ANV, wayland-egl, VAAPI, VDPAU.
> 
> I also managed to get SWR working, but I haven't included the CPU 
> topology detection code in here. CPU topology is exposed as XML on 
> FreeBSD, so my implementation uses TinyXML2, which is a new dependency.
> And I couldn't even figure out how to link to it with all the libtool
> stuff. Had to test it with LD_PRELOAD :D
> This will be much easier to do with Meson.
> 
> Greg V (14):
>   util: fix ElfW macro
>   vc4, vc5: add ETIME fallback define
>   radv: add ETIME fallback define
>   anv: add ETIME fallback define
>   anv: use POSIX sysconf to get memory info on non-glibc systems
>   anv: remove unused Linux-specific include
>   anv: FreeBSD support in the allocator
>   meson: fix BSD build
>   meson: do not redeclare pkg-config dependencies (yet)
>   meson: handle LLVM 'x.x.xgit-revision' versions
>   meson: fix missing dependencies
>   swr: build on FreeBSD/DragonFlyBSD
>   swr: fix clang 5 null cast warning
>   meson: glsl: add missing nir header dependency
> 
>  meson.build| 74 
> --
>  src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c  |  3 +
>  src/compiler/glsl/meson.build  |  2 +-
>  src/gallium/drivers/radeonsi/meson.build   |  2 +-
>  src/gallium/drivers/swr/rasterizer/common/os.h |  3 +-
>  .../drivers/swr/rasterizer/core/threads.cpp|  4 +-
>  .../swr/rasterizer/memory/TilingFunctions.h|  6 +-
>  src/gallium/drivers/swr/swr_fence.cpp  |  2 +
>  src/gallium/drivers/vc4/vc4_bufmgr.c   |  4 ++
>  src/gallium/drivers/vc5/vc5_bufmgr.c   |  4 ++
>  src/intel/vulkan/anv_allocator.c   | 56 
>  src/intel/vulkan/anv_device.c  | 11 
>  src/intel/vulkan/anv_gem.c |  4 ++
>  src/intel/vulkan/anv_queue.c   |  5 +-
>  src/mesa/meson.build   |  1 +
>  src/util/build_id.c|  6 +-
>  16 files changed, 144 insertions(+), 43 deletions(-)
> 
> -- 
> 2.15.1
> 
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


signature.asc
Description: signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 00/14] BSD portability (Meson, ANV, RADV, VC4/5, SWR)

2018-01-18 Thread Greg V

On 01/17/2018 00:59, Dylan Baker wrote:

Just wanted to see how things were going on this, especially for the meson bits
as I'd like to get them merged before the 18.0 merge window closes.
Sorry for the delay, was distracted by other things :) Edited the meson 
patches and re-sent them to the list.

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


Re: [Mesa-dev] [PATCH 00/14] BSD portability (Meson, ANV, RADV, VC4/5, SWR)

2018-01-18 Thread Dylan Baker
No worries, December is a busy time of year.

Quoting Greg V (2018-01-17 12:57:39)
> On 01/17/2018 00:59, Dylan Baker wrote:
> > Just wanted to see how things were going on this, especially for the meson 
> > bits
> > as I'd like to get them merged before the 18.0 merge window closes.
> Sorry for the delay, was distracted by other things :) Edited the meson 
> patches and re-sent them to the list.


signature.asc
Description: signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 00/14] BSD portability (Meson, ANV, RADV, VC4/5, SWR)

2018-01-18 Thread Emil Velikov
Hi Greg,

On 31 December 2017 at 16:55, Greg V  wrote:
> Hello everyone and happy new year! :)
>
> This set of patches makes the Meson build work on FreeBSD, including
> RADV, ANV, wayland-egl, VAAPI, VDPAU.
>
> I also managed to get SWR working, but I haven't included the CPU
> topology detection code in here. CPU topology is exposed as XML on
> FreeBSD, so my implementation uses TinyXML2, which is a new dependency.
> And I couldn't even figure out how to link to it with all the libtool
> stuff. Had to test it with LD_PRELOAD :D
> This will be much easier to do with Meson.
>
> Greg V (14):
>   util: fix ElfW macro
>   vc4, vc5: add ETIME fallback define
>   radv: add ETIME fallback define
>   anv: add ETIME fallback define
>   anv: use POSIX sysconf to get memory info on non-glibc systems
>   anv: remove unused Linux-specific include
>   anv: FreeBSD support in the allocator
>   meson: fix BSD build
>   meson: do not redeclare pkg-config dependencies (yet)
>   meson: handle LLVM 'x.x.xgit-revision' versions
>   meson: fix missing dependencies
>   swr: build on FreeBSD/DragonFlyBSD
>   swr: fix clang 5 null cast warning
>   meson: glsl: add missing nir header dependency
>
Huge thanks for beating these into shape and sending them.

Based on the sysconf patch it seems like the series isn't based again master.
Can you please rebase?

I've made a few suggestions about moving stuff into helpers, although
those are not a requirement.
We can merge the current ones, as long as you promise to address fix
them up as follow-up ;-)

It would be amazing if FreeBSD used the ETIME fallback in their
toolchain. Otherwise things break quite often, as you can see.
That's more of a dream of mine, so don't read too much into it.

Thanks
Emil
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 00/14] BSD portability (Meson, ANV, RADV, VC4/5, SWR)

2018-01-18 Thread Greg V


On 01/18/2018 21:18, Emil Velikov wrote:

Hi Greg,

On 31 December 2017 at 16:55, Greg V  wrote:

Hello everyone and happy new year! :)

This set of patches makes the Meson build work on FreeBSD, including
RADV, ANV, wayland-egl, VAAPI, VDPAU.

Huge thanks for beating these into shape and sending them.

Based on the sysconf patch it seems like the series isn't based again master.
Can you please rebase?

I've made a few suggestions about moving stuff into helpers, although
those are not a requirement.
We can merge the current ones, as long as you promise to address fix
them up as follow-up ;-)

I'm working on the helpers, yeah.

I've rebased and updated the meson patches, sent as v2.
I'll send everything else as v2 with the helpers stuff.

Sorry if I'm doing something wrong with series and stuff, I'm still a 
bit confused with this patch emailing thing, I'm used to GitHub and 
similar services :)



It would be amazing if FreeBSD used the ETIME fallback in their
toolchain. Otherwise things break quite often, as you can see.
That's more of a dream of mine, so don't read too much into it.

Did you get Dylan's reply about defining ETIME in meson/autotools?
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 00/14] BSD portability (Meson, ANV, RADV, VC4/5, SWR)

2018-01-18 Thread Emil Velikov
On 18 January 2018 at 18:29, Greg V  wrote:
>
> On 01/18/2018 21:18, Emil Velikov wrote:
>>
>> Hi Greg,
>>
>> On 31 December 2017 at 16:55, Greg V  wrote:
>>>
>>> Hello everyone and happy new year! :)
>>>
>>> This set of patches makes the Meson build work on FreeBSD, including
>>> RADV, ANV, wayland-egl, VAAPI, VDPAU.
>>
>> Huge thanks for beating these into shape and sending them.
>>
>> Based on the sysconf patch it seems like the series isn't based again
>> master.
>> Can you please rebase?
>>
>> I've made a few suggestions about moving stuff into helpers, although
>> those are not a requirement.
>> We can merge the current ones, as long as you promise to address fix
>> them up as follow-up ;-)
>
> I'm working on the helpers, yeah.
>
> I've rebased and updated the meson patches, sent as v2.
> I'll send everything else as v2 with the helpers stuff.
>
> Sorry if I'm doing something wrong with series and stuff, I'm still a bit
> confused with this patch emailing thing, I'm used to GitHub and similar
> services :)
>
No worries - every project is different ;-)

The first google hit for "mesa submitting patches" is the correct one [1].
Although in practise you've handled everything very well, already.

[1] https://www.mesa3d.org/submittingpatches.html

>> It would be amazing if FreeBSD used the ETIME fallback in their
>> toolchain. Otherwise things break quite often, as you can see.
>> That's more of a dream of mine, so don't read too much into it.
>
> Did you get Dylan's reply about defining ETIME in meson/autotools?

AFAICT the approach is semi-magic, hence my day-dreaming on the topic.
I'll try to cook up some magic, but it will be very fragile.

-Emil
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 00/14] BSD portability (Meson, ANV, RADV, VC4/5, SWR)

2018-01-18 Thread Dylan Baker
Quoting Emil Velikov (2018-01-18 10:57:02)
> On 18 January 2018 at 18:29, Greg V  wrote:
> >
> > On 01/18/2018 21:18, Emil Velikov wrote:
> >>
> >> Hi Greg,
> >>
> >> On 31 December 2017 at 16:55, Greg V  wrote:
> >>>
> >>> Hello everyone and happy new year! :)
> >>>
> >>> This set of patches makes the Meson build work on FreeBSD, including
> >>> RADV, ANV, wayland-egl, VAAPI, VDPAU.
> >>
> >> Huge thanks for beating these into shape and sending them.
> >>
> >> Based on the sysconf patch it seems like the series isn't based again
> >> master.
> >> Can you please rebase?
> >>
> >> I've made a few suggestions about moving stuff into helpers, although
> >> those are not a requirement.
> >> We can merge the current ones, as long as you promise to address fix
> >> them up as follow-up ;-)
> >
> > I'm working on the helpers, yeah.
> >
> > I've rebased and updated the meson patches, sent as v2.
> > I'll send everything else as v2 with the helpers stuff.
> >
> > Sorry if I'm doing something wrong with series and stuff, I'm still a bit
> > confused with this patch emailing thing, I'm used to GitHub and similar
> > services :)
> >
> No worries - every project is different ;-)
> 
> The first google hit for "mesa submitting patches" is the correct one [1].
> Although in practise you've handled everything very well, already.
> 
> [1] https://www.mesa3d.org/submittingpatches.html
> 
> >> It would be amazing if FreeBSD used the ETIME fallback in their
> >> toolchain. Otherwise things break quite often, as you can see.
> >> That's more of a dream of mine, so don't read too much into it.
> >
> > Did you get Dylan's reply about defining ETIME in meson/autotools?
> 
> AFAICT the approach is semi-magic, hence my day-dreaming on the topic.
> I'll try to cook up some magic, but it will be very fragile.
> 
> -Emil

I'm willing to defer to you on this, if you think that checking headers for
ETIME is too fragile then we can leave it (you definitely have more experience
in these things). I'm just concerned it's going to turn into an endless
whack-a-mole game.


signature.asc
Description: signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 00/14] BSD portability (Meson, ANV, RADV, VC4/5, SWR)

2018-01-19 Thread Emil Velikov
On 18 January 2018 at 21:30, Dylan Baker  wrote:
> Quoting Emil Velikov (2018-01-18 10:57:02)
>> On 18 January 2018 at 18:29, Greg V  wrote:
>> >
>> > On 01/18/2018 21:18, Emil Velikov wrote:
>> >>
>> >> Hi Greg,
>> >>
>> >> On 31 December 2017 at 16:55, Greg V  wrote:
>> >>>
>> >>> Hello everyone and happy new year! :)
>> >>>
>> >>> This set of patches makes the Meson build work on FreeBSD, including
>> >>> RADV, ANV, wayland-egl, VAAPI, VDPAU.
>> >>
>> >> Huge thanks for beating these into shape and sending them.
>> >>
>> >> Based on the sysconf patch it seems like the series isn't based again
>> >> master.
>> >> Can you please rebase?
>> >>
>> >> I've made a few suggestions about moving stuff into helpers, although
>> >> those are not a requirement.
>> >> We can merge the current ones, as long as you promise to address fix
>> >> them up as follow-up ;-)
>> >
>> > I'm working on the helpers, yeah.
>> >
>> > I've rebased and updated the meson patches, sent as v2.
>> > I'll send everything else as v2 with the helpers stuff.
>> >
>> > Sorry if I'm doing something wrong with series and stuff, I'm still a bit
>> > confused with this patch emailing thing, I'm used to GitHub and similar
>> > services :)
>> >
>> No worries - every project is different ;-)
>>
>> The first google hit for "mesa submitting patches" is the correct one [1].
>> Although in practise you've handled everything very well, already.
>>
>> [1] https://www.mesa3d.org/submittingpatches.html
>>
>> >> It would be amazing if FreeBSD used the ETIME fallback in their
>> >> toolchain. Otherwise things break quite often, as you can see.
>> >> That's more of a dream of mine, so don't read too much into it.
>> >
>> > Did you get Dylan's reply about defining ETIME in meson/autotools?
>>
>> AFAICT the approach is semi-magic, hence my day-dreaming on the topic.
>> I'll try to cook up some magic, but it will be very fragile.
>>
>> -Emil
>
> I'm willing to defer to you on this, if you think that checking headers for
> ETIME is too fragile then we can leave it (you definitely have more experience
> in these things). I'm just concerned it's going to turn into an endless
> whack-a-mole game.

I'll kindly ask Greg to open a bug with FreeBSD on the topic - they
seemed positive on the Elf topic.
Alternatively we can catch most of the fallout via a
check_compile("#include \n main() {return ETIME;}")

Not sure of Meson has an equivalent though.
Emil
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 00/14] BSD portability (Meson, ANV, RADV, VC4/5, SWR)

2018-01-19 Thread Daniel Stone
Hi,

On 19 January 2018 at 16:26, Emil Velikov  wrote:
> On 18 January 2018 at 21:30, Dylan Baker  wrote:
>> I'm willing to defer to you on this, if you think that checking headers for
>> ETIME is too fragile then we can leave it (you definitely have more 
>> experience
>> in these things). I'm just concerned it's going to turn into an endless
>> whack-a-mole game.
>
> I'll kindly ask Greg to open a bug with FreeBSD on the topic - they
> seemed positive on the Elf topic.
> Alternatively we can catch most of the fallout via a
> check_compile("#include \n main() {return ETIME;}")
>
> Not sure of Meson has an equivalent though.

You can do cc.compiles('...') as you said, or as Dylan mentioned
up-thread, the far more direct:
  cc.has.header_symbol('errno.h', 'ETIME')

Cheers,
Daniel
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 00/14] BSD portability (Meson, ANV, RADV, VC4/5, SWR)

2018-01-19 Thread Dylan Baker
Quoting Emil Velikov (2018-01-19 08:26:41)
> On 18 January 2018 at 21:30, Dylan Baker  wrote:
> > Quoting Emil Velikov (2018-01-18 10:57:02)
> >> On 18 January 2018 at 18:29, Greg V  wrote:
> >> >
> >> > On 01/18/2018 21:18, Emil Velikov wrote:
> >> >>
> >> >> Hi Greg,
> >> >>
> >> >> On 31 December 2017 at 16:55, Greg V  
> >> >> wrote:
> >> >>>
> >> >>> Hello everyone and happy new year! :)
> >> >>>
> >> >>> This set of patches makes the Meson build work on FreeBSD, including
> >> >>> RADV, ANV, wayland-egl, VAAPI, VDPAU.
> >> >>
> >> >> Huge thanks for beating these into shape and sending them.
> >> >>
> >> >> Based on the sysconf patch it seems like the series isn't based again
> >> >> master.
> >> >> Can you please rebase?
> >> >>
> >> >> I've made a few suggestions about moving stuff into helpers, although
> >> >> those are not a requirement.
> >> >> We can merge the current ones, as long as you promise to address fix
> >> >> them up as follow-up ;-)
> >> >
> >> > I'm working on the helpers, yeah.
> >> >
> >> > I've rebased and updated the meson patches, sent as v2.
> >> > I'll send everything else as v2 with the helpers stuff.
> >> >
> >> > Sorry if I'm doing something wrong with series and stuff, I'm still a bit
> >> > confused with this patch emailing thing, I'm used to GitHub and similar
> >> > services :)
> >> >
> >> No worries - every project is different ;-)
> >>
> >> The first google hit for "mesa submitting patches" is the correct one [1].
> >> Although in practise you've handled everything very well, already.
> >>
> >> [1] https://www.mesa3d.org/submittingpatches.html
> >>
> >> >> It would be amazing if FreeBSD used the ETIME fallback in their
> >> >> toolchain. Otherwise things break quite often, as you can see.
> >> >> That's more of a dream of mine, so don't read too much into it.
> >> >
> >> > Did you get Dylan's reply about defining ETIME in meson/autotools?
> >>
> >> AFAICT the approach is semi-magic, hence my day-dreaming on the topic.
> >> I'll try to cook up some magic, but it will be very fragile.
> >>
> >> -Emil
> >
> > I'm willing to defer to you on this, if you think that checking headers for
> > ETIME is too fragile then we can leave it (you definitely have more 
> > experience
> > in these things). I'm just concerned it's going to turn into an endless
> > whack-a-mole game.
> 
> I'll kindly ask Greg to open a bug with FreeBSD on the topic - they
> seemed positive on the Elf topic.
> Alternatively we can catch most of the fallout via a
> check_compile("#include \n main() {return ETIME;}")
> 
> Not sure of Meson has an equivalent though.
> Emil

cc.has_header_symbol('ETIME', 'errno.h') != ''

is probably pretty close, we could always code a compile check, but This should
be okay (it just checks that the symbol exists and doesn't care what the symbol
is).


signature.asc
Description: signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 00/14] BSD portability (Meson, ANV, RADV, VC4/5, SWR)

2018-01-19 Thread Dylan Baker
Quoting Daniel Stone (2018-01-19 08:50:17)
> Hi,
> 
> On 19 January 2018 at 16:26, Emil Velikov  wrote:
> > On 18 January 2018 at 21:30, Dylan Baker  wrote:
> >> I'm willing to defer to you on this, if you think that checking headers for
> >> ETIME is too fragile then we can leave it (you definitely have more 
> >> experience
> >> in these things). I'm just concerned it's going to turn into an endless
> >> whack-a-mole game.
> >
> > I'll kindly ask Greg to open a bug with FreeBSD on the topic - they
> > seemed positive on the Elf topic.
> > Alternatively we can catch most of the fallout via a
> > check_compile("#include \n main() {return ETIME;}")
> >
> > Not sure of Meson has an equivalent though.
> 
> You can do cc.compiles('...') as you said, or as Dylan mentioned
> up-thread, the far more direct:
>   cc.has.header_symbol('errno.h', 'ETIME')
> 
> Cheers,
> Daniel

I should really read whole threads before I start responding...


signature.asc
Description: signature
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev