Re: [Mesa-dev] [PATCH 00/23] Megadrivers galore

2014-06-27 Thread Emil Velikov
On 17/06/14 19:38, Emil Velikov wrote:
> Hi all,
> 
> As a follow up to the static/shared pipe-drivers series here is the final
> series (if anyone is interested I may take a look at egl + opencl) of
> refactoring the gallium dri targets into a single library/provider.
> 
> In a nutshell:
>  - Convert one target per patch.
>  - Merge the drm and sw backends of our dri state-tracker.
>  - Adds __driDriverGetExtensions_$drivername symbol for each driver.
>  - Megadrivers.
>  - ***
>  - Profit.
> 
> Things works like a charm for nouveau and swrast, and testing on other
> platforms is greatly appreciated.
> 
> The complete series can be found in the static-or-shared-pipe-drivers-v2
> branch at my github repo.
> 
> I would like to get this reviewed/pushed over the next month, although
> that depends on the number of bugs that come up with the previous batch.
> 
"megadrivers" for vdpau, xvmc, omx, xa... progressing nicely thus far, so...

My next plan is to have patches
 - 1-10 (convert all hw dri drivers) committed mid next week, and
 - 11-23 (squash dridrm/drisw and convert swrast) roughly a week after that.

The updated series (merged on top of gallium dri3) can be found at branch
static-or-shared-pipe-drivers-v3 in https://github.com/evelikov/Mesa/

Last but not least, big thanks to Thomas Helland for testing and catching a
few silly bugs, and Rob Clark for confirming that nothing breaks on freedreno.

Cheers,
Emil

> As always comments, suggestions and flame is welcome.
> 
> Cheers,
> Emil
> 
> Emil Velikov (23):
>   targets/dri-swrast: use drm aware dricommon when building more than 
> swrast
>   st/dri: Allow separate dri-targets
>   st/dri/drm: Add a second libdridrm library
>   targets/dri-nouveau: Convert to static/shared pipe-drivers
>   targets/(r300|r600|radeonsi)/dri: Convert to static/shared pipe-drivers
>   targets/dri-freedreno: Convert to static/shared pipe-drivers
>   targets/dri-i915: Convert to static/shared pipe-drivers
>   targets/dri-ilo: Convert to static/shared pipe-driver
>   targets/dri-vmwgfx: Convert to static/shared pipe-drivers
>   st/dri: Remove the old libdridrm library
>   targets/dri: Add __driDriverGetExtensions_nouveau symbol
>   targets/dri: Add __driDriverGetExtensions_(r300|r600|radeonsi) symbols
>   targets/dri: Add __driDriverGetExtensions_freedreno symbol
>   targets/dri: Add __driDriverGetExtensions_i915 symbol
>   targets/dri: Add __driDriverGetExtensions_i965 symbol
>   targets/dri: Add __driDriverGetExtensions_vmwgfx
>   targets/dri: update scons build to handle 
> __driDriverGetExtensions_vmwgfx
>   targets/dri: cleanup conversion leftovers
>   st/dri/drm: remove __driDriverExtensions and driDriverAPI
>   scons: build and use a single dri_common library
>   targets/dri-swrast: convert to gallium megadrivers :)
>   st/dri: merge dri/drm and dri/sw backends
>   targets/dri-swrast: Convert to static/shared pipe-driver
> 
>  61 files changed, 536 insertions(+), 1375 deletions(-)
> 

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


Re: [Mesa-dev] [PATCH 00/23] Megadrivers galore

2014-06-22 Thread Emil Velikov
On 22/06/14 14:38, Thomas Helland wrote:
> Your v3 branch seems to work flawlessly.
> Autogen, make, and make install works as it used to.
> If anything, I think I might be seeing decreased compile-time.
> That might just be my imagination though.
> Rebooted and everything seems to be in good order.
> Let me know if you want me to do any more tests or benchmarks.
> 
> Tested-by: Thomas Helland 
> 
Great news.

Testing - pretty much anything you do on a daily basis. None of the patches
should make _any_ difference. Have you tried vdpau/omx ?

Benchmarks - in theory we are a bit slower now. The series adds a few
dlopen/dlsym + libudev + strcmp calls, which happen (only once) upon screen
creation. The change should be unnoticeable. Unfortunately (?) gallium does
not use libdricore, thus the speed benefits of classic megadrivers, would
seems unlikely here :\

Feel free to give your favourite game/benchmark a go though :)

Thanks,
Emil


