[Mesa-dev] Check OpenGL and OpenGL ES2.0 renderer info in one process

Jammy Zhou jammy.zhou at linaro.org
Thu Dec 9 18:55:01 PST 2010


2010/12/9 Chia-I Wu <olvaffe at gmail.com>

> 2010/12/9 Kristian Høgsberg <krh at bitplanet.net>:
> > 2010/12/9 Jammy Zhou <jammy.zhou at linaro.org>:
> >> Hi All,
> >>
> >> Currently I am doing some experiments with mesa 7.9 driver to check the
> >> renderer info of underlying OpenGL and OpenGL ES2.0 drivers to decide
> which
> >> driver to use at runtime. With my code attached, the renderer info for
> GLES2
> >> can be got successfully, and although the EGL and GLES2 libraries are
> >> unloaded before creating the GLX context, glGetString(GL_RENDERER) for
> >> OpenGL still returns NULL. After enable MESA_DEBUG, I found the error
> >> message "GL User Error: calling GL function without a rendering
> context",
> >> and many warnings as "Mesa warning: failed to remap ....".  I also
> changed
> >> the sequence for GL and GLES2, but got similar results. If do
> separately,
> >> both renderer info can be got successfully. It seems that EGL/GLES2 and
> >> GLX/GL affects each other in this case, may be related to library
> >> load/unload(?). Do you guys have some ideas to solve this problem?
> >
> > Yes, this is a limitation in the way the dri driver implements
> > different APIs.  We have a few global tables that get initialized with
> > API specific data, so if you switch to a different GL API later, it
> > will give you the remapping errors you saw.
> > It would be nice to fix, but I don't know that anybody is looking into
> it.
> 16ee7a55ae269612263468195f2af998cb9ef695 should solve the remapping
> errors.  It allows contexts of different client APIs to coexist.  But
> yes, there are still some global tables (e.g. glGet* table) that are
> not multiple-API aware.  There are also places that API check is done
> at compile time...
>
>
I just tried latest mesa with 16ee7a55ae269612263468195f2af9
98cb9ef695 you mentioned, but the remapping errors are still there.



> > Kristian
> > _______________________________________________
> > mesa-dev mailing list
> > mesa-dev at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> >
>
>
>
> --
> olv at LunarG.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20101210/1126221e/attachment.html>


More information about the mesa-dev mailing list