Re: Threaded submission & semaphore sharing

2019-08-02 Thread Lionel Landwerlin
Went through the spec VUs again and there is a bit that says that binary semaphores must have all of the their dependencies submitted for execution. So essentially it means in our implementation of QueueSubmit() we should be able to do a short wait_for_available on all of those which does ensure

Re: Threaded submission & semaphore sharing

2019-08-02 Thread zhoucm1
On 2019年08月02日 17:41, Lionel Landwerlin wrote: Hey David, On 02/08/2019 12:11, zhoucm1 wrote: Hi Lionel, For binary semaphore, I guess every one will think application will guarantee wait is behind the signal, whenever the semaphore is shared or used in internal-process. I think below t

Re: Threaded submission & semaphore sharing

2019-08-02 Thread Lionel Landwerlin
Hey David, On 02/08/2019 12:11, zhoucm1 wrote: Hi Lionel, For binary semaphore, I guess every one will think application will guarantee wait is behind the signal, whenever the semaphore is shared or used in internal-process. I think below two options can fix your problem: a. Can we extend

Re: Threaded submission & semaphore sharing

2019-08-02 Thread zhoucm1
Hi Lionel, For binary semaphore, I guess every one will think application will guarantee wait is behind the signal, whenever the semaphore is shared or used in internal-process. I think below two options can fix your problem: a. Can we extend vkWaitForFence so that it can be able to wait on

Re: Threaded submission & semaphore sharing

2019-08-01 Thread Lionel Landwerlin
On 02/08/2019 09:10, Koenig, Christian wrote: Am 02.08.2019 07:38 schrieb Lionel Landwerlin : On 02/08/2019 08:21, Koenig, Christian wrote: Am 02.08.2019 07:17 schrieb Lionel Landwerlin : On 02/08/2019 08:08,

Re: Threaded submission & semaphore sharing

2019-08-01 Thread Koenig, Christian
Am 02.08.2019 07:38 schrieb Lionel Landwerlin : On 02/08/2019 08:21, Koenig, Christian wrote: Am 02.08.2019 07:17 schrieb Lionel Landwerlin : On 02/08/2019 08:08, Koenig, Christian wrote: Hi Lionel, Well that looks more like your test case is buggy. Acco

Re: Threaded submission & semaphore sharing

2019-08-01 Thread Lionel Landwerlin
On 02/08/2019 08:21, Koenig, Christian wrote: Am 02.08.2019 07:17 schrieb Lionel Landwerlin : On 02/08/2019 08:08, Koenig, Christian wrote: Hi Lionel, Well that looks more like your test case is buggy. According to the code the ctx1 queue always waits for sem1

Re: Threaded submission & semaphore sharing

2019-08-01 Thread Koenig, Christian
Am 02.08.2019 07:17 schrieb Lionel Landwerlin : On 02/08/2019 08:08, Koenig, Christian wrote: Hi Lionel, Well that looks more like your test case is buggy. According to the code the ctx1 queue always waits for sem1 and ctx2 queue always waits for sem2. That's supposed to be the same underlyi

Re: Threaded submission & semaphore sharing

2019-08-01 Thread Lionel Landwerlin
On 02/08/2019 08:08, Koenig, Christian wrote: Hi Lionel, Well that looks more like your test case is buggy. According to the code the ctx1 queue always waits for sem1 and ctx2 queue always waits for sem2. That's supposed to be the same underlying syncobj because it's exported from one VkDe

Re: Threaded submission & semaphore sharing

2019-08-01 Thread Koenig, Christian
Hi Lionel, Well that looks more like your test case is buggy. According to the code the ctx1 queue always waits for sem1 and ctx2 queue always waits for sem2. This way there can't be any Synchronisation between the two. Regards, Christian. Am 02.08.2019 06:55 schrieb Lionel Landwerlin : Hey C

Re: Threaded submission & semaphore sharing

2019-08-01 Thread Lionel Landwerlin
Hey Christian, The problem boils down to the fact that we don't immediately create dma fences when calling vkQueueSubmit(). This is delayed to a thread. From a single application thread, you can QueueSubmit() to 2 queues from 2 different devices. Each QueueSubmit to one queue has a dependency

Re: Threaded submission & semaphore sharing

2019-08-01 Thread Koenig, Christian
Hi Lionel, Well could you describe once more what the problem is? Cause I don't fully understand why a rather normal tandem submission with two semaphores should fail in any way. Regards, Christian. Am 02.08.2019 06:28 schrieb Lionel Landwerlin : There aren't CTS tests covering the issue I was

Re: Threaded submission & semaphore sharing

2019-08-01 Thread Lionel Landwerlin
There aren't CTS tests covering the issue I was mentioning. But we could add them. I don't have all the details regarding your implementation but even with the "semaphore thread", I could see it running into the same issues. What if a mix of binary & timeline semaphores are handed to vkQueueSub

RE: Threaded submission & semaphore sharing

2019-08-01 Thread Zhou, David(ChunMing)
Hi Lionel, By the Queue thread is a heavy thread, which is always resident in driver during application running, our guys don't like that. So we switch to Semaphore Thread, only when waitBeforeSignal of timeline happens, we spawn a thread to handle that wait. So we don't have your this issue. B