> 
> 2014-06-21 16:19 GMT+02:00 Emil Velikov :
> 
>> On 21/06/14 01:30, Thomas Helland wrote:
>>> Hi again,
>>>
>>> Autogen seems to work flawlessly with the updated branch.
>>> Everything builds and compiles as normal on my Ivy Bridge setup.
>>> When trying to do a make install though, something fails.
>>> I'm not sure if it's related to your changes, but at least master gets
>>> further into the process before failing due to LLVM incompatibility
>>> when trying to install libxatracker
>>>
>> I'm not sure what llvm has to do with libxatracker. I'm suspecting that
>> 564821c917f will help on that regard.
>>
>>> make[3]: Entering directory
>> '/home/helland/Mesa/src/gallium/targets/vdpau'
>>>   CXXLDlibvdpau_gallium.la
>>> .libs/libvdpau_gallium_la-target.o: In function
>> `pipe_r600_create_screen':
>>>
>> /home/helland/Mesa/src/gallium/targets/vdpau/../../../../src/gallium/auxiliary/target-helpers/inline_drm_helper.h:178:
>>> undefined reference to `radeon_drm_winsys_create'
>>> collect2: error: ld returned 1 exit status
>>> Makefile:729: recipe for target 'libvdpau_gallium.la' failed
>>> make[3]: *** [libvdpau_gallium.la] Error 1
>>> make[3]: Leaving directory '/home/helland/Mesa/src/gallium/targets/vdpau'
>>> Makefile:524: recipe for target 'install-recursive' failed
>>> make[2]: *** [install-recursive] Error 1
>>> make[2]: Leaving directory '/home/helland/Mesa/src/gallium/targets'
>>> Makefile:530: recipe for target 'install-recursive' failed
>>> make[1]: *** [install-recursive] Error 1
>>> make[1]: Leaving directory '/home/helland/Mesa/src'
>>> Makefile:579: recipe for target 'install-recursive' failed
>>> make: *** [install-recursive] Error 1
>>>
>> As soon as I saw this I realised what Christian meant while going through
>> the
>> radeon patches. Cheers for that.
>>
>> The updated series (and rebased on top of master) can be found at branch
>> static-or-shared-pipe-drivers-v3 in the usual place.
>>
>> Thanks again
>> Emil
>>
>>> I might just be doing something wrong here though.
>>> I'm not really that familiar with build-systems yet.
>>> (I'm spoiled with having started my programming career in java)
>>>
>>> Cheers,
>>> Thomas
>>>
>>
>>
> 

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


Re: [Mesa-dev] [PATCH 00/23] Megadrivers galore

2014-06-22 Thread Thomas Helland
Your v3 branch seems to work flawlessly.
Autogen, make, and make install works as it used to.
If anything, I think I might be seeing decreased compile-time.
That might just be my imagination though.
Rebooted and everything seems to be in good order.
Let me know if you want me to do any more tests or benchmarks.

Tested-by: Thomas Helland 


2014-06-21 16:19 GMT+02:00 Emil Velikov :

> On 21/06/14 01:30, Thomas Helland wrote:
> > Hi again,
> >
> > Autogen seems to work flawlessly with the updated branch.
> > Everything builds and compiles as normal on my Ivy Bridge setup.
> > When trying to do a make install though, something fails.
> > I'm not sure if it's related to your changes, but at least master gets
> > further into the process before failing due to LLVM incompatibility
> > when trying to install libxatracker
> >
> I'm not sure what llvm has to do with libxatracker. I'm suspecting that
> 564821c917f will help on that regard.
>
> > make[3]: Entering directory
> '/home/helland/Mesa/src/gallium/targets/vdpau'
> >   CXXLDlibvdpau_gallium.la
> > .libs/libvdpau_gallium_la-target.o: In function
> `pipe_r600_create_screen':
> >
> /home/helland/Mesa/src/gallium/targets/vdpau/../../../../src/gallium/auxiliary/target-helpers/inline_drm_helper.h:178:
> > undefined reference to `radeon_drm_winsys_create'
> > collect2: error: ld returned 1 exit status
> > Makefile:729: recipe for target 'libvdpau_gallium.la' failed
> > make[3]: *** [libvdpau_gallium.la] Error 1
> > make[3]: Leaving directory '/home/helland/Mesa/src/gallium/targets/vdpau'
> > Makefile:524: recipe for target 'install-recursive' failed
> > make[2]: *** [install-recursive] Error 1
> > make[2]: Leaving directory '/home/helland/Mesa/src/gallium/targets'
> > Makefile:530: recipe for target 'install-recursive' failed
> > make[1]: *** [install-recursive] Error 1
> > make[1]: Leaving directory '/home/helland/Mesa/src'
> > Makefile:579: recipe for target 'install-recursive' failed
> > make: *** [install-recursive] Error 1
> >
> As soon as I saw this I realised what Christian meant while going through
> the
> radeon patches. Cheers for that.
>
> The updated series (and rebased on top of master) can be found at branch
> static-or-shared-pipe-drivers-v3 in the usual place.
>
> Thanks again
> Emil
>
> > I might just be doing something wrong here though.
> > I'm not really that familiar with build-systems yet.
> > (I'm spoiled with having started my programming career in java)
> >
> > Cheers,
> > Thomas
> >
>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 00/23] Megadrivers galore

2014-06-21 Thread Emil Velikov
On 21/06/14 01:30, Thomas Helland wrote:
> Hi again,
> 
> Autogen seems to work flawlessly with the updated branch.
> Everything builds and compiles as normal on my Ivy Bridge setup.
> When trying to do a make install though, something fails.
> I'm not sure if it's related to your changes, but at least master gets
> further into the process before failing due to LLVM incompatibility
> when trying to install libxatracker
> 
I'm not sure what llvm has to do with libxatracker. I'm suspecting that
564821c917f will help on that regard.

> make[3]: Entering directory '/home/helland/Mesa/src/gallium/targets/vdpau'
>   CXXLDlibvdpau_gallium.la
> .libs/libvdpau_gallium_la-target.o: In function `pipe_r600_create_screen':
> /home/helland/Mesa/src/gallium/targets/vdpau/../../../../src/gallium/auxiliary/target-helpers/inline_drm_helper.h:178:
> undefined reference to `radeon_drm_winsys_create'
> collect2: error: ld returned 1 exit status
> Makefile:729: recipe for target 'libvdpau_gallium.la' failed
> make[3]: *** [libvdpau_gallium.la] Error 1
> make[3]: Leaving directory '/home/helland/Mesa/src/gallium/targets/vdpau'
> Makefile:524: recipe for target 'install-recursive' failed
> make[2]: *** [install-recursive] Error 1
> make[2]: Leaving directory '/home/helland/Mesa/src/gallium/targets'
> Makefile:530: recipe for target 'install-recursive' failed
> make[1]: *** [install-recursive] Error 1
> make[1]: Leaving directory '/home/helland/Mesa/src'
> Makefile:579: recipe for target 'install-recursive' failed
> make: *** [install-recursive] Error 1
> 
As soon as I saw this I realised what Christian meant while going through the
radeon patches. Cheers for that.

The updated series (and rebased on top of master) can be found at branch
static-or-shared-pipe-drivers-v3 in the usual place.

Thanks again
Emil

> I might just be doing something wrong here though.
> I'm not really that familiar with build-systems yet.
> (I'm spoiled with having started my programming career in java)
> 
> Cheers,
> Thomas
> 

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


Re: [Mesa-dev] [PATCH 00/23] Megadrivers galore

2014-06-20 Thread Thomas Helland
Hi again,

Autogen seems to work flawlessly with the updated branch.
Everything builds and compiles as normal on my Ivy Bridge setup.
When trying to do a make install though, something fails.
I'm not sure if it's related to your changes, but at least master gets
further into the process before failing due to LLVM incompatibility
when trying to install libxatracker

make[3]: Entering directory '/home/helland/Mesa/src/gallium/targets/vdpau'
  CXXLDlibvdpau_gallium.la
.libs/libvdpau_gallium_la-target.o: In function `pipe_r600_create_screen':
/home/helland/Mesa/src/gallium/targets/vdpau/../../../../src/gallium/auxiliary/target-helpers/inline_drm_helper.h:178:
undefined reference to `radeon_drm_winsys_create'
collect2: error: ld returned 1 exit status
Makefile:729: recipe for target 'libvdpau_gallium.la' failed
make[3]: *** [libvdpau_gallium.la] Error 1
make[3]: Leaving directory '/home/helland/Mesa/src/gallium/targets/vdpau'
Makefile:524: recipe for target 'install-recursive' failed
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory '/home/helland/Mesa/src/gallium/targets'
Makefile:530: recipe for target 'install-recursive' failed
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory '/home/helland/Mesa/src'
Makefile:579: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1

I might just be doing something wrong here though.
I'm not really that familiar with build-systems yet.
(I'm spoiled with having started my programming career in java)

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


[Mesa-dev] [PATCH 00/23] Megadrivers galore

2014-06-19 Thread Thomas Helland
I'll give it another whirl tonight, if I can find the time.
19. juni 2014 23:25 skrev "Emil Velikov" 
følgende:

> On 19/06/14 21:35, Thomas Helland wrote:
> > Hi,
> >
> > I tried pulling down your git-branch, and test it out.
> > (I'm running Intel graphics on Ivy-Bridge, Arch Linux).
> > Using my old autogen-line failed.
> > (It never reached the point where it says to
> > go ahead and type make to build the stuffs)
> >
> Thanks for testing Thomas,
>
> > ./autogen.sh --prefix=/usr --sysconfdir=/etc
> > --with-dri-driverdir=/usr/lib/xorg/modules/dri -
> > -with-dri-drivers=i965 --with-egl-platforms=x11,drm,wayland
> > --enable-egl --enable-shared-glapi --enable-gbm
> > --enable-glx-tls --enable-dri --enable-glx --enable-osmesa
> > --enable-gles1 --enable-gles2 --enable-texture-float
> > --enable-xa --disable-xvmc --enable-debug
> >
> > At the very top i find an error:
> >
> > configure.ac:2173: error: required file
> > 'src/gallium/state_trackers/dri/drm/Makefile.in' not found
> > configure.ac:2173: error: required file
> > 'src/gallium/state_trackers/dri/sw/Makefile.in' not found
> >
> Just pushed a patch that should fix this.
>
> > It also complains about source files being in subdirectories,
> > but some "subdir-objects" option is not enabled.
> >
> Those "issues" are old, and the series indirectly addresses a few of them.
>
> > Looking closer these warnings also appear when doing a
> > build of the master tree with the same command, but
> > there the autogen-stuff end up with a result that let's me make.
> >
> > I then went ahead and did a bisect, doing a make clean between each.
> > Eventually I had gotten to head without any fails, and now head
> > also succeeded.
> >
> If there are any another issues with this branch do not bother bisecting,
> just
> report back your observation/errors.
>
>
> Can you fetch the branch again and give it another try ?
>
> Thanks
> Emil
>
> > Seems like some files being left from previous compiles lets the
> > compile work as a charm, but if I start from bare bones it does not.
> >
> > I'm no expert in build-systems, so that's about all I have for now.
> > Let me know if there's something specific you want me to try out.
> >
> > Cheers,
> > Thomas
> >
> >
> >
> > ___
> > mesa-dev mailing list
> > mesa-dev@lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> >
>
>
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 00/23] Megadrivers galore

2014-06-19 Thread Emil Velikov
On 19/06/14 21:35, Thomas Helland wrote:
> Hi,
> 
> I tried pulling down your git-branch, and test it out.
> (I'm running Intel graphics on Ivy-Bridge, Arch Linux).
> Using my old autogen-line failed.
> (It never reached the point where it says to
> go ahead and type make to build the stuffs)
> 
Thanks for testing Thomas,

> ./autogen.sh --prefix=/usr --sysconfdir=/etc
> --with-dri-driverdir=/usr/lib/xorg/modules/dri -
> -with-dri-drivers=i965 --with-egl-platforms=x11,drm,wayland
> --enable-egl --enable-shared-glapi --enable-gbm
> --enable-glx-tls --enable-dri --enable-glx --enable-osmesa
> --enable-gles1 --enable-gles2 --enable-texture-float
> --enable-xa --disable-xvmc --enable-debug
> 
> At the very top i find an error:
> 
> configure.ac:2173: error: required file
> 'src/gallium/state_trackers/dri/drm/Makefile.in' not found
> configure.ac:2173: error: required file
> 'src/gallium/state_trackers/dri/sw/Makefile.in' not found
> 
Just pushed a patch that should fix this.

> It also complains about source files being in subdirectories,
> but some "subdir-objects" option is not enabled.
> 
Those "issues" are old, and the series indirectly addresses a few of them.

> Looking closer these warnings also appear when doing a
> build of the master tree with the same command, but
> there the autogen-stuff end up with a result that let's me make.
> 
> I then went ahead and did a bisect, doing a make clean between each.
> Eventually I had gotten to head without any fails, and now head
> also succeeded.
> 
If there are any another issues with this branch do not bother bisecting, just
report back your observation/errors.


Can you fetch the branch again and give it another try ?

Thanks
Emil

> Seems like some files being left from previous compiles lets the
> compile work as a charm, but if I start from bare bones it does not.
> 
> I'm no expert in build-systems, so that's about all I have for now.
> Let me know if there's something specific you want me to try out.
> 
> Cheers,
> Thomas
> 
> 
> 
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 

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


[Mesa-dev] [PATCH 00/23] Megadrivers galore

2014-06-19 Thread Thomas Helland
Hi,

I tried pulling down your git-branch, and test it out.
(I'm running Intel graphics on Ivy-Bridge, Arch Linux).
Using my old autogen-line failed.
(It never reached the point where it says to
go ahead and type make to build the stuffs)

./autogen.sh --prefix=/usr --sysconfdir=/etc
--with-dri-driverdir=/usr/lib/xorg/modules/dri -
-with-dri-drivers=i965 --with-egl-platforms=x11,drm,wayland
--enable-egl --enable-shared-glapi --enable-gbm
--enable-glx-tls --enable-dri --enable-glx --enable-osmesa
--enable-gles1 --enable-gles2 --enable-texture-float
--enable-xa --disable-xvmc --enable-debug

At the very top i find an error:

configure.ac:2173: error: required file
'src/gallium/state_trackers/dri/drm/Makefile.in' not found
configure.ac:2173: error: required file
'src/gallium/state_trackers/dri/sw/Makefile.in' not found

It also complains about source files being in subdirectories,
but some "subdir-objects" option is not enabled.

Looking closer these warnings also appear when doing a
build of the master tree with the same command, but
there the autogen-stuff end up with a result that let's me make.

I then went ahead and did a bisect, doing a make clean between each.
Eventually I had gotten to head without any fails, and now head
also succeeded.

Seems like some files being left from previous compiles lets the
compile work as a charm, but if I start from bare bones it does not.

I'm no expert in build-systems, so that's about all I have for now.
Let me know if there's something specific you want me to try out.

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


Re: [Mesa-dev] [PATCH 00/23] Megadrivers galore

2014-06-19 Thread Emil Velikov
On 19/06/14 11:54, Jakob Bornecrantz wrote:
> On Tue, Jun 17, 2014 at 8:38 PM, Emil Velikov  
> wrote:
>> Hi all,
>>
>> As a follow up to the static/shared pipe-drivers series here is the final
>> series (if anyone is interested I may take a look at egl + opencl) of
>> refactoring the gallium dri targets into a single library/provider.
>>
>> In a nutshell:
>>  - Convert one target per patch.
>>  - Merge the drm and sw backends of our dri state-tracker.
>>  - Adds __driDriverGetExtensions_$drivername symbol for each driver.
>>  - Megadrivers.
>>  - ***
>>  - Profit.
>>
>> Things works like a charm for nouveau and swrast, and testing on other
>> platforms is greatly appreciated.
>>
>> The complete series can be found in the static-or-shared-pipe-drivers-v2
>> branch at my github repo.
>>
>> I would like to get this reviewed/pushed over the next month, although
>> that depends on the number of bugs that come up with the previous batch.
>>
>> As always comments, suggestions and flame is welcome.
> 
> I'm trying to get a better grasp of the resulting set of binaries will look 
> like
> on a distro, correct me if I'm wrong, by default we will get one 
> gallium_dri.so
> that is linked against shared dri core and glapi correct. And then hardlinks
> from say vmwgfx_dri.so to gallium_dri.so?
> 
Believe Marek answered these quite nicely. Thanks.

> Also looking at the patch it looks like stdri can still be build without
> DRM installed on the system? I remember the Hurd people being
> quite vocal about this.
> 
Before we had two "front-ends" for stdri - drm and sw. Now I'm merging the two
into a single library - no functionality and/or build dependency changes. It
gives us at least:
 - Removed symlinks - OpenBSD people import mesa into CVS which does not
handle them :\
 - The chance to simplify things a bit (-100 loc), merge the hardware and
software dri drivers and slightly minimize the linking time.

-Emil

> Cheers, Jakob.
> 
>>
>> Cheers,
>> Emil
>>
>> Emil Velikov (23):
>>   targets/dri-swrast: use drm aware dricommon when building more than 
>> swrast
>>   st/dri: Allow separate dri-targets
>>   st/dri/drm: Add a second libdridrm library
>>   targets/dri-nouveau: Convert to static/shared pipe-drivers
>>   targets/(r300|r600|radeonsi)/dri: Convert to static/shared pipe-drivers
>>   targets/dri-freedreno: Convert to static/shared pipe-drivers
>>   targets/dri-i915: Convert to static/shared pipe-drivers
>>   targets/dri-ilo: Convert to static/shared pipe-driver
>>   targets/dri-vmwgfx: Convert to static/shared pipe-drivers
>>   st/dri: Remove the old libdridrm library
>>   targets/dri: Add __driDriverGetExtensions_nouveau symbol
>>   targets/dri: Add __driDriverGetExtensions_(r300|r600|radeonsi) symbols
>>   targets/dri: Add __driDriverGetExtensions_freedreno symbol
>>   targets/dri: Add __driDriverGetExtensions_i915 symbol
>>   targets/dri: Add __driDriverGetExtensions_i965 symbol
>>   targets/dri: Add __driDriverGetExtensions_vmwgfx
>>   targets/dri: update scons build to handle 
>> __driDriverGetExtensions_vmwgfx
>>   targets/dri: cleanup conversion leftovers
>>   st/dri/drm: remove __driDriverExtensions and driDriverAPI
>>   scons: build and use a single dri_common library
>>   targets/dri-swrast: convert to gallium megadrivers :)
>>   st/dri: merge dri/drm and dri/sw backends
>>   targets/dri-swrast: Convert to static/shared pipe-driver
>>
>>  61 files changed, 536 insertions(+), 1375 deletions(-)

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


Re: [Mesa-dev] [PATCH 00/23] Megadrivers galore

2014-06-19 Thread Jakob Bornecrantz
Thanks again, and fair enough. :)

Cheers, Jakob.

On Thu, Jun 19, 2014 at 1:22 PM, Marek Olšák  wrote:
> Yes, that's correct. However, it's better to duplicate the same code
> twice than ten times.
>
> Marek
>
> On Thu, Jun 19, 2014 at 1:12 PM, Jakob Bornecrantz  
> wrote:
>> On Thu, Jun 19, 2014 at 1:08 PM, Marek Olšák  wrote:
>>> Hi Jakob,
>>>
>>> libdricore was nuked quite some time ago. What classic drivers now use
>>> is all drivers in mesa_dri_drivers.so and the _dri.so files are
>>> hardlinks to that file.
>>
>> Ah, thanks for the info. Wouldn't that mean that mesa core code like the
>> glsl compiler is duplicated in gallium_dri.so and mesa_dri_drivers.so?
>>
>> Cheers, Jakob.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 00/23] Megadrivers galore

2014-06-19 Thread Marek Olšák
Yes, that's correct. However, it's better to duplicate the same code
twice than ten times.

Marek

On Thu, Jun 19, 2014 at 1:12 PM, Jakob Bornecrantz  wrote:
> On Thu, Jun 19, 2014 at 1:08 PM, Marek Olšák  wrote:
>> Hi Jakob,
>>
>> libdricore was nuked quite some time ago. What classic drivers now use
>> is all drivers in mesa_dri_drivers.so and the _dri.so files are
>> hardlinks to that file.
>
> Ah, thanks for the info. Wouldn't that mean that mesa core code like the
> glsl compiler is duplicated in gallium_dri.so and mesa_dri_drivers.so?
>
> Cheers, Jakob.
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 00/23] Megadrivers galore

2014-06-19 Thread Jakob Bornecrantz
On Thu, Jun 19, 2014 at 1:08 PM, Marek Olšák  wrote:
> Hi Jakob,
>
> libdricore was nuked quite some time ago. What classic drivers now use
> is all drivers in mesa_dri_drivers.so and the _dri.so files are
> hardlinks to that file.

Ah, thanks for the info. Wouldn't that mean that mesa core code like the
glsl compiler is duplicated in gallium_dri.so and mesa_dri_drivers.so?

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


Re: [Mesa-dev] [PATCH 00/23] Megadrivers galore

2014-06-19 Thread Marek Olšák
Hi Jakob,

libdricore was nuked quite some time ago. What classic drivers now use
is all drivers in mesa_dri_drivers.so and the _dri.so files are
hardlinks to that file.

Marek

On Thu, Jun 19, 2014 at 12:54 PM, Jakob Bornecrantz
 wrote:
> On Tue, Jun 17, 2014 at 8:38 PM, Emil Velikov  
> wrote:
>> Hi all,
>>
>> As a follow up to the static/shared pipe-drivers series here is the final
>> series (if anyone is interested I may take a look at egl + opencl) of
>> refactoring the gallium dri targets into a single library/provider.
>>
>> In a nutshell:
>>  - Convert one target per patch.
>>  - Merge the drm and sw backends of our dri state-tracker.
>>  - Adds __driDriverGetExtensions_$drivername symbol for each driver.
>>  - Megadrivers.
>>  - ***
>>  - Profit.
>>
>> Things works like a charm for nouveau and swrast, and testing on other
>> platforms is greatly appreciated.
>>
>> The complete series can be found in the static-or-shared-pipe-drivers-v2
>> branch at my github repo.
>>
>> I would like to get this reviewed/pushed over the next month, although
>> that depends on the number of bugs that come up with the previous batch.
>>
>> As always comments, suggestions and flame is welcome.
>
> I'm trying to get a better grasp of the resulting set of binaries will look 
> like
> on a distro, correct me if I'm wrong, by default we will get one 
> gallium_dri.so
> that is linked against shared dri core and glapi correct. And then hardlinks
> from say vmwgfx_dri.so to gallium_dri.so?
>
> Also looking at the patch it looks like stdri can still be build without
> DRM installed on the system? I remember the Hurd people being
> quite vocal about this.
>
> Cheers, Jakob.
>
>>
>> Cheers,
>> Emil
>>
>> Emil Velikov (23):
>>   targets/dri-swrast: use drm aware dricommon when building more than 
>> swrast
>>   st/dri: Allow separate dri-targets
>>   st/dri/drm: Add a second libdridrm library
>>   targets/dri-nouveau: Convert to static/shared pipe-drivers
>>   targets/(r300|r600|radeonsi)/dri: Convert to static/shared pipe-drivers
>>   targets/dri-freedreno: Convert to static/shared pipe-drivers
>>   targets/dri-i915: Convert to static/shared pipe-drivers
>>   targets/dri-ilo: Convert to static/shared pipe-driver
>>   targets/dri-vmwgfx: Convert to static/shared pipe-drivers
>>   st/dri: Remove the old libdridrm library
>>   targets/dri: Add __driDriverGetExtensions_nouveau symbol
>>   targets/dri: Add __driDriverGetExtensions_(r300|r600|radeonsi) symbols
>>   targets/dri: Add __driDriverGetExtensions_freedreno symbol
>>   targets/dri: Add __driDriverGetExtensions_i915 symbol
>>   targets/dri: Add __driDriverGetExtensions_i965 symbol
>>   targets/dri: Add __driDriverGetExtensions_vmwgfx
>>   targets/dri: update scons build to handle 
>> __driDriverGetExtensions_vmwgfx
>>   targets/dri: cleanup conversion leftovers
>>   st/dri/drm: remove __driDriverExtensions and driDriverAPI
>>   scons: build and use a single dri_common library
>>   targets/dri-swrast: convert to gallium megadrivers :)
>>   st/dri: merge dri/drm and dri/sw backends
>>   targets/dri-swrast: Convert to static/shared pipe-driver
>>
>>  61 files changed, 536 insertions(+), 1375 deletions(-)
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 00/23] Megadrivers galore

