[Mesa-dev] Megaradeon

Michel Dänzer michel at daenzer.net
Thu May 15 20:11:27 PDT 2014


On 16.05.2014 11:33, Emil Velikov wrote:
> On 16/05/14 03:03, Michel Dänzer wrote:
>> On 15.05.2014 21:13, Emil Velikov wrote:
>>
>>>> On 15.05.2014 10:58, Marek Olšák wrote:
>>>>> Hi everybody,
>>>>>
>>>>> Some distros seem to care about the size of Mesa, so I came up with
>>>>> this little patch.
>>>>>
>>>>> It puts r600g and radeonsi into r300_dri.so. The result is one shared
>>>>> library which contains all three drivers. Also, all driver loaders in
>>>>> Mesa should now always load the r300 driver instead of r600 and
>>>>> radeonsi.
>>>>>
>>>>> The radeon winsys is created first, which then creates the correct
>>>>> screen (r300, r600, or radeonsi) according to the PCI ID.
>>>>>
>>>>> The libGL loader has actually been ignoring the driver name from the X
>>>>> server for quite some time, so nothing needs to be done for this
>>>>> outside of Mesa.
>>>>>
>>>>> This is for *_dri.so only, the other targets are still separate and
>>>>> probably broken with this patch. (VDPAU, XvMC, egl-gallium, OpenCL?)
>>>>>
>>>>> What's missing:
>>>>> - do the same for the other targets/APIs
>>>>> - remove r600 and radeonsi targets and clean up the build system
>>>>>
>>>>> Original files without debugging symbols:
>>>>>   5.9MB r300_dri.so
>>>>>   6.5MB r600_dri.so
>>>>>   5.7MB radeonsi_dri.so
>>>>> Megaradeon:
>>>>>   7.0MB r300_dri.so (all 3 drivers)
>>>>>
>>>>> If somebody who cares about the size of Mesa wants to finish this up,
>>>>> the patch is attached. This is only a proof that it's not really
>>>>> difficult. What remains is mostly just build system work.
>>>>
>>>> FWIW, I think it would be cleaner to use a new name instead of reusing
>>>> any existing name.
>>>>
>>>>
>>> FWIW currently only radeon drivers are split in such a way - freedreno and
>>> nouveau have been using such separation at winsys level as far back as I can
>>> remember.
>>
>> r300 and r600 didn't share much if any code when they were classic Mesa
>> drivers.
>>
> One does not need to share code to use the approach :) Although it makes sense
> more sense if they do.

Just trying to provide some historical context why things are the way
they are, in case you're not aware of it. AFAIR, when the classic r300
and r600 drivers were created, there was little if any code sharing
between different drivers.


> On 15/05/14 14:55, Marek Olšák wrote:
>> Yeah, hardlinks might be needed to keep old libGL working.
> 
> and
> 
> On 15/05/14 14:02, Christian König wrote:
>> The whole approach sounds like a good idea to me.
>>
>> Renaming the old driver would probably work (with a little confusion on the
>> users side of course), but our marketing recently suggested a different name.
>> We should discuss that internally at AMD first.
> 
> IMHO those two slightly diverge. One might want to establish if backwards
> compatibility is an issue and then take a look at the possible names.

As long as there are backwards compatibility links (which I think we've
established is required), it doesn't matter at all what the 'main'
binary is called, does it?


-- 
Earthling Michel Dänzer            |                  http://www.amd.com
Libre software enthusiast          |                Mesa and X developer


More information about the mesa-dev mailing list