[Mesa-dev] [PATCH 04/14] glx: Add an optional function call for getting the DRI driver interface.

Eric Anholt eric at anholt.net
Wed Oct 2 13:04:04 PDT 2013


Marek Olšák <maraeo at gmail.com> writes:

> On Mon, Sep 30, 2013 at 10:44 PM, Eric Anholt <eric at anholt.net> wrote:
>> The previous interface relied on a static struct, which meant tha the
>> driver didn't get a chance to edit the struct before the struct got used.
>> For megadrivers, I want to return a variable struct based on what driver
>> is getting loaded.

>> diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c
>> index f1d1164..16f820f 100644
>> --- a/src/glx/dri_common.c
>> +++ b/src/glx/dri_common.c
>> @@ -188,9 +188,25 @@ driOpenDriver(const char *driverName)
>>  }
>>
>>  _X_HIDDEN const __DRIextension **
>> -driGetDriverExtensions(void *handle)
>> +driGetDriverExtensions(void *handle, const char *driver_name)
>>  {
>>     const __DRIextension **extensions = NULL;
>> +   const __DRIextension **(*get_extensions)(void);
>
> This doesn't match the documentation you put in dri_interface.h. It
> says the first parameter should be const char*.
>
> Marek

Thanks, I fixed the docs.  Originally I think I was going to have a
single getextensions with the driver name passed in, but this ended up
being easier in the linking process.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20131002/e5e0e9e3/attachment.pgp>


More information about the mesa-dev mailing list