2014-06-19 Thread Jakob Bornecrantz
On Tue, Jun 17, 2014 at 8:38 PM, Emil Velikov  wrote:
> Hi all,
>
> As a follow up to the static/shared pipe-drivers series here is the final
> series (if anyone is interested I may take a look at egl + opencl) of
> refactoring the gallium dri targets into a single library/provider.
>
> In a nutshell:
>  - Convert one target per patch.
>  - Merge the drm and sw backends of our dri state-tracker.
>  - Adds __driDriverGetExtensions_$drivername symbol for each driver.
>  - Megadrivers.
>  - ***
>  - Profit.
>
> Things works like a charm for nouveau and swrast, and testing on other
> platforms is greatly appreciated.
>
> The complete series can be found in the static-or-shared-pipe-drivers-v2
> branch at my github repo.
>
> I would like to get this reviewed/pushed over the next month, although
> that depends on the number of bugs that come up with the previous batch.
>
> As always comments, suggestions and flame is welcome.

I'm trying to get a better grasp of the resulting set of binaries will look like
on a distro, correct me if I'm wrong, by default we will get one gallium_dri.so
that is linked against shared dri core and glapi correct. And then hardlinks
from say vmwgfx_dri.so to gallium_dri.so?

Also looking at the patch it looks like stdri can still be build without
DRM installed on the system? I remember the Hurd people being
quite vocal about this.

