<div class="gmail_quote">On Fri, Dec 10, 2010 at 10:58 AM, Chia-I Wu <span dir="ltr"><<a href="mailto:olvaffe@gmail.com">olvaffe@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div class="h5">On Fri, Dec 10, 2010 at 10:55 AM, Jammy Zhou <<a href="mailto:jammy.zhou@linaro.org">jammy.zhou@linaro.org</a>> wrote:<br>
> 2010/12/9 Chia-I Wu <<a href="mailto:olvaffe@gmail.com">olvaffe@gmail.com</a>><br>
>> 2010/12/9 Kristian Høgsberg <<a href="mailto:krh@bitplanet.net">krh@bitplanet.net</a>>:<br>
>> > 2010/12/9 Jammy Zhou <<a href="mailto:jammy.zhou@linaro.org">jammy.zhou@linaro.org</a>>:<br>
>> >> Hi All,<br>
>> >><br>
>> >> Currently I am doing some experiments with mesa 7.9 driver to check the<br>
>> >> renderer info of underlying OpenGL and OpenGL ES2.0 drivers to decide<br>
>> >> which<br>
>> >> driver to use at runtime. With my code attached, the renderer info for<br>
>> >> GLES2<br>
>> >> can be got successfully, and although the EGL and GLES2 libraries are<br>
>> >> unloaded before creating the GLX context, glGetString(GL_RENDERER) for<br>
>> >> OpenGL still returns NULL. After enable MESA_DEBUG, I found the error<br>
>> >> message "GL User Error: calling GL function without a rendering<br>
>> >> context",<br>
>> >> and many warnings as "Mesa warning: failed to remap ....". I also<br>
>> >> changed<br>
>> >> the sequence for GL and GLES2, but got similar results. If do<br>
>> >> separately,<br>
>> >> both renderer info can be got successfully. It seems that EGL/GLES2 and<br>
>> >> GLX/GL affects each other in this case, may be related to library<br>
>> >> load/unload(?). Do you guys have some ideas to solve this problem?<br>
>> ><br>
>> > Yes, this is a limitation in the way the dri driver implements<br>
>> > different APIs. We have a few global tables that get initialized with<br>
>> > API specific data, so if you switch to a different GL API later, it<br>
>> > will give you the remapping errors you saw.<br>
>> > It would be nice to fix, but I don't know that anybody is looking into<br>
>> > it.<br>
>> 16ee7a55ae269612263468195f2af998cb9ef695 should solve the remapping<br>
>> errors. It allows contexts of different client APIs to coexist. But<br>
>> yes, there are still some global tables (e.g. glGet* table) that are<br>
>> not multiple-API aware. There are also places that API check is done<br>
>> at compile time...<br>
> I just tried latest mesa with 16ee7a55ae269612263468195f2af9<br>
> 98cb9ef695 you mentioned, but the remapping errors are still there.<br>
</div></div>Do you have a test case for that?<br></blockquote><div><br>I have created a bug in the bugzilla for tracking: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=32285">https://bugs.freedesktop.org/show_bug.cgi?id=32285</a>. And you can get the test code there as an attachment.<br>
<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div class="h5">>><br>
>> > Kristian<br>
>> > _______________________________________________<br>
>> > mesa-dev mailing list<br>
>> > <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
>> > <a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
>> ><br>
>><br>
>><br>
>><br>
>> --<br>
>> olv@LunarG.com<br>
><br>
><br>
<br>
<br>
<br>
</div></div><font color="#888888">--<br>
olv@LunarG.com<br>
</font></blockquote></div><br>