[Glamor] glamor with current xserver Git
Michel Dänzer
michel at daenzer.net
Mon Sep 17 01:07:51 PDT 2012
On Mon, 2012-09-17 at 15:51 +0800, He Junyan wrote:
> Hi:
>
> I think we need to discuss this problem.
>
> I trace this problem and find that this problem caused by the glx
> extension of xserver.
> In the code of glx extension, it re-defines the symbols:
>
> PUBLIC void _glapi_set_context(void *context)
> PUBLIC void *_glapi_get_context(void)
> PUBLIC void _glapi_set_dispatch(struct _glapi_table *dispatch)
> PUBLIC struct _glapi_table *_glapi_get_dispatch(void)
> PUBLIC int _glapi_add_dispatch(const char *const *function_names, const
> char *parameter_signature)
> ....
>
> These symbols can be found both in glx and mapi and collide with each
> other, and which one is called
> really depends on the loading sequence of libglx.so and libglapi.so .
>
> Both glx and egl will call the APIs of __DRIdri2Extension and
> __DRIcoreExtension of dri drivers to create
> the screen and context, so the screen and context struct seems compatible.
> But for the getting the gl functions' address, they are not compatible.
> eglGetProcAddress will depend a gl function's stub which is established
> by _glapi_add_dispatch, and the stub
> will call the really gl function in _glapi_table. But
> _glapi_add_dispatch in glx no not do this.
> glx use another manner to call functions in the _glapi_table.
> So in glamor, eglGetProcAddress just get invalid function address and
> have error when call gl function.
>
> I am creating the glx wrapper layer to fix this, but find glx define
> another the _glapi_table struct and different
> from it in mapi. This means call glx's gl function may be mapped to
> wrong really gl function in mesa, so we still
> seem have some risk by this manner.
Hmm. I don't know enough about the dispatch mechanism to suggest a
solution. Can you bring this up on the xorg-devel mailing list?
Thanks for looking into it!
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Debian, X and DRI developer
More information about the Glamor
mailing list