Cheers, Jakob.

>
> Cheers,
> Emil
>
> Emil Velikov (23):
>   targets/dri-swrast: use drm aware dricommon when building more than 
> swrast
>   st/dri: Allow separate dri-targets
>   st/dri/drm: Add a second libdridrm library
>   targets/dri-nouveau: Convert to static/shared pipe-drivers
>   targets/(r300|r600|radeonsi)/dri: Convert to static/shared pipe-drivers
>   targets/dri-freedreno: Convert to static/shared pipe-drivers
>   targets/dri-i915: Convert to static/shared pipe-drivers
>   targets/dri-ilo: Convert to static/shared pipe-driver
>   targets/dri-vmwgfx: Convert to static/shared pipe-drivers
>   st/dri: Remove the old libdridrm library
>   targets/dri: Add __driDriverGetExtensions_nouveau symbol
>   targets/dri: Add __driDriverGetExtensions_(r300|r600|radeonsi) symbols
>   targets/dri: Add __driDriverGetExtensions_freedreno symbol
>   targets/dri: Add __driDriverGetExtensions_i915 symbol
>   targets/dri: Add __driDriverGetExtensions_i965 symbol
>   targets/dri: Add __driDriverGetExtensions_vmwgfx
>   targets/dri: update scons build to handle 
> __driDriverGetExtensions_vmwgfx
>   targets/dri: cleanup conversion leftovers
>   st/dri/drm: remove __driDriverExtensions and driDriverAPI
>   scons: build and use a single dri_common library
>   targets/dri-swrast: convert to gallium megadrivers :)
>   st/dri: merge dri/drm and dri/sw backends
>   targets/dri-swrast: Convert to static/shared pipe-driver
>
>  61 files changed, 536 insertions(+), 1375 deletions(-)
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 00/23] Megadrivers galore

