Why vkGetSemaphoreCounterValueKHR get a value of 0xffffffffffffffff

I’m trying to enable a timeline semaphore on my program.

However, if I try to get the program stuck, like clicking on the command prompt to pause my program and continue, the vkGetSemaphoreCounterValueKHR will get a little number than last time and the next time it would get a value 18446744073709551615 then the rendering hung!

The greatest and key problem is what does the value of 18446744073709551615 mean and when it would occur? I cannot find out any details in the specification: vkGetSemaphoreCounterValue(3) (khronos.org), and there is no warning and error from validation layers.

My code is just like:

    VKCheck(device->GetSemaphoreCounterValueKHR(timelineSemaphore, &completion));

    if (completion < syncValues[sync])
    {
        Check(device->Wait(&timelineSemaphore, &syncValues[sync]));
    }

The log is just like:
[info][19:18:10]: sync = 1, Completion = 2489
[info][19:18:10]: Sync Values[3] = [2514, 2508, 2511]
[info][19:18:10]: sync = 2, Completion = 2508
[info][19:18:10]: Sync Values[3] = [2514, 2517, 2511]
[info][19:18:10]: sync = 0, Completion = 2511
[info][19:18:10]: Sync Values[3] = [2514, 2517, 2520]
[info][19:18:10]: sync = 1, Completion = 2514
[info][19:18:10]: Sync Values[3] = [2523, 2517, 2520]
[info][19:18:10]: sync = 2, Completion = 2517
[info][19:18:10]: Sync Values[3] = [2523, 2526, 2520]
[info][19:18:10]: sync = 0, Completion = 2513
[info][19:18:10]: Sync Values[3] = [2523, 2526, 2529]
[info][19:18:10]: sync = 1, Completion = 18446744073709551615
[info][19:18:10]: Sync Values[3] = [2532, 2526, 2529]
[info][19:18:10]: sync = 2, Completion = 18446744073709551615
[info][19:18:10]: Sync Values[3] = [2532, 2535, 2529]
[info][19:18:10]: sync = 0, Completion = 18446744073709551615

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.