Bill Hollings f0cb31a12b Rework workaround to force incomplete CAMetalDrawable presentations to complete.
- To force any incomplete CAMetalDrawable presentations to complete,
  don't force the creation of another transient drawable, as this can
  stall the creation of future drawables. Instead, when a swapchain
  is destroyed, or replaced by a new swapchain, set the CAMetalLayer
  drawableSize, which will force presentation completion.
- Add presentation completion handler in command buffer scheduling
  callback, move marking available to presentation completion handler,
  and minimize mutex locking.
- MVKQueue::waitIdle() remove wait for swapchain presentations,
  and remove callbacks to MVKQueue from drawable completions.
- MVKQueue::submit() don't bypass submitting a misconfigured submission,
  so that semaphores and fences will be signalled, and ensure misconfigured
  submissions are well behaved.
- Add MVKSwapchain::getCAMetalLayer() to streamline layer access (unrelated).
2023-09-15 09:54:48 -04:00
..