2014-06-18 Thread Emil Velikov
On 18/06/14 14:09, Tom Stellard wrote:
> On Tue, Jun 17, 2014 at 07:38:16PM +0100, Emil Velikov wrote:
>> Hi all,
>>
>> As a follow up to the static/shared pipe-drivers series here is the final
>> series (if anyone is interested I may take a look at egl + opencl) of
>> refactoring the gallium dri targets into a single library/provider.
>>
> 
> Hi Emil,
> 
> One common problem I run into when using the pipe drivers is if there
> is an undefined symbol in the pipe_*.so then it will silently fail to
> load, and with OpenCL for example it won't report any devices which can
> be confusing for users.  I would recommend adding some error handling to
> util_dlopen, so that it prints an error message when it fails to load a
> shared object.
> 
> Other than that, it's hard to review a series like this, but I'll
> give it an:
> 
Hmm I'm pretty sure that should not happen as of commit d187a150d45 (mesa
10.2) which adds a few linker flags that moves the issue to build time.

Pretty much everything (galliumwise) other than the dri targets should have
its symbols resolved, (and export only the required ones) with mesa 10.2.

Although I do plan on adding a "WARNING: YOU'RE USING PIPE-DRIVERS, THINGS
WILL BREAK" etc. kind of warning, as I do make it possible (hidden behind
a key) to use them with vdpau, omx, dri More on that at 11.

