<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Space Rangers 2 (in Wine) shows only black screen"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=91171#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Space Rangers 2 (in Wine) shows only black screen"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=91171">bug 91171</a>
              from <span class="vcard"><a class="email" href="mailto:imirkin@alum.mit.edu" title="Ilia Mirkin <imirkin@alum.mit.edu>"> <span class="fn">Ilia Mirkin</span></a>
</span></b>
        <pre>Ah yeah, nouveau fails pretty substantially at multiple concurrent GL contexts
used simultaneously from different threads (this is a nouveau shortcoming, not
a mesa one). Multiple contexts that are switched around with glXMakeCurrent
from a single thread should operate fine though.

Indeed looking at the trace, I see

79407 glBindFramebuffer(target = GL_DRAW_FRAMEBUFFER, framebuffer = 0)
79409 glReadBuffer(mode = GL_COLOR_ATTACHMENT0)
79412 glDrawBuffer(mode = GL_FRONT)
79417 glBlitFramebuffer(srcX0 = 0, srcY0 = 0, srcX1 = 1024, srcY1 = 768, dstX0
= 0, dstY0 = 768, dstX1 = 1024, dstY1 = 0, mask = 
GL_COLOR_BUFFER_BIT, filter = GL_NEAREST)
79419 glFlush()

followed immediately by creating a (actually two!) new contexts, and discarding
the old stuff. [Looks like it does both glXCreateContext *and*
glXCreateContextAttribsARB, and discards the first one of those.]

I was looking over what flush did, and it does indeed explicitly flush the
frontbuffer to screen if it's the current drawbuffer. [or something along those
lines]. Tracing through that flow, it's entirely over my head... interactions
between multiple modules of which I know nothing. I don't see anywhere where
it'd be waiting for that blit to complete either, but that doesn't mean it's
not there. Perhaps this should be a glFinish()?

I'm afraid this will have to wait for someone to understand what the issue is
before it can be fixed.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>