<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Does iMX6 support egl context sharing between multiple threads? in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/Does-iMX6-support-egl-context-sharing-between-multiple-threads/m-p/395707#M57982</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andre, &lt;/P&gt;&lt;P&gt;Check if the context are compatible, according to EGL documentation, &lt;/P&gt;&lt;P style="font-size: 16px; font-family: verdana, sans-serif; margin-top: 8px; margin-bottom: 8px; color: #000000;"&gt;&lt;CODE class="constant" style="font-family: 'courier new', monospace !important;"&gt;EGL_BAD_MATCH&lt;/CODE&gt; is generated if the current rendering API is &lt;CODE class="constant" style="font-family: 'courier new', monospace !important;"&gt;EGL_NONE&lt;/CODE&gt; (this can only arise in an EGL implementation which does not support OpenGL ES, prior to the first call to &lt;CODE class="function" style="font-weight: bold !important; font-family: verdana, sans-serif !important;"&gt;eglBindAPI&lt;/CODE&gt;).&lt;/P&gt;&lt;P style="font-size: 16px; font-family: verdana, sans-serif; margin-top: 8px; margin-bottom: 8px; color: #000000;"&gt;&lt;CODE class="constant" style="font-family: 'courier new', monospace !important;"&gt;EGL_BAD_MATCH&lt;/CODE&gt; is generated if the server context state for &lt;EM class="parameter"&gt;&lt;CODE&gt;share_context&lt;/CODE&gt;&lt;/EM&gt; exists in an address space which cannot be shared with the newly created context, if &lt;EM class="parameter"&gt;&lt;CODE&gt;share_context&lt;/CODE&gt;&lt;/EM&gt; was created on a different display than the one referenced by &lt;EM class="parameter"&gt;&lt;CODE&gt;config.&lt;/CODE&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 16px; font-family: verdana, sans-serif; margin-top: 8px; margin-bottom: 8px; color: #000000;"&gt;Also make sure that you are not calling &lt;SPAN style="color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;eglInitialize every time you create a context.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 16px; font-family: verdana, sans-serif; margin-top: 8px; margin-bottom: 8px; color: #000000;"&gt;&lt;/P&gt;&lt;P style="font-size: 16px; font-family: verdana, sans-serif; margin-top: 8px; margin-bottom: 8px; color: #000000;"&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Apr 2015 16:34:09 GMT</pubDate>
    <dc:creator>Bio_TICFSL</dc:creator>
    <dc:date>2015-04-14T16:34:09Z</dc:date>
    <item>
      <title>Does iMX6 support egl context sharing between multiple threads?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Does-iMX6-support-egl-context-sharing-between-multiple-threads/m-p/395706#M57981</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Currently I used Vivante OpenGLES 1.1 and EGL 1.4 library in i.MX6 platform, and I want to share egl context between two different threads.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Here is my implementation:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thread 1:&lt;/P&gt;&lt;P&gt;mSharedContext = eglCreateContext( egl_display, egl_config, NULL, contextAttrbs);&lt;/P&gt;&lt;P&gt;... ...&lt;/P&gt;&lt;P&gt;Thread 2:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;mContext = eglCreateContext( egl_display, egl_config, &lt;SPAN style="font-size: 13.3333330154419px;"&gt;mSharedContext &lt;/SPAN&gt;, contextAttrbs);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There was no error in Thread 1, but eglGetError() always returns EGL_BAD_MATCH when running eglCreateContext in Thread 2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I wonder Vivante OpenGLES 1.1 library in i.MX6 platform could support context sharing between multiple threads.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Any help is appreciated in advance.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Apr 2015 04:49:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Does-iMX6-support-egl-context-sharing-between-multiple-threads/m-p/395706#M57981</guid>
      <dc:creator>andrechung</dc:creator>
      <dc:date>2015-04-10T04:49:46Z</dc:date>
    </item>
    <item>
      <title>Re: Does iMX6 support egl context sharing between multiple threads?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Does-iMX6-support-egl-context-sharing-between-multiple-threads/m-p/395707#M57982</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andre, &lt;/P&gt;&lt;P&gt;Check if the context are compatible, according to EGL documentation, &lt;/P&gt;&lt;P style="font-size: 16px; font-family: verdana, sans-serif; margin-top: 8px; margin-bottom: 8px; color: #000000;"&gt;&lt;CODE class="constant" style="font-family: 'courier new', monospace !important;"&gt;EGL_BAD_MATCH&lt;/CODE&gt; is generated if the current rendering API is &lt;CODE class="constant" style="font-family: 'courier new', monospace !important;"&gt;EGL_NONE&lt;/CODE&gt; (this can only arise in an EGL implementation which does not support OpenGL ES, prior to the first call to &lt;CODE class="function" style="font-weight: bold !important; font-family: verdana, sans-serif !important;"&gt;eglBindAPI&lt;/CODE&gt;).&lt;/P&gt;&lt;P style="font-size: 16px; font-family: verdana, sans-serif; margin-top: 8px; margin-bottom: 8px; color: #000000;"&gt;&lt;CODE class="constant" style="font-family: 'courier new', monospace !important;"&gt;EGL_BAD_MATCH&lt;/CODE&gt; is generated if the server context state for &lt;EM class="parameter"&gt;&lt;CODE&gt;share_context&lt;/CODE&gt;&lt;/EM&gt; exists in an address space which cannot be shared with the newly created context, if &lt;EM class="parameter"&gt;&lt;CODE&gt;share_context&lt;/CODE&gt;&lt;/EM&gt; was created on a different display than the one referenced by &lt;EM class="parameter"&gt;&lt;CODE&gt;config.&lt;/CODE&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P style="font-size: 16px; font-family: verdana, sans-serif; margin-top: 8px; margin-bottom: 8px; color: #000000;"&gt;Also make sure that you are not calling &lt;SPAN style="color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;eglInitialize every time you create a context.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 16px; font-family: verdana, sans-serif; margin-top: 8px; margin-bottom: 8px; color: #000000;"&gt;&lt;/P&gt;&lt;P style="font-size: 16px; font-family: verdana, sans-serif; margin-top: 8px; margin-bottom: 8px; color: #000000;"&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Apr 2015 16:34:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Does-iMX6-support-egl-context-sharing-between-multiple-threads/m-p/395707#M57982</guid>
      <dc:creator>Bio_TICFSL</dc:creator>
      <dc:date>2015-04-14T16:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Does iMX6 support egl context sharing between multiple threads?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/Does-iMX6-support-egl-context-sharing-between-multiple-threads/m-p/395708#M57983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked my code and here are my conclusion:&lt;/P&gt;&lt;P&gt;1. I've tested &lt;SPAN style="font-family: 'arial black', 'avant garde';"&gt;eglQueryAPI&lt;/SPAN&gt;, it returns &lt;SPAN style="font-family: 'courier new', courier;"&gt;EGL_OPENGL_ES_API&lt;/SPAN&gt;, seems I bound API correctly.&lt;/P&gt;&lt;P&gt;2. I passed the same &lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;EM&gt;egl_display&lt;/EM&gt;&lt;/SPAN&gt; and &lt;SPAN style="font-family: 'courier new', courier;"&gt;egl_config&lt;/SPAN&gt; into two different thread's &lt;SPAN style="font-family: 'arial black', 'avant garde';"&gt;eglCreateContext&lt;/SPAN&gt; (checked by &lt;SPAN style="font-family: 'arial black', 'avant garde';"&gt;eglGetConfigAttrib&lt;/SPAN&gt;, returns the same &lt;SPAN style="font-family: 'courier new', courier;"&gt;EGL_CONFIG_ID&lt;/SPAN&gt;).&lt;/P&gt;&lt;P&gt;3. I called &lt;SPAN style="font-family: 'arial black', 'avant garde';"&gt;eglInitialize&lt;/SPAN&gt; only one time after calling &lt;SPAN style="font-family: 'arial black', 'avant garde';"&gt;eglGetDisplay&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I'm afraid that the &lt;SPAN style="font-family: 'courier new', courier;"&gt;&lt;EM&gt;shared_context&lt;/EM&gt;&lt;/SPAN&gt; was not in the same &lt;SPAN style="text-decoration: underline;"&gt;address space&lt;/SPAN&gt; so &lt;SPAN style="font-family: 'arial black', 'avant garde';"&gt;eglGetError&lt;/SPAN&gt; always returns &lt;SPAN style="font-family: 'courier new', courier;"&gt;EGL_BAD_MATCH&lt;/SPAN&gt; when I call &lt;SPAN style="font-family: 'arial black', 'avant garde';"&gt;eglCreateContext&lt;/SPAN&gt; in Thread2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there any way to verify the&lt;SPAN style="color: #575757;"&gt; &lt;SPAN style="text-decoration: underline;"&gt;address spac&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="text-decoration: underline;"&gt;e&lt;/SPAN&gt; between two threads? Or maybe I'm just missed some details?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Apr 2015 06:06:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/Does-iMX6-support-egl-context-sharing-between-multiple-threads/m-p/395708#M57983</guid>
      <dc:creator>andrechung</dc:creator>
      <dc:date>2015-04-16T06:06:15Z</dc:date>
    </item>
  </channel>
</rss>