Thanks for chipping in.

-Emil

> Acked-by: Tom Stellard 
> 
> Since I like the general approach.
> 
> -Tom
> 
>> In a nutshell:
>>  - Convert one target per patch.
>>  - Merge the drm and sw backends of our dri state-tracker.
>>  - Adds __driDriverGetExtensions_$drivername symbol for each driver.
>>  - Megadrivers.
>>  - ***
>>  - Profit.
>>
>> Things works like a charm for nouveau and swrast, and testing on other
>> platforms is greatly appreciated.
>>
>> The complete series can be found in the static-or-shared-pipe-drivers-v2
>> branch at my github repo.
>>
>> I would like to get this reviewed/pushed over the next month, although
>> that depends on the number of bugs that come up with the previous batch.
>>
>> As always comments, suggestions and flame is welcome.
>>
>> Cheers,
>> Emil
>>
>> Emil Velikov (23):
>>   targets/dri-swrast: use drm aware dricommon when building more than 
>> swrast
>>   st/dri: Allow separate dri-targets
>>   st/dri/drm: Add a second libdridrm library
>>   targets/dri-nouveau: Convert to static/shared pipe-drivers
>>   targets/(r300|r600|radeonsi)/dri: Convert to static/shared pipe-drivers
>>   targets/dri-freedreno: Convert to static/shared pipe-drivers
>>   targets/dri-i915: Convert to static/shared pipe-drivers
>>   targets/dri-ilo: Convert to static/shared pipe-driver
>>   targets/dri-vmwgfx: Convert to static/shared pipe-drivers
>>   st/dri: Remove the old libdridrm library
>>   targets/dri: Add __driDriverGetExtensions_nouveau symbol
>>   targets/dri: Add __driDriverGetExtensions_(r300|r600|radeonsi) symbols
>>   targets/dri: Add __driDriverGetExtensions_freedreno symbol
>>   targets/dri: Add __driDriverGetExtensions_i915 symbol
>>   targets/dri: Add __driDriverGetExtensions_i965 symbol
>>   targets/dri: Add __driDriverGetExtensions_vmwgfx
>>   targets/dri: update scons build to handle 
>> __driDriverGetExtensions_vmwgfx
>>   targets/dri: cleanup conversion leftovers
>>   st/dri/drm: remove __driDriverExtensions and driDriverAPI
>>   scons: build and use a single dri_common library
>>   targets/dri-swrast: convert to gallium megadrivers :)
>>   st/dri: merge dri/drm and dri/sw backends
>>   targets/dri-swrast: Convert to static/shared pipe-driver
>>
>>  61 files changed, 536 insertions(+), 1375 deletions(-)
>>
>> ___
>> mesa-dev mailing list
>> mesa-dev@lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/mesa-dev

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


