[Bug 103304] multi-threaded usage of Gallium RadeonSI leads to NULL pointer exception in pb_cache_reclaim_buffer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Comment # 3 on bug 103304 from
After thinking about it some more, I think it's very likely that your
application also has a bug, a write-after-read bug to be precise.

What I'm suspecting is that you're doing this:

  Thread 1              Thread 2
  --------              --------
  glBindTexture(tex);
  glDraw*(...);
  glFlush();
                        glTextureSubImage(tex, ...);

Unless you use glFinish() or glFenceSync() / glWaitSync() synchronization,
there is no guarantee that thread 1's draw has completed before thread 2's
texture change. In other words, the implementation is allowed to execute the
texture modification *before* the draw. Especially with Gallium threading, this
is quite likely to happen.

(We still also have a bug in the driver, but until I can actually double-check
your code, I'd say it's quite likely that you have a write-after-read hazard
like the one explained above.)


You are receiving this mail because:
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux