This reduces memory needed dramatically, as unneeded resources can be immediately returned to the pool. Although waitforfences is threadsafe, we add a mutex wait around it, as the mutex fence in combination with waitforfences assures us that no other thread will reset the fence in the meanwhile whilst the mutex is locked. This allows is to call ff_vk_exec_discard_deps. Patch attached.