Re: [Mesa-dev] [PATCH 00/23] Megadrivers galore

2014-06-18 Thread Tom Stellard
On Tue, Jun 17, 2014 at 07:38:16PM +0100, Emil Velikov wrote:
> Hi all,
> 
> As a follow up to the static/shared pipe-drivers series here is the final
> series (if anyone is interested I may take a look at egl + opencl) of
> refactoring the gallium dri targets into a single library/provider.
> 

Hi Emil,

One common problem I run into when using the pipe drivers is if there
is an undefined symbol in the pipe_*.so then it will silently fail to
load, and with OpenCL for example it won't report any devices which can
be confusing for users.  I would recommend adding some error handling to
util_dlopen, so that it prints an error message when it fails to load a
shared object.

Other than that, it's hard to review a series like this, but I'll
give it an:

Acked-by: Tom Stellard 

Since I like the general approach.

-Tom

> In a nutshell:
>  - Convert one target per patch.
>  - Merge the drm and sw backends of our dri state-tracker.
>  - Adds __driDriverGetExtensions_$drivername symbol for each driver.
>  - Megadrivers.
>  - ***
>  - Profit.
> 
> Things works like a charm for nouveau and swrast, and testing on other
> platforms is greatly appreciated.
> 
> The complete series can be found in the static-or-shared-pipe-drivers-v2
> branch at my github repo.
> 
> I would like to get this reviewed/pushed over the next month, although
> that depends on the number of bugs that come up with the previous batch.
> 
> As always comments, suggestions and flame is welcome.
> 
> Cheers,
> Emil
> 
> Emil Velikov (23):
>   targets/dri-swrast: use drm aware dricommon when building more than 
> swrast
>   st/dri: Allow separate dri-targets
>   st/dri/drm: Add a second libdridrm library
>   targets/dri-nouveau: Convert to static/shared pipe-drivers
>   targets/(r300|r600|radeonsi)/dri: Convert to static/shared pipe-drivers
>   targets/dri-freedreno: Convert to static/shared pipe-drivers
>   targets/dri-i915: Convert to static/shared pipe-drivers
>   targets/dri-ilo: Convert to static/shared pipe-driver
>   targets/dri-vmwgfx: Convert to static/shared pipe-drivers
>   st/dri: Remove the old libdridrm library
>   targets/dri: Add __driDriverGetExtensions_nouveau symbol
>   targets/dri: Add __driDriverGetExtensions_(r300|r600|radeonsi) symbols
>   targets/dri: Add __driDriverGetExtensions_freedreno symbol
>   targets/dri: Add __driDriverGetExtensions_i915 symbol
>   targets/dri: Add __driDriverGetExtensions_i965 symbol
>   targets/dri: Add __driDriverGetExtensions_vmwgfx
>   targets/dri: update scons build to handle 
> __driDriverGetExtensions_vmwgfx
>   targets/dri: cleanup conversion leftovers
>   st/dri/drm: remove __driDriverExtensions and driDriverAPI
>   scons: build and use a single dri_common library
>   targets/dri-swrast: convert to gallium megadrivers :)
>   st/dri: merge dri/drm and dri/sw backends
>   targets/dri-swrast: Convert to static/shared pipe-driver
> 
>  61 files changed, 536 insertions(+), 1375 deletions(-)
> 
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH 00/23] Megadrivers galore

