Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix timing mismatch issue for vkGetQueryPoolResults #1800

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

mizhen
Copy link
Contributor

@mizhen mizhen commented Oct 9, 2024

The problem

Some timing mismatch issue was observed when playing back a particular title's trace. vkGetQueryPoolResults returned VK_NOT_READY at playback time, while it returned VK_SUCCESS at the capture time.

The solution

The commit adds changes to handle the timing difference between capture time and playback time.

Result

Tested the target title with the build of the pull request, it fixed this issue.

Some timing mismatch issue was observed when playing back a particular
title's trace. vkGetQueryPoolResults returned VK_NOT_READY at playback
time, while it returned VK_SUCCESS at the capture time.  Therefore, the
commit add changes to handle the timing difference between capture time
and playback time.

Change-Id: I646f04221bc3e74591bb3fbd3d5c7ee9ae896841
@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 274636.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 4996 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 4996 passed.

@mizhen
Copy link
Contributor Author

mizhen commented Oct 9, 2024

This looks like you'd lose the timeout implemented in 75bc5b3. In order to keep that functionality, should this be converted to a time-based timeout?

Hi @bradgrantham, in the case mentioned in [75bc5b3], an infinite loop occurred in several D3D11 games running with DXVK. It seems that the query always returns VK_NOT_READY, indicating that an error has occurred prior to this call. It's possible that every following query for the same pool would also return VK_NOT_READY. Therefore, the time-based timeout value needs to be very short because it affects the frame rate.

Another approach is similar to the current vkGetFenceStatus handling. It uses command options --skip-get-fence-status or --skip-get-fence-ranges to skip the query. So, if there's no issue with vkGetFenceStatus, there's no timeout. If there's an issue with vkGetFenceStatus, the user can set the option to skip the call. We can implement the same handling, such as using --skip-get-querypool-results or --skip-get-querypool-results-ranges to skip the query for the case that an infinite loop occurred in a specific title. What do you think of this approach?

@bradgrantham-lunarg bradgrantham-lunarg added P1 Prevents an important capture from being replayed replay Issue with replay (capture was successful) vulkan labels Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 Prevents an important capture from being replayed replay Issue with replay (capture was successful) vulkan
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants