vkr: reduce lock contention in submit_fence and retire_fences
Currently those are locked under the global ctx->mutex
. This MR:
- add
vkr_queue::cmd_mutex
to protectVkQueue
cmds betweensubmit_cmd
andsubmit_fence
- split
vkr_context::sync_mutex
from global mutex to protectsubmit_fence
,retire_fences
and device destruction
Have the global fencing patch ready locally and tested as well.
Edited by Yiwei Zhang