<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>1055</bug_id>
          
          <creation_ts>2014-08-30 00:32:58 +0200</creation_ts>
          <short_desc>Access and query shared master GLContext in a deterministic fashion ; Don&apos;t use arbitrary shared context as &apos;master&apos;.</short_desc>
          <delta_ts>2014-08-30 11:59:45 +0200</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Jogl</product>
          <component>core</component>
          <version>2</version>
          <rep_platform>All</rep_platform>
          <op_sys>all</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>---</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Sven Gothel">sgothel</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          <cc>sgothel</cc>
          
          <cf_type>---</cf_type>
          <cf_scm_refs>011e13e22fd52d2e82697ffee6b4c9ca8f3d549a</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>4133</commentid>
    <comment_count>0</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2014-08-30 00:32:58 +0200</bug_when>
    <thetext>GLContext* passes the shared-master to GLContextShareSet,
which only creates a sets of shared contexts
without differentiating the master context.

GLContext*&apos;s shared-slave attempts to lock 
the realized shared-master&apos;s surface at creation.

Currently only an arbitrary shared context is selected 
due to the missing &apos;master&apos; identity.
The arbitrary shared context&apos;s surface is locked 
and its shared context handle used to create the slave context.

Lacking of using the user given shared-master
can lead to deadlock situations - and locking a &apos;wrong&apos; surface.

+++

The fix shall:
  - Allow query the user given shared-master!

  - Use the user given shared-master for locking and it&apos;s 
    context handle for the slave&apos;s creation.

  - Constrain the shared context set to _only_ one unique master context,
    to avoid confusion - fail fast! (throw exception).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4135</commentid>
    <comment_count>1</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2014-08-30 11:57:12 +0200</bug_when>
    <thetext>(In reply to comment #0)
&gt;   - Constrain the shared context set to _only_ one unique master context,
&gt;     to avoid confusion - fail fast! (throw exception).

Such constraint would break compatibility with pre-existing applications
as well as restrict shared context usage (allowed in GL spec, i.e. not forbidden).

Instead, the shared-context mapping shall map each shared-master
to a shared-slave within one shared-context-set,
allowing deterministic and individual shared-master queries!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>4136</commentid>
    <comment_count>2</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2014-08-30 11:59:45 +0200</bug_when>
    <thetext>commit 011e13e22fd52d2e82697ffee6b4c9ca8f3d549a
implements/fixes issue as described.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>