Re: [Mesa-dev] [RFC] gallium/u_queue: add barrier function

2016-07-18 Thread Rob Clark
possibly.. although sprinkling queue_barrier() calls (which is at least useful for debugging, although I think I won't use it in the end after debugging) hasn't found the issue yet. I did at least find an issue w/ fence handling (I was grabbing the fence # potentially before the batch was

Re: [Mesa-dev] [RFC] gallium/u_queue: add barrier function

2016-07-18 Thread Marek Olšák
I think your issue is that you have self-releasing jobs with the cleanup callback and you automatically lose fences that way, so there is no way to wait for completion. Since you have only 1 thread with N jobs at most, I suggest you keep N+1 fences around (a ring of fences) that you reuse for new

Re: [Mesa-dev] [RFC] gallium/u_queue: add barrier function

2016-07-18 Thread Rob Clark
On Mon, Jul 18, 2016 at 4:34 PM, Nicolai Hähnle wrote: > On 18.07.2016 22:25, Rob Clark wrote: >> >> Helper to block until all previous jobs are complete. >> --- >> So I think this might end up being useful to me in some cases.. but >> the implementation only works for a

Re: [Mesa-dev] [RFC] gallium/u_queue: add barrier function

2016-07-18 Thread Nicolai Hähnle
On 18.07.2016 22:25, Rob Clark wrote: Helper to block until all previous jobs are complete. --- So I think this might end up being useful to me in some cases.. but the implementation only works for a single threaded queue (which is all I need). I could also just put a helper in my driver code.

[Mesa-dev] [RFC] gallium/u_queue: add barrier function

2016-07-18 Thread Rob Clark
Helper to block until all previous jobs are complete. --- So I think this might end up being useful to me in some cases.. but the implementation only works for a single threaded queue (which is all I need). I could also just put a helper in my driver code. Opinions?