Hello Michel,
Hello Nicolai,

I have spent some more time reading the Mesa source code and trying to figure 
out how the prime configuration works.
If i understood correctly the driconf XML format should have an option inside 
each application indicating if PRIME should be used. This option is named 
"device_id" and defines the device which this application should run.

So when Mesa loads the configuration, if the application has the "device_id" it 
will run under this driver. Am I correct?
If this is the case, then to correctly support PRIME the expected behavior of 
the configuration GUI should be:
1 - Find out if this is a PRIME setup
2 - If its PRIME, give the user an option to select on which device this 
application should run.

Some more questions that I still have to understand:
- How do we detect at user-land that we are under a PRIME setup?

- I suppose there is some way to query the device_id directly from Mesa (maybe 
using Xlib). Any idea which API can be called for this?

- Having the device_id, how can I get additional data for this device (for 
example the vendor name and the full hardware description). I assume there is 
already an API that makes this possible, as the actual driconf is capable of 
identifying the hardware correctly.

Sorry If I'm making too much questions, but I'm really interested in understand 
how this work.

Kind Regards,
Jean Hertel


De: Jean Hertel <jean.her...@hotmail.com>
Enviado: domingo, 7 de janeiro de 2018 20:10
Para: Michel Dänzer; Nicolai Hähnle
Cc: mesa-dev@lists.freedesktop.org
Assunto: Re: [Mesa-dev] [GSOC] DriConf Replacement
  

Hello Michael,

Finally I found some free time to spent on this.
Can you please give me a small example on how I can get the device_ids ?

Currently to retrieve the available driver options I'm doing something like 
this:

1 - Count the number of screens using "ScreenCount" function from Xlib.
2 - For each screen retrieve the driver name with "glXGetScreenDriver".
3 - For each driver retrieve the available options with "glXGetDriverConfig".

Please note that my knowledge about openGL, x11 and mesa is almost zero, so if 
you have any documentation that I can read it would be nice too.

Kind Regards,
Jean Hertel

---------
On 10/04/17 06:02 AM, Michel Dänzer wrote:
  
>On 05/04/17 05:26 PM, Nicolai Hähnle wrote:
>> On 04.04.2017 01:52, Jean Hertel wrote:
>> 
>> 2c) Consider adding an option to configure PRIME to driconf.
>> 
>> [2b and 2c will also require changes in Mesa; also, you may want to get
>> rid of the implicit dependency on xdriinfo]
>
>FWIW, Mesa already supports 2c) with DRI3, via the device_id option.
>
>
    
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to