Skip to content

vkr: tighten up threading for transport dispatch

Yiwei Zhang requested to merge zzyiwei/virglrenderer:vkr-ring-threads into main

The below must be dispatched from context:

  • vkCreateRingMESA
  • vkDestroyRingMESA
  • vkNotifyRingMESA
  • vkWriteRingExtraMESA
  • vkSubmitVirtqueueSeqnoMESA
  • vkWaitRingSeqnoMESA

The below must be dispatched from ring:

  • vkWaitVirtqueueSeqnoMESA

We trade in some ring<->ring flexibility for a simpler but robust threading model between vq and ring(s). e.g. For ringA waiting for ringB, it'd be translated to:

  • vq waits for ringA
  • submit vq seqno
  • ringB waits for vq

This is fine as practically there's no wait happening for apps doing background shader compilation as we'd make all pipeline compilations synchronous after they can be dispatched to a separate shader ring instead of main ring to avoid blocking.


Merge request reports