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