[Mesa-dev] [PATCH v2 1/3] loader: add loader_get_extensions_name(..) helper
Christian Gmeiner
christian.gmeiner at gmail.com
Sat Nov 12 16:26:10 UTC 2016
2016-11-10 19:23 GMT+01:00 Emil Velikov <emil.l.velikov at gmail.com>:
> On 9 November 2016 at 14:50, Christian Gmeiner
> <christian.gmeiner at gmail.com> wrote:
>> Changes since v1:
>> - renamed function to loader_get_extensions_name
>> - moved function into loader
>>
>> Signed-off-by: Christian Gmeiner <christian.gmeiner at gmail.com>
>> ---
>> src/loader/loader.c | 14 ++++++++++++++
>> src/loader/loader.h | 2 ++
>> 2 files changed, 16 insertions(+)
>>
>> diff --git a/src/loader/loader.c b/src/loader/loader.c
>> index fe90307..69c23cd 100644
>> --- a/src/loader/loader.c
>> +++ b/src/loader/loader.c
>> @@ -51,6 +51,9 @@
>> #endif
>> #endif
>>
>> +#include <GL/gl.h>
> We don't need the above, right ?
>
It is needed by dri_interface.h:
Making all in loader
make[3]: Entering directory '/run/media/christian/christian/ac_mesa/src/loader'
CC libloader_la-loader.lo
In file included from loader.c:55:0:
../../include/GL/internal/dri_interface.h:164:51: error: unknown type
name 'GLboolean'
int (*frameTracking)(__DRIdrawable *drawable, GLboolean enable);
^~~~~~~~~
../../include/GL/internal/dri_interface.h:216:49: error: unknown type
name 'GLint'
void (*setTexOffset)(__DRIcontext *pDRICtx, GLint texname,
^~~~~
../../include/GL/internal/dri_interface.h:217:32: error: unknown type
name 'GLint'
unsigned long long offset, GLint depth, GLuint pitch);
^~~~~
../../include/GL/internal/dri_interface.h:217:45: error: unknown type
name 'GLuint'
unsigned long long offset, GLint depth, GLuint pitch);
^~~~~~
../../include/GL/internal/dri_interface.h:218:1: warning: no semicolon
at end of struct or union
};
^
../../include/GL/internal/dri_interface.h:241:5: error: unknown type
name 'GLint'
GLint target,
^~~~~
../../include/GL/internal/dri_interface.h:253:6: error: unknown type
name 'GLint'
GLint target,
^~~~~
../../include/GL/internal/dri_interface.h:254:6: error: unknown type
name 'GLint'
GLint format,
^~~~~
../../include/GL/internal/dri_interface.h:265:4: error: unknown type
name 'GLint'
GLint target,
^~~~~
../../include/GL/internal/dri_interface.h:267:1: warning: no semicolon
at end of struct or union
};
^
../../include/GL/internal/dri_interface.h:377:4: error: expected
specifier-qualifier-list before 'GLboolean'
GLboolean (*client_wait_sync)(__DRIcontext *ctx, void *fence,
^~~~~~~~~
../../include/GL/internal/dri_interface.h:452:5: error: expected
specifier-qualifier-list before 'GLboolean'
GLboolean (* getDrawableInfo) ( __DRIdrawable *drawable,
^~~~~~~~~
../../include/GL/internal/dri_interface.h:481:5: error: expected
specifier-qualifier-list before 'GLboolean'
GLboolean (*getMSCRate)(__DRIdrawable *draw,
^~~~~~~~~
../../include/GL/internal/dri_interface.h:512:5: error: unknown type
name 'GLboolean'
GLboolean front_buffer,
^~~~~~~~~
../../include/GL/internal/dri_interface.h:514:1: warning: no semicolon
at end of struct or union
};
^
../../include/GL/internal/dri_interface.h:1288:4: error: expected
specifier-qualifier-list before 'GLboolean'
GLboolean (*queryImage)(__DRIimage *image, int attrib, int *value);
^~~~~~~~~
Makefile:641: recipe for target 'libloader_la-loader.lo' failed
make[3]: *** [libloader_la-loader.lo] Error 1
make[3]: Leaving directory '/run/media/christian/christian/ac_mesa/src/loader'
Makefile:865: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/run/media/christian/christian/ac_mesa/src'
Makefile:656: recipe for target 'all' failed
make[1]: *** [all] Error 2
>> +#include <GL/internal/dri_interface.h>
>> +
> Even here we can "get away" without including dri_interface.h (some
> lovely 10+y worth of DRI history). It might feel a bit hackish though
> ;-)
>
This one is needed too:
Making all in loader
make[3]: Entering directory '/run/media/christian/christian/ac_mesa/src/loader'
CC libloader_la-loader.lo
loader.c: In function 'loader_get_extensions_name':
loader.c:408:33: error: '__DRI_DRIVER_GET_EXTENSIONS' undeclared
(first use in this function)
if (asprintf(&name, "%s_%s", __DRI_DRIVER_GET_EXTENSIONS, driver_name) < 0)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
loader.c:408:33: note: each undeclared identifier is reported only
once for each function it appears in
Makefile:641: recipe for target 'libloader_la-loader.lo' failed
make[3]: *** [libloader_la-loader.lo] Error 1
> Let me know how you feel on the latter and I can amend accordingly
> before pushing.
The only way to life without those includes would be move
__DRI_DRIVER_GET_EXTENSIONS define
but that feels quite strange.
Thanks
--
Christian Gmeiner, MSc
https://soundcloud.com/christian-gmeiner
More information about the mesa-dev
mailing list