CopyrightKhronosGroup2016-Page193SwapchainsUnchained!
(WhatyouneedtoknowaboutVulkanWSI)AlonOr-bach,Chair,VulkanSystemIntegrationSub-Group–May2016@alonorbach(disclaimersapply!
)CopyrightKhronosGroup2016-Page194IntrotoVulkanWindowSystemIntegrationExplicitcontrolforacquisitionandpresentationofimages-DesignedtofittheVulkanAPIandtoday'scompositingwindowsystemsNotallextensionsaresupportedbyeveryplatform-YouMUSTcheckandenabletheextensionsyourapp/engineuses!
!
!
Today'spresentationshouldhelpyougetpresentationworking-Learnhowtopresentthroughaswapchain-OverviewofVulkanobjectsusedbytheWSIextensionsWSIJargonBusterPlatformOurterminologyforanOS/windowsysteme.
g.
Android,Windows,Wayland,X11viaXCBPresentationEngineTheplatform'scompositorordisplayengineApplicationYourapporgameengineCopyrightKhronosGroup2016-Page195HowmanyWSIextensionsarethereTwocross-platforminstanceextensions-VK_KHR_surface-VK_KHR_displaySix(platform)instanceextensions-VK_KHR_android_surface-VK_KHR_mir_surface-VK_KHR_wayland_surface-VK_KHR_win32_surface-VK_KHR_xcb_surface-VK_KHR_xlib_surfaceTwocross-platformdeviceextensions-VK_KHR_swapchain-VK_KHR_display_swapchainCopyrightKhronosGroup2016-Page196VulkanSurfacesVkSurfaceKHR-Vulkan'swaytoencapsulateanativewindow/surfacePlatform-independentsurfacequeries-Findoutcrucialinformationaboutyoursurface'sproperties-Suchasformat,transform,imageusage-SomeplatformsprovideadditionalqueriesPresentationsupportisperqueuefamily-Animplementationmaysupportmultipleplatformse.
g.
bothxlibandxcb-OrmaynotsupportpresentationatallPhysicalDeviceAPlatformXQueueFamily2QueueFamily1QueueFamily0PlatformYPhysicalDeviceBQueueFamily1QueueFamily0PhysicalDeviceCQueueFamily1QueueFamily0UnlikeanEGLSurface,creatingaVulkanSurfacedoesn'tmeanyou'vegotyourrendertargetscreated…yetCopyrightKhronosGroup2016-Page197VulkanSwapchains:VK_KHR_swapchainArrayofpresentableimagesassociatedwithasurface-Applicationrequestsaminimumnumberofpresentableimages-Implementationcreatesatleastthatnumber-ImplementationmayhavealimitUpfrontallocationofpresentableimages-Noallocationhitchingatcrucialmoment-Pre-recordfixedcontentcommandbuffersPresentmodedeterminesbehavior-FIFOsupportmandatory-Platformscanoffermailbox,immediate,FIFOrelaxedconstVkSwapchainCreateInfoKHRcreateInfo={VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR,//sTypeNULL,//pNext0,//flagsmySurface,//surfacedesiredNumberOfPresentableImages,//minImageCountsurfaceFormat,//imageFormatsurfaceColorSpace,//imageColorSpacemyExtent,//imageExtent1,//imageArrayLayersVK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT,//imageUsageVK_SHARING_MODE_EXCLUSIVE,//imageSharingMode0,//queueFamilyIndexCountNULL,//pQueueFamilyIndicessurfaceProperties.
currentTransform,//preTransformVK_COMPOSITE_ALPHA_INHERIT_BIT_KHR,//compositeAlphaswapchainPresentMode,//presentModeVK_TRUE,//clippedVK_NULL_HANDLE//oldSwapchain};FIFOislikeeglSwapInterval=1Mailbox/ImmediateislikeeglSwapInterval0FIFOrelaxedislikeEXT_swap_control_tearCopyrightKhronosGroup2016-Page198SimilarbutneaterthanhowEGL_KHR_partial_update/EGL_EXT_buffer_ageandpreservedbehaviorachievesthisVulkanSwapchains:They'regood!
Applicationknowswhichimagewithinaswapchainitispresenting-ContentofimagepreservedbetweenpresentsApplicationisresponsibleforexplicitlyrecreatingswapchains-nosurprises-Platforminformsappifcurrentswapchain-Suboptimal:e.
g.
afterwindowresize,swapchainstillusableforpresentviaimagescaling-SurfaceLost:swapchainnolongerusableforpresent-ApplicationisresponsibletocreateanewswapchainInEGL,theEGLSurfacemayberesizedbytheplatformafteraneglSwapBufferscall.
VulkanrequirestheapplicationtointerveneCopyrightKhronosGroup2016-Page199VulkanSwapchains:They'rejollygood!
Presentingandacquiringareseparateoperations-Noneedtosubmitanewimagetoacquireanotherone,unlesspresentationenginecannotreleaseitApplicationmustonlymodifypresentableimagesithasacquiredPresentationenginemustonlydisplaypresentableimagesthathavebeenpresented!
Stallsinframeloopareverybad!
InEGL,callingeglSwapBuffersbothpresentsthecurrentbackbufferandacquiresanewoneVulkansplitsthisupintoseparateoperationsCopyrightKhronosGroup2016-Page200VK_KHR__surfaceVK_KHR_surfaceVK_KHR_swapchainPlatform-specificAPIsStepstosetupyourpresentableimages1–Createanativewindow/surface2–CreateaVulkansurface3–Queryinformationaboutyoursurface4–CreateaVulkanswapchain5–GetyourpresentableimagesCopyrightKhronosGroup2016-Page201VK_KHR_swapchainVulkanFrameLoop–aseasyas1-2-3!
2–Submitcommandbuffer(s)forthatimage1–Acquirethenextpresentableimage3–Presenttheimage0–CreateyourswapchainLegendSetupSteady-stateResponsetosuboptimal/surface_lostCopyrightKhronosGroup2016-Page202VulkanDisplays:VK_KHR_displayVulkan'swaytodiscoverdisplaydevices(screens,panels)outsideawindowsystem-Reminder:NotsupportedonallplatformsDefinesVkDisplayKHRandVkDisplayModeKHRobjects-RepresentthedisplaydevicesandthemodestheysupportconnectedtoaVkPhysicalDevice-DetermineifadisplaysupportsmultipleplanesthatareblendedtogetherEnablescreationofaVkSurfaceKHRtorepresentadisplayplanePhysicalDeviceSurfaceDisplay0Plane2Plane1Plane0DisplayMode1DisplayMode0Display1DisplayMode1DisplayMode0AVulkandisplayrepresentsanactualdisplay!
(WhereasanEGLDisplayisactuallyjustaconnectiontoadriver–likeaVulkanDevice)CopyrightKhronosGroup2016-Page203VK_KHR_display_swapchainExtendstheinformationprovidedatvkQueuePresentKHR-Whatregiontopresentfromtheswapchainimage-Whatregiontopresenttoonthedisplay-WhetherthedisplayshouldpersisttheimageAddsabilitytocreateasharedswapchain-SwapchainthattakesmultipleVkSwapchainCreateInfoKHRstructs-Allowsmultipledisplaystobepresentedtosimultaneously-Noguaranteethatpresentsareatomic.
.
.
presently!
CopyrightKhronosGroup2016-Page204Anyquestionalon.
orbach@samsung.
com@alonorbach
Digital-vm是一家成立于2019年的国外主机商,商家提供VPS和独立服务器租用业务,其中VPS基于KVM架构,提供1-10Gbps带宽,数据中心可选包括美国洛杉矶、日本、新加坡、挪威、西班牙、丹麦、荷兰、英国等8个地区机房;除了VPS主机外,商家还提供日本、新加坡独立服务器,同样可选1-10Gbps带宽,最低每月仅80美元起。下面列出两款独立服务器配置信息。配置一 $80/月CPU:E3-...
无忧云怎么样?无忧云值不值得购买?无忧云,无忧云是一家成立于2017年的老牌商家旗下的服务器销售品牌,现由深圳市云上无忧网络科技有限公司运营,是正规持证IDC/ISP/IRCS商家,主要销售国内、中国香港、国外服务器产品,线路有腾讯云国外线路、自营香港CN2线路等,都是中国大陆直连线路,非常适合免备案建站业务需求和各种负载较高的项目,同时国内服务器也有多个BGP以及高防节点。目前,四川雅安机房,4...
美国知名管理型主机公司,2006年运作至今,虚拟主机、VPS、云服务器、独立服务器等业务全部采用“managed”,也就是人工参与度高,很多事情都可以人工帮你处理,不过一直以来价格也贵。也不知道knownhost什么时候开始运作无管理型业务的,估计是为了扩展市场吧,反正是出来较长时间了。闲来无事,那就给大家介绍下“unmanaged VPS”,也就是无管理型VPS,低至5美元/月,基于KVM虚拟,...
swap为你推荐
软银支付日本支付平台压缩软件哪个好电脑常用压缩软件哪个好手机杀毒软件哪个好手机用什么杀毒软件好无纺布和熔喷布口罩哪个好大雾天气带什么样的口罩最好百度空间登录百度空间怎么登陆百度空间登录百度空间登陆如何增加百度收录如何提高百度收录率?东莞电信宽带东莞电信宽带资费问题。急!dns服务器未响应电脑上不了网了,显示DNS服务器未响应,什么意思首选dns服务器地址什么是首选DNS服务器和备用DNS服务器?
亚洲大于500m raksmart softbank官网 阿里云代金券 圣诞节促销 大容量存储 777te 200g硬盘 129邮箱 四核服务器 四川电信商城 空间租赁 台湾google 外贸空间 什么是web服务器 国外的代理服务器 阿里云邮箱登陆 supercache 免备案jsp空间 百度新闻源申请 更多