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
CheapWindowsVPS是一家成立于2007年的老牌国外主机商,顾名思义,一个提供便宜的Windows系统VPS主机(同样也支持安装Linux系列的哈)的商家,可选数据中心包括美国洛杉矶、达拉斯、芝加哥、纽约、英国伦敦、法国、新加坡等等,目前商家针对VPS主机推出5折优惠码,优惠后最低4GB内存套餐月付仅4.5美元。下面列出几款VPS主机配置信息。CPU:2cores内存:4GB硬盘:60G...
无忧云怎么样?无忧云是一家成立于2017年的老牌商家旗下的服务器销售品牌,现由深圳市云上无忧网络科技有限公司运营,是正规持证IDC/ISP/IRCS商家,主要销售国内、中国香港、国外服务器产品,线路有腾讯云国外线路、自营香港CN2线路等,都是中国大陆直连线路,非常适合免备案建站业务需求和各种负载较高的项目,同时国内服务器也有多个BGP以及高防节点,目前商家开启了夏日清凉补贴活动,商家的机器还是非常...
每年的7月的最后一个周五是全球性质的“系统管理员日”,据说是为了感谢系统管理员的辛苦工作....friendhosting决定从现在开始一直到9月8日对其全球9个数据中心的VPS进行4.5折(优惠55%)大促销。所有VPS基于KVM虚拟,给100M带宽,不限制流量,允许自定义上传ISO...官方网站:https://friendhosting.net比特币、信用卡、PayPal、支付宝、微信、we...
swap为你推荐
日本软银集团请介绍一下日本软银。向那些中国企业投资过?天玑1000plus和骁龙865哪个好各位觉得联发科最新芯片天机1000靠谱吗?真的能打过麒麟990?涡轮增压和自然吸气哪个好涡轮增压与自然吸气哪个好压缩软件哪个好解压软件哪个好宝来和朗逸哪个好朗逸 和 宝来 哪个好?电陶炉和电磁炉哪个好电陶炉和电磁炉哪个好手机炒股软件哪个好什么手机炒股软件好用,你们都用哪个看书软件哪个好什么读书app好用扣扣空间登录QQ空间怎么老是提示登陆?qq空间登录器怎样直接登录QQ空间
老域名 中国域名交易中心 中国万网域名 香港机房托管 表格样式 抢票工具 360抢票助手 debian源 台湾谷歌地址 百兆独享 seednet 双线主机 如何用qq邮箱发邮件 最漂亮的qq空间 七夕快乐英语 厦门电信 smtp虚拟服务器 备案空间 国内域名 个人免费邮箱 更多