<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_ASSIGNED "
   title="ASSIGNED - [BSW/BDW] ogles1conform Gets test fails"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=92363#c8">Comment # 8</a>
              on <a class="bz_bug_link 
          bz_status_ASSIGNED "
   title="ASSIGNED - [BSW/BDW] ogles1conform Gets test fails"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=92363">bug 92363</a>
              from <span class="vcard"><a class="email" href="mailto:idr@freedesktop.org" title="Ian Romanick <idr@freedesktop.org>"> <span class="fn">Ian Romanick</span></a>
</span></b>
        <pre>While working on this fix, it occurs to me that meta has another potentially
serious problem.

Many GL objects can be shared between contexts.  If one thread deletes an
object while it is still bound in another context, that object continues to
exist until it's unbound.  Meta does an awful lot of unbinding of objects...
and expects those objects to not vanish. :(

To go along with the previous tests, we need a test that creates two contexts
in the same share group.  Each context is made current in a different thread. 
For each object type, for each meta operation, thread A:

    - Creates and binds the object.

    - Sends a message (through some means) to thread B.

    - Wait for ACK from thread B.

    - Perform the meta operation

    - Verify:

        - No GL error was generated.

        - The object is still bound.

        - The object still has the correct data.

Thread B just sits in a loop:

    - Wait for a message from thread A.

    - Perform the action of the message (i.e., delete the object).

    - ACK thread A.

I'm envisioning two pthread_cond_t objects (one to signal a message is ready,
and one to signal the operation is complete) and a single structure like:

struct delete_command {
    enum {
        texture, buffer, framebuffer, renderbuffer, sampler, etc;
    } object_type;
    GLuint object_name;
} command;

used to communicate between the two threads.

The other set of tests is definitely the higher priority.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>