LunarG / vktrace

Vulkan vktrace / vkreplay
Other
6 stars 8 forks source link

Problems playing back events sample #46

Open TonyBarbour opened 8 years ago

TonyBarbour commented 8 years ago

Tracing and replaying the events sample, the playback hangs due to the following code from vkreplay_vk_replay_gen.cpp in vkGetEventStatus:

do {

replayResult = m_vkFuncs.real_vkGetEventStatus(remappeddevice, remappedevent); } while ((pPacket->result == VK_EVENT_SET || pPacket->result == VK_EVENT_RESET) && replayResult != pPacket->result); The sample in question sends a command buffer to the hardware and polls vkGetEventStatus until it gets VK_EVENT_SET. It gets back VK_EVENT_RESET some number of times until the event hits the desired stage of the pipeline, and then it gets back VK_EVENT_SET. For this code to work, playback would have to get the same number of VK_EVENT_RESETs as the trace does before getting the VK_EVENT_SET, which is far from certain to happen. In the case I debugged, replay got back VK_EVENT_SET while the packet result was VK_EVENT_RESET and it would never exit the loop, since replay would never get anything other than VK_EVENT_SET.