2014-06-17 Thread Emil Velikov
Hi all,

As a follow up to the static/shared pipe-drivers series here is the final
series (if anyone is interested I may take a look at egl + opencl) of
refactoring the gallium dri targets into a single library/provider.

In a nutshell:
 - Convert one target per patch.
 - Merge the drm and sw backends of our dri state-tracker.
 - Adds __driDriverGetExtensions_$drivername symbol for each driver.
 - Megadrivers.
 - ***
 - Profit.

Things works like a charm for nouveau and swrast, and testing on other
platforms is greatly appreciated.

The complete series can be found in the static-or-shared-pipe-drivers-v2
branch at my github repo.

I would like to get this reviewed/pushed over the next month, although
that depends on the number of bugs that come up with the previous batch.

As always comments, suggestions and flame is welcome.

Cheers,
Emil

Emil Velikov (23):
  targets/dri-swrast: use drm aware dricommon when building more than swrast
  st/dri: Allow separate dri-targets
  st/dri/drm: Add a second libdridrm library
  targets/dri-nouveau: Convert to static/shared pipe-drivers
  targets/(r300|r600|radeonsi)/dri: Convert to static/shared pipe-drivers
  targets/dri-freedreno: Convert to static/shared pipe-drivers
  targets/dri-i915: Convert to static/shared pipe-drivers
  targets/dri-ilo: Convert to static/shared pipe-driver
  targets/dri-vmwgfx: Convert to static/shared pipe-drivers
  st/dri: Remove the old libdridrm library
  targets/dri: Add __driDriverGetExtensions_nouveau symbol
  targets/dri: Add __driDriverGetExtensions_(r300|r600|radeonsi) symbols
  targets/dri: Add __driDriverGetExtensions_freedreno symbol
  targets/dri: Add __driDriverGetExtensions_i915 symbol
  targets/dri: Add __driDriverGetExtensions_i965 symbol
  targets/dri: Add __driDriverGetExtensions_vmwgfx
  targets/dri: update scons build to handle __driDriverGetExtensions_vmwgfx
  targets/dri: cleanup conversion leftovers
  st/dri/drm: remove __driDriverExtensions and driDriverAPI
  scons: build and use a single dri_common library
  targets/dri-swrast: convert to gallium megadrivers :)
  st/dri: merge dri/drm and dri/sw backends
  targets/dri-swrast: Convert to static/shared pipe-driver

 61 files changed, 536 insertions(+), 1375 deletions(-)

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