-
Notifications
You must be signed in to change notification settings - Fork 435
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for extension VK_EXT_headless_surface. #2086
Add support for extension VK_EXT_headless_surface. #2086
Conversation
The (now renamed) |
Yes. This is the function that's used for the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A minor grammatical error and... well, a preëxisting bug, but since you're changing that code...
- Consolidate info about CAMetalLayer and headless in MVKSurface. - MVKSwapchainImage remove getCAMetalDrawable() and focus on abstracting getMTLTexture(). - MVKPresentableSwapchainImage::getCAMetalDrawable() return nil if headless. - Add MVKPresentableSwapchainImage::_mtlTextureHeadless to support a fixed MTLTexture that is not retrieved from a CAMetalDrawable. - MVKPresentableSwapchainImage refactor signalling semaphores and fences. - MVKPresentableSwapchainImage don't lock when signalling semaphores and fences. - If no present occurs, actualPresentTime will be zero. Set it to current time, instead of to desiredPresentTime, since it's more accurate. - Rework timestamps: - Remove _mvkTimestampBase so mvkGetTimestamp() is equal to mach_absolute_time(), which is used in presentation timing. - Add mvkGetRuntimeNanoseconds(). - Rename mvkGetAbsoluteTime() to mvkGetContinuousNanoseconds(). - Remove mvkGetTimestampPeriod() as unused. - MVKSemaphoreMTLEvent::encodeDeferredSignal remove redundant nil test (unrelated). - Fix swapchain and surface bugs when windowing system is accessed from off the main thread (unrelated). - Log warning when deprecated functions vkCreateMacOSSurfaceMVK() or vkCreateIOSSurfaceMVK() are used (unrelated). - Remove documentation for visionos, as support is not ready (unrelated).
7a25719
to
90eb1af
Compare
Thanks for noticing the connection to #2085. While I was in there, I made a couple of additional changes about windowing systems. And while I was doing that, I also removed the documentation for |
CAMetalLayer
and headless inMVKSurface
.MVKSwapchainImage
removegetCAMetalDrawable()
and focus on abstractinggetMTLTexture()
.MVKPresentableSwapchainImage::getCAMetalDrawable()
returnnil
if headless.MVKPresentableSwapchainImage::_mtlTextureHeadless
to support a fixedMTLTexture
that is not retrieved from aCAMetalDrawable
.MVKPresentableSwapchainImage
refactor signalling semaphores and fences.MVKPresentableSwapchainImage
don't lock when signalling semaphores and fences.actualPresentTime
will be zero. Set it to current time, instead of todesiredPresentTime
, since it's more accurate._mvkTimestampBase
somvkGetTimestamp()
is equal tomach_absolute_time()
, which is used in presentation timing.mvkGetRuntimeNanoseconds()
.mvkGetAbsoluteTime()
tomvkGetContinuousNanoseconds()
.mvkGetTimestampPeriod()
as unused.MVKSemaphoreMTLEvent::encodeDeferredSignal
remove redundantnil
test (unrelated).vkCreateMacOSSurfaceMVK()
or
vkCreateIOSSurfaceMVK()
are used (unrelated).visionos
, as support is not ready (unrelated).Fixes #2049.
Fixes #2085.
Passes all related CTS WSI tests.