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
在之前几个月中也有陆续提到两次HostYun主机商,这个商家前身是我们可能有些网友熟悉的主机分享团队的,后来改名称的。目前这个品牌主营低价便宜VPS主机,这次有可以看到推出廉价版本的美国CN2 GIA VPS主机,月费地址15元,适合有需要入门级且需要便宜的用户。第一、廉价版美国CN2 GIA VPS主机方案我们可看到这个类型的VPS目前三网都走CN2 GIA网络,而且是原生IP。根据信息可能后续...
中午的时候有网友联系提到自己前几天看到Namecheap商家开学季促销活动期间有域名促销活动的,于是就信注册NC账户注册域名的。但是今天登录居然无法登录,这个问题比较困恼是不是商家跑路等问题。Namecheap商家跑路的可能性不大,前几天我还在他们家转移域名的。这里简单的记录我帮助他解决如何重新登录Namecheap商家的问题。1、检查邮件让他检查邮件是不是有官方的邮件提示。比如我们新注册账户是需...
近日快云科技发布了最新的夏季优惠促销活动,主要针对旗下的香港CN2 GIA系列的VPS云服务器产品推送的最新的75折优惠码,国内回程三网CN2 GIA,平均延迟50ms以下,硬件配置方面采用E5 2696v2、E5 2696V4 铂金Platinum等,基于KVM虚拟架构,采用SSD硬盘存储,RAID10阵列保障数据安全,有需要香港免备案CN2服务器的朋友可以关注一下。快云科技怎么样?快云科技好不...
swap为你推荐
天玑1000plus和骁龙865哪个好各位觉得联发科最新芯片天机1000靠谱吗?真的能打过麒麟990?骁龙750g和765g哪个好高通骁龙845和骁龙835哪个好二手车网站哪个好想买个二手车,去哪买比较好等额本息等额本金哪个好到底是等额本息好还是等额本金好?尼康和佳能单反哪个好入门的单反相机 佳能和尼康哪个好?腾讯空间登录QQ空间登录qq空间登录电脑手机上怎么登陆电脑版QQ空间东莞电信网上营业厅怎样联系申请东莞中国电信固话360云盘企业版360云盘企业版网页打开的 怎么不能编辑?360云u盘360云u盘无法连接怎么回事?
老左 息壤主机 blackfriday 国外服务器 vmsnap3 申请个人网页 刀片服务器的优势 域名接入 hkt hktv 银盘服务是什么 国外视频网站有哪些 双线机房 360云服务 石家庄服务器托管 广州虚拟主机 服务器论坛 lamp怎么读 国内空间 linux服务器系统 更多