[{"data":1,"prerenderedAt":800},["ShallowReactive",2],{"tKV1A11dGd":3},{"title":4,"description":5,"parent":6,"type":7,"xrefs":8,"body":9,"_type":799,"_id":4},"vkCreateSharedSwapchainsKHR","Create multiple swapchains that share presentable images","VK_KHR_display_swapchain","protos",[],{"type":10,"children":11,"toc":797},"root",[12,28,452,535,559,590,750,791],{"type":13,"tag":14,"props":15,"children":16},"element","p",{},[17,20,26],{"type":18,"value":19},"text","When the ",{"type":13,"tag":21,"props":22,"children":24},"a",{"href":23},"/extensions/VK_KHR_display_swapchain",[25],{"type":18,"value":6},{"type":18,"value":27}," extension is enabled, multiple\nswapchains that share presentable images are created by calling:",{"type":13,"tag":29,"props":30,"children":31},"code-group",{},[32,183],{"type":13,"tag":33,"props":34,"children":40},"pre",{"className":35,"code":36,"filename":37,"language":38,"meta":39,"style":39},"language-c shiki shiki-themes github-light-default github-dark-default","VkResult vkCreateSharedSwapchainsKHR(\n VkDevice device,\n uint32_t swapchainCount,\n const VkSwapchainCreateInfoKHR* pCreateInfos,\n const VkAllocationCallbacks* pAllocator,\n VkSwapchainKHR* pSwapchains);\n","C","c","",[41],{"type":13,"tag":42,"props":43,"children":44},"code",{"__ignoreMap":39},[45,67,87,106,134,160],{"type":13,"tag":46,"props":47,"children":50},"span",{"class":48,"line":49},"line",1,[51,57,62],{"type":13,"tag":46,"props":52,"children":54},{"style":53},"--shiki-default:#1F2328;--shiki-dark:#E6EDF3",[55],{"type":18,"value":56},"VkResult ",{"type":13,"tag":46,"props":58,"children":60},{"style":59},"--shiki-default:#8250DF;--shiki-dark:#D2A8FF",[61],{"type":18,"value":4},{"type":13,"tag":46,"props":63,"children":64},{"style":53},[65],{"type":18,"value":66},"(\n",{"type":13,"tag":46,"props":68,"children":70},{"class":48,"line":69},2,[71,76,82],{"type":13,"tag":46,"props":72,"children":73},{"style":53},[74],{"type":18,"value":75}," VkDevice ",{"type":13,"tag":46,"props":77,"children":79},{"style":78},"--shiki-default:#953800;--shiki-dark:#FFA657",[80],{"type":18,"value":81},"device",{"type":13,"tag":46,"props":83,"children":84},{"style":53},[85],{"type":18,"value":86},",\n",{"type":13,"tag":46,"props":88,"children":90},{"class":48,"line":89},3,[91,97,102],{"type":13,"tag":46,"props":92,"children":94},{"style":93},"--shiki-default:#CF222E;--shiki-dark:#FF7B72",[95],{"type":18,"value":96}," uint32_t",{"type":13,"tag":46,"props":98,"children":99},{"style":78},[100],{"type":18,"value":101}," swapchainCount",{"type":13,"tag":46,"props":103,"children":104},{"style":53},[105],{"type":18,"value":86},{"type":13,"tag":46,"props":107,"children":109},{"class":48,"line":108},4,[110,115,120,125,130],{"type":13,"tag":46,"props":111,"children":112},{"style":93},[113],{"type":18,"value":114}," const",{"type":13,"tag":46,"props":116,"children":117},{"style":53},[118],{"type":18,"value":119}," VkSwapchainCreateInfoKHR",{"type":13,"tag":46,"props":121,"children":122},{"style":93},[123],{"type":18,"value":124},"*",{"type":13,"tag":46,"props":126,"children":127},{"style":78},[128],{"type":18,"value":129}," pCreateInfos",{"type":13,"tag":46,"props":131,"children":132},{"style":53},[133],{"type":18,"value":86},{"type":13,"tag":46,"props":135,"children":137},{"class":48,"line":136},5,[138,142,147,151,156],{"type":13,"tag":46,"props":139,"children":140},{"style":93},[141],{"type":18,"value":114},{"type":13,"tag":46,"props":143,"children":144},{"style":53},[145],{"type":18,"value":146}," VkAllocationCallbacks",{"type":13,"tag":46,"props":148,"children":149},{"style":93},[150],{"type":18,"value":124},{"type":13,"tag":46,"props":152,"children":153},{"style":78},[154],{"type":18,"value":155}," pAllocator",{"type":13,"tag":46,"props":157,"children":158},{"style":53},[159],{"type":18,"value":86},{"type":13,"tag":46,"props":161,"children":163},{"class":48,"line":162},6,[164,169,173,178],{"type":13,"tag":46,"props":165,"children":166},{"style":53},[167],{"type":18,"value":168}," VkSwapchainKHR",{"type":13,"tag":46,"props":170,"children":171},{"style":93},[172],{"type":18,"value":124},{"type":13,"tag":46,"props":174,"children":175},{"style":78},[176],{"type":18,"value":177}," pSwapchains",{"type":13,"tag":46,"props":179,"children":180},{"style":53},[181],{"type":18,"value":182},");\n",{"type":13,"tag":33,"props":184,"children":189},{"className":185,"code":186,"filename":187,"language":188,"meta":39,"style":39},"language-rs shiki shiki-themes github-light-default github-dark-default","pub fn create_shared_swapchains_khr(\n device: crate :: vk :: vk::Device,\n swapchain_count: u32,\n p_create_infos: *const vk::SwapchainCreateInfoKHR,\n p_create_infos: *const vk::SwapchainCreateInfoKHR,\n p_allocator: *const vk::AllocationCallbacks,\n p_swapchains: *mut vk::SwapchainKHR,\n) -> vk::Result;\n","Rust","rs",[190],{"type":13,"tag":42,"props":191,"children":192},{"__ignoreMap":39},[193,215,266,287,321,352,385,420],{"type":13,"tag":46,"props":194,"children":195},{"class":48,"line":49},[196,201,206,211],{"type":13,"tag":46,"props":197,"children":198},{"style":93},[199],{"type":18,"value":200},"pub",{"type":13,"tag":46,"props":202,"children":203},{"style":93},[204],{"type":18,"value":205}," fn",{"type":13,"tag":46,"props":207,"children":208},{"style":59},[209],{"type":18,"value":210}," create_shared_swapchains_khr",{"type":13,"tag":46,"props":212,"children":213},{"style":53},[214],{"type":18,"value":66},{"type":13,"tag":46,"props":216,"children":217},{"class":48,"line":69},[218,223,228,233,238,243,248,253,257,262],{"type":13,"tag":46,"props":219,"children":220},{"style":53},[221],{"type":18,"value":222}," device",{"type":13,"tag":46,"props":224,"children":225},{"style":93},[226],{"type":18,"value":227},":",{"type":13,"tag":46,"props":229,"children":230},{"style":93},[231],{"type":18,"value":232}," crate",{"type":13,"tag":46,"props":234,"children":235},{"style":93},[236],{"type":18,"value":237}," ::",{"type":13,"tag":46,"props":239,"children":240},{"style":53},[241],{"type":18,"value":242}," vk ",{"type":13,"tag":46,"props":244,"children":245},{"style":93},[246],{"type":18,"value":247},"::",{"type":13,"tag":46,"props":249,"children":250},{"style":78},[251],{"type":18,"value":252}," vk",{"type":13,"tag":46,"props":254,"children":255},{"style":93},[256],{"type":18,"value":247},{"type":13,"tag":46,"props":258,"children":259},{"style":78},[260],{"type":18,"value":261},"Device",{"type":13,"tag":46,"props":263,"children":264},{"style":53},[265],{"type":18,"value":86},{"type":13,"tag":46,"props":267,"children":268},{"class":48,"line":89},[269,274,278,283],{"type":13,"tag":46,"props":270,"children":271},{"style":53},[272],{"type":18,"value":273}," swapchain_count",{"type":13,"tag":46,"props":275,"children":276},{"style":93},[277],{"type":18,"value":227},{"type":13,"tag":46,"props":279,"children":280},{"style":78},[281],{"type":18,"value":282}," u32",{"type":13,"tag":46,"props":284,"children":285},{"style":53},[286],{"type":18,"value":86},{"type":13,"tag":46,"props":288,"children":289},{"class":48,"line":108},[290,295,299,304,308,312,317],{"type":13,"tag":46,"props":291,"children":292},{"style":53},[293],{"type":18,"value":294}," p_create_infos",{"type":13,"tag":46,"props":296,"children":297},{"style":93},[298],{"type":18,"value":227},{"type":13,"tag":46,"props":300,"children":301},{"style":93},[302],{"type":18,"value":303}," *const",{"type":13,"tag":46,"props":305,"children":306},{"style":78},[307],{"type":18,"value":252},{"type":13,"tag":46,"props":309,"children":310},{"style":93},[311],{"type":18,"value":247},{"type":13,"tag":46,"props":313,"children":314},{"style":78},[315],{"type":18,"value":316},"SwapchainCreateInfoKHR",{"type":13,"tag":46,"props":318,"children":319},{"style":53},[320],{"type":18,"value":86},{"type":13,"tag":46,"props":322,"children":323},{"class":48,"line":136},[324,328,332,336,340,344,348],{"type":13,"tag":46,"props":325,"children":326},{"style":53},[327],{"type":18,"value":294},{"type":13,"tag":46,"props":329,"children":330},{"style":93},[331],{"type":18,"value":227},{"type":13,"tag":46,"props":333,"children":334},{"style":93},[335],{"type":18,"value":303},{"type":13,"tag":46,"props":337,"children":338},{"style":78},[339],{"type":18,"value":252},{"type":13,"tag":46,"props":341,"children":342},{"style":93},[343],{"type":18,"value":247},{"type":13,"tag":46,"props":345,"children":346},{"style":78},[347],{"type":18,"value":316},{"type":13,"tag":46,"props":349,"children":350},{"style":53},[351],{"type":18,"value":86},{"type":13,"tag":46,"props":353,"children":354},{"class":48,"line":162},[355,360,364,368,372,376,381],{"type":13,"tag":46,"props":356,"children":357},{"style":53},[358],{"type":18,"value":359}," p_allocator",{"type":13,"tag":46,"props":361,"children":362},{"style":93},[363],{"type":18,"value":227},{"type":13,"tag":46,"props":365,"children":366},{"style":93},[367],{"type":18,"value":303},{"type":13,"tag":46,"props":369,"children":370},{"style":78},[371],{"type":18,"value":252},{"type":13,"tag":46,"props":373,"children":374},{"style":93},[375],{"type":18,"value":247},{"type":13,"tag":46,"props":377,"children":378},{"style":78},[379],{"type":18,"value":380},"AllocationCallbacks",{"type":13,"tag":46,"props":382,"children":383},{"style":53},[384],{"type":18,"value":86},{"type":13,"tag":46,"props":386,"children":388},{"class":48,"line":387},7,[389,394,398,403,407,411,416],{"type":13,"tag":46,"props":390,"children":391},{"style":53},[392],{"type":18,"value":393}," p_swapchains",{"type":13,"tag":46,"props":395,"children":396},{"style":93},[397],{"type":18,"value":227},{"type":13,"tag":46,"props":399,"children":400},{"style":93},[401],{"type":18,"value":402}," *mut",{"type":13,"tag":46,"props":404,"children":405},{"style":78},[406],{"type":18,"value":252},{"type":13,"tag":46,"props":408,"children":409},{"style":93},[410],{"type":18,"value":247},{"type":13,"tag":46,"props":412,"children":413},{"style":78},[414],{"type":18,"value":415},"SwapchainKHR",{"type":13,"tag":46,"props":417,"children":418},{"style":53},[419],{"type":18,"value":86},{"type":13,"tag":46,"props":421,"children":423},{"class":48,"line":422},8,[424,429,434,438,442,447],{"type":13,"tag":46,"props":425,"children":426},{"style":53},[427],{"type":18,"value":428},") ",{"type":13,"tag":46,"props":430,"children":431},{"style":93},[432],{"type":18,"value":433},"->",{"type":13,"tag":46,"props":435,"children":436},{"style":78},[437],{"type":18,"value":252},{"type":13,"tag":46,"props":439,"children":440},{"style":93},[441],{"type":18,"value":247},{"type":13,"tag":46,"props":443,"children":444},{"style":78},[445],{"type":18,"value":446},"Result",{"type":13,"tag":46,"props":448,"children":449},{"style":53},[450],{"type":18,"value":451},";\n",{"type":13,"tag":453,"props":454,"children":455},"ul",{},[456,467,478,497,516],{"type":13,"tag":457,"props":458,"children":459},"li",{},[460,465],{"type":13,"tag":42,"props":461,"children":463},{"className":462},[],[464],{"type":18,"value":81},{"type":18,"value":466}," is the device to create the swapchains for.",{"type":13,"tag":457,"props":468,"children":469},{},[470,476],{"type":13,"tag":42,"props":471,"children":473},{"className":472},[],[474],{"type":18,"value":475},"swapchainCount",{"type":18,"value":477}," is the number of swapchains to create.",{"type":13,"tag":457,"props":479,"children":480},{},[481,487,489,495],{"type":13,"tag":42,"props":482,"children":484},{"className":483},[],[485],{"type":18,"value":486},"pCreateInfos",{"type":18,"value":488}," is a pointer to an array of\n",{"type":13,"tag":21,"props":490,"children":492},{"href":491},"/man/VkSwapchainCreateInfoKHR",[493],{"type":18,"value":494},"VkSwapchainCreateInfoKHR",{"type":18,"value":496}," structures specifying the parameters of\nthe created swapchains.",{"type":13,"tag":457,"props":498,"children":499},{},[500,506,508,514],{"type":13,"tag":42,"props":501,"children":503},{"className":502},[],[504],{"type":18,"value":505},"pAllocator",{"type":18,"value":507}," is the allocator used for host memory allocated for the\nswapchain objects when there is no more specific allocator available\n(see ",{"type":13,"tag":21,"props":509,"children":511},{"href":510},"/chapters/memory#memory-allocation",[512],{"type":18,"value":513},"Memory Allocation",{"type":18,"value":515},").",{"type":13,"tag":457,"props":517,"children":518},{},[519,525,527,533],{"type":13,"tag":42,"props":520,"children":522},{"className":521},[],[523],{"type":18,"value":524},"pSwapchains",{"type":18,"value":526}," is a pointer to an array of ",{"type":13,"tag":21,"props":528,"children":530},{"href":529},"/man/VkSwapchainKHR",[531],{"type":18,"value":532},"VkSwapchainKHR",{"type":18,"value":534},"\nhandles in which the created swapchain objects will be returned.",{"type":13,"tag":14,"props":536,"children":537},{},[538,543,545,551,553,557],{"type":13,"tag":42,"props":539,"children":541},{"className":540},[],[542],{"type":18,"value":4},{"type":18,"value":544}," is similar to ",{"type":13,"tag":21,"props":546,"children":548},{"href":547},"/man/vkCreateSwapchainKHR",[549],{"type":18,"value":550},"vkCreateSwapchainKHR",{"type":18,"value":552},",\nexcept that it takes an array of ",{"type":13,"tag":21,"props":554,"children":555},{"href":491},[556],{"type":18,"value":494},{"type":18,"value":558}," structures,\nand returns an array of swapchain objects.",{"type":13,"tag":14,"props":560,"children":561},{},[562,564,569,571,577,579,582,584,588],{"type":18,"value":563},"The swapchain creation parameters that affect the properties and number of\npresentable images ",{"type":13,"tag":565,"props":566,"children":568},"normative",{"type":567},"must",[],{"type":18,"value":570}," match between all the swapchains.\nIf the displays used by any of the swapchains do not use the same\npresentable image layout or are incompatible in a way that prevents sharing\nimages, swapchain creation will fail with the result code\n",{"type":13,"tag":42,"props":572,"children":574},{"className":573},[],[575],{"type":18,"value":576},"VK_ERROR_INCOMPATIBLE_DISPLAY_KHR",{"type":18,"value":578},".\nIf any error occurs, no swapchains will be created.\nImages presented to multiple swapchains ",{"type":13,"tag":565,"props":580,"children":581},{"type":567},[],{"type":18,"value":583}," be re-acquired from all of\nthem before being modified.\nAfter destroying one or more of the swapchains, the remaining swapchains and\nthe presentable images ",{"type":13,"tag":565,"props":585,"children":587},{"type":586},"can",[],{"type":18,"value":589}," continue to be used.",{"type":13,"tag":591,"props":592,"children":594},"validity-group",{"name":593},"Valid Usage (Implicit)",[595,623,654,697,726],{"type":13,"tag":596,"props":597,"children":599},"validity-field",{"name":598},"VUID-vkCreateSharedSwapchainsKHR-device-parameter",[600],{"type":13,"tag":14,"props":601,"children":602},{},[603,608,610,613,615,621],{"type":13,"tag":42,"props":604,"children":606},{"className":605},[],[607],{"type":18,"value":81},{"type":18,"value":609}," ",{"type":13,"tag":565,"props":611,"children":612},{"type":567},[],{"type":18,"value":614}," be a valid ",{"type":13,"tag":21,"props":616,"children":618},{"href":617},"/man/VkDevice",[619],{"type":18,"value":620},"VkDevice",{"type":18,"value":622}," handle",{"type":13,"tag":596,"props":624,"children":626},{"name":625},"VUID-vkCreateSharedSwapchainsKHR-pCreateInfos-parameter",[627],{"type":13,"tag":14,"props":628,"children":629},{},[630,635,636,639,641,646,648,652],{"type":13,"tag":42,"props":631,"children":633},{"className":632},[],[634],{"type":18,"value":486},{"type":18,"value":609},{"type":13,"tag":565,"props":637,"children":638},{"type":567},[],{"type":18,"value":640}," be a valid pointer to an array of ",{"type":13,"tag":42,"props":642,"children":644},{"className":643},[],[645],{"type":18,"value":475},{"type":18,"value":647}," valid ",{"type":13,"tag":21,"props":649,"children":650},{"href":491},[651],{"type":18,"value":494},{"type":18,"value":653}," structures",{"type":13,"tag":596,"props":655,"children":657},{"name":656},"VUID-vkCreateSharedSwapchainsKHR-pAllocator-parameter",[658],{"type":13,"tag":14,"props":659,"children":660},{},[661,663,668,670,676,678,683,684,687,689,695],{"type":18,"value":662},"If ",{"type":13,"tag":42,"props":664,"children":666},{"className":665},[],[667],{"type":18,"value":505},{"type":18,"value":669}," is not ",{"type":13,"tag":42,"props":671,"children":673},{"className":672},[],[674],{"type":18,"value":675},"NULL",{"type":18,"value":677},", ",{"type":13,"tag":42,"props":679,"children":681},{"className":680},[],[682],{"type":18,"value":505},{"type":18,"value":609},{"type":13,"tag":565,"props":685,"children":686},{"type":567},[],{"type":18,"value":688}," be a valid pointer to a valid ",{"type":13,"tag":21,"props":690,"children":692},{"href":691},"/man/VkAllocationCallbacks",[693],{"type":18,"value":694},"VkAllocationCallbacks",{"type":18,"value":696}," structure",{"type":13,"tag":596,"props":698,"children":700},{"name":699},"VUID-vkCreateSharedSwapchainsKHR-pSwapchains-parameter",[701],{"type":13,"tag":14,"props":702,"children":703},{},[704,709,710,713,714,719,720,724],{"type":13,"tag":42,"props":705,"children":707},{"className":706},[],[708],{"type":18,"value":524},{"type":18,"value":609},{"type":13,"tag":565,"props":711,"children":712},{"type":567},[],{"type":18,"value":640},{"type":13,"tag":42,"props":715,"children":717},{"className":716},[],[718],{"type":18,"value":475},{"type":18,"value":609},{"type":13,"tag":21,"props":721,"children":722},{"href":529},[723],{"type":18,"value":532},{"type":18,"value":725}," handles",{"type":13,"tag":596,"props":727,"children":729},{"name":728},"VUID-vkCreateSharedSwapchainsKHR-swapchainCount-arraylength",[730],{"type":13,"tag":14,"props":731,"children":732},{},[733,738,739,742,744],{"type":13,"tag":42,"props":734,"children":736},{"className":735},[],[737],{"type":18,"value":475},{"type":18,"value":609},{"type":13,"tag":565,"props":740,"children":741},{"type":567},[],{"type":18,"value":743}," be greater than ",{"type":13,"tag":42,"props":745,"children":747},{"className":746},[],[748],{"type":18,"value":749},"0",{"type":13,"tag":751,"props":752,"children":754},"validity-box",{"name":753},"Host Synchronization",[755],{"type":13,"tag":453,"props":756,"children":757},{},[758,775],{"type":13,"tag":457,"props":759,"children":760},{},[761,763,768,770,773],{"type":18,"value":762},"Host access to ",{"type":13,"tag":42,"props":764,"children":766},{"className":765},[],[767],{"type":18,"value":486},{"type":18,"value":769},"[].surface ",{"type":13,"tag":565,"props":771,"children":772},{"type":567},[],{"type":18,"value":774}," be externally synchronized",{"type":13,"tag":457,"props":776,"children":777},{},[778,779,784,786,789],{"type":18,"value":762},{"type":13,"tag":42,"props":780,"children":782},{"className":781},[],[783],{"type":18,"value":486},{"type":18,"value":785},"[].oldSwapchain ",{"type":13,"tag":565,"props":787,"children":788},{"type":567},[],{"type":18,"value":790}," be externally synchronized\n::",{"type":13,"tag":792,"props":793,"children":794},"style",{},[795],{"type":18,"value":796},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":39,"searchDepth":69,"depth":69,"links":798},[],"markdown",1729612510355]