dota2 does multiple acquires followed by multiple queues,
this bug manifested itself as a hang in the xshmfence code
randomly when dota2 was doing it's menus. It also occured
when running dota2 under phoronix-test-suite.
The fix is once the image is acquired to mark it busy then
so nobody else can acquire. We have to trust vulkan apps
that they will eventually submit it.
Acked-by: Edward O'Callaghan <funfunctor@folklore1984.net>
Signed-off-by: Dave Airlie <airlied@redhat.com>
if (!chain->images[i].busy) {
/* We found a non-busy image */
*image_index = i;
+ chain->images[image_index].busy = true;
return VK_SUCCESS;
}
}
/* We found a non-busy image */
xshmfence_await(chain->images[i].shm_fence);
*image_index = i;
+ chain->images[i].busy = true;
return VK_SUCCESS;
}
}