[{"data":1,"prerenderedAt":722},["ShallowReactive",2],{"fQ36y8ndit":3},{"title":4,"description":5,"parent":6,"type":7,"xrefs":8,"body":9,"_type":721,"_id":4},"vkCreateAndroidSurfaceKHR","Create a slink:VkSurfaceKHR object for an Android native window","VK_KHR_android_surface","protos",[],{"type":10,"children":11,"toc":719},"root",[12,29,381,452,477,521,547,591,713],{"type":13,"tag":14,"props":15,"children":16},"element","p",{},[17,20,27],{"type":18,"value":19},"text","To create a ",{"type":13,"tag":21,"props":22,"children":24},"code",{"className":23},[],[25],{"type":18,"value":26},"VkSurfaceKHR",{"type":18,"value":28}," object for an Android native window, call:",{"type":13,"tag":30,"props":31,"children":32},"code-group",{},[33,165],{"type":13,"tag":34,"props":35,"children":41},"pre",{"className":36,"code":37,"filename":38,"language":39,"meta":40,"style":40},"language-c shiki shiki-themes github-light-default github-dark-default","VkResult vkCreateAndroidSurfaceKHR(\n VkInstance instance,\n const VkAndroidSurfaceCreateInfoKHR* pCreateInfo,\n const VkAllocationCallbacks* pAllocator,\n VkSurfaceKHR* pSurface);\n","C","c","",[42],{"type":13,"tag":21,"props":43,"children":44},{"__ignoreMap":40},[45,67,87,116,142],{"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}," VkInstance ",{"type":13,"tag":46,"props":77,"children":79},{"style":78},"--shiki-default:#953800;--shiki-dark:#FFA657",[80],{"type":18,"value":81},"instance",{"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,107,112],{"type":13,"tag":46,"props":92,"children":94},{"style":93},"--shiki-default:#CF222E;--shiki-dark:#FF7B72",[95],{"type":18,"value":96}," const",{"type":13,"tag":46,"props":98,"children":99},{"style":53},[100],{"type":18,"value":101}," VkAndroidSurfaceCreateInfoKHR",{"type":13,"tag":46,"props":103,"children":104},{"style":93},[105],{"type":18,"value":106},"*",{"type":13,"tag":46,"props":108,"children":109},{"style":78},[110],{"type":18,"value":111}," pCreateInfo",{"type":13,"tag":46,"props":113,"children":114},{"style":53},[115],{"type":18,"value":86},{"type":13,"tag":46,"props":117,"children":119},{"class":48,"line":118},4,[120,124,129,133,138],{"type":13,"tag":46,"props":121,"children":122},{"style":93},[123],{"type":18,"value":96},{"type":13,"tag":46,"props":125,"children":126},{"style":53},[127],{"type":18,"value":128}," VkAllocationCallbacks",{"type":13,"tag":46,"props":130,"children":131},{"style":93},[132],{"type":18,"value":106},{"type":13,"tag":46,"props":134,"children":135},{"style":78},[136],{"type":18,"value":137}," pAllocator",{"type":13,"tag":46,"props":139,"children":140},{"style":53},[141],{"type":18,"value":86},{"type":13,"tag":46,"props":143,"children":145},{"class":48,"line":144},5,[146,151,155,160],{"type":13,"tag":46,"props":147,"children":148},{"style":53},[149],{"type":18,"value":150}," VkSurfaceKHR",{"type":13,"tag":46,"props":152,"children":153},{"style":93},[154],{"type":18,"value":106},{"type":13,"tag":46,"props":156,"children":157},{"style":78},[158],{"type":18,"value":159}," pSurface",{"type":13,"tag":46,"props":161,"children":162},{"style":53},[163],{"type":18,"value":164},");\n",{"type":13,"tag":34,"props":166,"children":171},{"className":167,"code":168,"filename":169,"language":170,"meta":40,"style":40},"language-rs shiki shiki-themes github-light-default github-dark-default","pub fn create_android_surface_khr(\n instance: crate :: vk :: vk::Instance,\n p_create_info: *const vk::AndroidSurfaceCreateInfoKHR,\n p_allocator: *const vk::AllocationCallbacks,\n p_surface: *mut vk::SurfaceKHR,\n) -> vk::Result;\n","Rust","rs",[172],{"type":13,"tag":21,"props":173,"children":174},{"__ignoreMap":40},[175,197,248,282,315,349],{"type":13,"tag":46,"props":176,"children":177},{"class":48,"line":49},[178,183,188,193],{"type":13,"tag":46,"props":179,"children":180},{"style":93},[181],{"type":18,"value":182},"pub",{"type":13,"tag":46,"props":184,"children":185},{"style":93},[186],{"type":18,"value":187}," fn",{"type":13,"tag":46,"props":189,"children":190},{"style":59},[191],{"type":18,"value":192}," create_android_surface_khr",{"type":13,"tag":46,"props":194,"children":195},{"style":53},[196],{"type":18,"value":66},{"type":13,"tag":46,"props":198,"children":199},{"class":48,"line":69},[200,205,210,215,220,225,230,235,239,244],{"type":13,"tag":46,"props":201,"children":202},{"style":53},[203],{"type":18,"value":204}," instance",{"type":13,"tag":46,"props":206,"children":207},{"style":93},[208],{"type":18,"value":209},":",{"type":13,"tag":46,"props":211,"children":212},{"style":93},[213],{"type":18,"value":214}," crate",{"type":13,"tag":46,"props":216,"children":217},{"style":93},[218],{"type":18,"value":219}," ::",{"type":13,"tag":46,"props":221,"children":222},{"style":53},[223],{"type":18,"value":224}," vk ",{"type":13,"tag":46,"props":226,"children":227},{"style":93},[228],{"type":18,"value":229},"::",{"type":13,"tag":46,"props":231,"children":232},{"style":78},[233],{"type":18,"value":234}," vk",{"type":13,"tag":46,"props":236,"children":237},{"style":93},[238],{"type":18,"value":229},{"type":13,"tag":46,"props":240,"children":241},{"style":78},[242],{"type":18,"value":243},"Instance",{"type":13,"tag":46,"props":245,"children":246},{"style":53},[247],{"type":18,"value":86},{"type":13,"tag":46,"props":249,"children":250},{"class":48,"line":89},[251,256,260,265,269,273,278],{"type":13,"tag":46,"props":252,"children":253},{"style":53},[254],{"type":18,"value":255}," p_create_info",{"type":13,"tag":46,"props":257,"children":258},{"style":93},[259],{"type":18,"value":209},{"type":13,"tag":46,"props":261,"children":262},{"style":93},[263],{"type":18,"value":264}," *const",{"type":13,"tag":46,"props":266,"children":267},{"style":78},[268],{"type":18,"value":234},{"type":13,"tag":46,"props":270,"children":271},{"style":93},[272],{"type":18,"value":229},{"type":13,"tag":46,"props":274,"children":275},{"style":78},[276],{"type":18,"value":277},"AndroidSurfaceCreateInfoKHR",{"type":13,"tag":46,"props":279,"children":280},{"style":53},[281],{"type":18,"value":86},{"type":13,"tag":46,"props":283,"children":284},{"class":48,"line":118},[285,290,294,298,302,306,311],{"type":13,"tag":46,"props":286,"children":287},{"style":53},[288],{"type":18,"value":289}," p_allocator",{"type":13,"tag":46,"props":291,"children":292},{"style":93},[293],{"type":18,"value":209},{"type":13,"tag":46,"props":295,"children":296},{"style":93},[297],{"type":18,"value":264},{"type":13,"tag":46,"props":299,"children":300},{"style":78},[301],{"type":18,"value":234},{"type":13,"tag":46,"props":303,"children":304},{"style":93},[305],{"type":18,"value":229},{"type":13,"tag":46,"props":307,"children":308},{"style":78},[309],{"type":18,"value":310},"AllocationCallbacks",{"type":13,"tag":46,"props":312,"children":313},{"style":53},[314],{"type":18,"value":86},{"type":13,"tag":46,"props":316,"children":317},{"class":48,"line":144},[318,323,327,332,336,340,345],{"type":13,"tag":46,"props":319,"children":320},{"style":53},[321],{"type":18,"value":322}," p_surface",{"type":13,"tag":46,"props":324,"children":325},{"style":93},[326],{"type":18,"value":209},{"type":13,"tag":46,"props":328,"children":329},{"style":93},[330],{"type":18,"value":331}," *mut",{"type":13,"tag":46,"props":333,"children":334},{"style":78},[335],{"type":18,"value":234},{"type":13,"tag":46,"props":337,"children":338},{"style":93},[339],{"type":18,"value":229},{"type":13,"tag":46,"props":341,"children":342},{"style":78},[343],{"type":18,"value":344},"SurfaceKHR",{"type":13,"tag":46,"props":346,"children":347},{"style":53},[348],{"type":18,"value":86},{"type":13,"tag":46,"props":350,"children":352},{"class":48,"line":351},6,[353,358,363,367,371,376],{"type":13,"tag":46,"props":354,"children":355},{"style":53},[356],{"type":18,"value":357},") ",{"type":13,"tag":46,"props":359,"children":360},{"style":93},[361],{"type":18,"value":362},"->",{"type":13,"tag":46,"props":364,"children":365},{"style":78},[366],{"type":18,"value":234},{"type":13,"tag":46,"props":368,"children":369},{"style":93},[370],{"type":18,"value":229},{"type":13,"tag":46,"props":372,"children":373},{"style":78},[374],{"type":18,"value":375},"Result",{"type":13,"tag":46,"props":377,"children":378},{"style":53},[379],{"type":18,"value":380},";\n",{"type":13,"tag":382,"props":383,"children":384},"ul",{},[385,396,415,435],{"type":13,"tag":386,"props":387,"children":388},"li",{},[389,394],{"type":13,"tag":21,"props":390,"children":392},{"className":391},[],[393],{"type":18,"value":81},{"type":18,"value":395}," is the instance to associate the surface with.",{"type":13,"tag":386,"props":397,"children":398},{},[399,405,407,413],{"type":13,"tag":21,"props":400,"children":402},{"className":401},[],[403],{"type":18,"value":404},"pCreateInfo",{"type":18,"value":406}," is a pointer to a ",{"type":13,"tag":21,"props":408,"children":410},{"className":409},[],[411],{"type":18,"value":412},"VkAndroidSurfaceCreateInfoKHR",{"type":18,"value":414},"\nstructure containing parameters affecting the creation of the surface\nobject.",{"type":13,"tag":386,"props":416,"children":417},{},[418,424,426,433],{"type":13,"tag":21,"props":419,"children":421},{"className":420},[],[422],{"type":18,"value":423},"pAllocator",{"type":18,"value":425}," is the allocator used for host memory allocated for the\nsurface object when there is no more specific allocator available (see\n",{"type":13,"tag":427,"props":428,"children":430},"a",{"href":429},"/chapters/memory#memory-allocation",[431],{"type":18,"value":432},"Memory Allocation",{"type":18,"value":434},").",{"type":13,"tag":386,"props":436,"children":437},{},[438,444,445,450],{"type":13,"tag":21,"props":439,"children":441},{"className":440},[],[442],{"type":18,"value":443},"pSurface",{"type":18,"value":406},{"type":13,"tag":427,"props":446,"children":448},{"href":447},"/man/VkSurfaceKHR",[449],{"type":18,"value":26},{"type":18,"value":451}," handle in which the\ncreated surface object is returned.",{"type":13,"tag":14,"props":453,"children":454},{},[455,457,463,465,469,471,475],{"type":18,"value":456},"During the lifetime of a surface created using a particular\n",{"type":13,"tag":427,"props":458,"children":460},{"href":459},"/man/ANativeWindow",[461],{"type":18,"value":462},"ANativeWindow",{"type":18,"value":464}," handle any attempts to create another surface for the\nsame ",{"type":13,"tag":427,"props":466,"children":467},{"href":459},[468],{"type":18,"value":462},{"type":18,"value":470}," and any attempts to connect to the same\n",{"type":13,"tag":427,"props":472,"children":473},{"href":459},[474],{"type":18,"value":462},{"type":18,"value":476}," through other platform mechanisms will fail.",{"type":13,"tag":478,"props":479,"children":480},"note",{},[481],{"type":13,"tag":14,"props":482,"children":483},{},[484,486,491,493,498,500,504,506,511,513,519],{"type":18,"value":485},"In particular, only one ",{"type":13,"tag":21,"props":487,"children":489},{"className":488},[],[490],{"type":18,"value":26},{"type":18,"value":492}," ",{"type":13,"tag":494,"props":495,"children":497},"normative",{"type":496},"can",[],{"type":18,"value":499}," exist at a time for a given\nwindow.\nSimilarly, a native window ",{"type":13,"tag":494,"props":501,"children":503},{"type":502},"cannot",[],{"type":18,"value":505}," be used by both a ",{"type":13,"tag":21,"props":507,"children":509},{"className":508},[],[510],{"type":18,"value":26},{"type":18,"value":512}," and\n",{"type":13,"tag":21,"props":514,"children":516},{"className":515},[],[517],{"type":18,"value":518},"EGLSurface",{"type":18,"value":520}," simultaneously.",{"type":13,"tag":14,"props":522,"children":523},{},[524,526,531,533,537,539,545],{"type":18,"value":525},"If successful, ",{"type":13,"tag":21,"props":527,"children":529},{"className":528},[],[530],{"type":18,"value":4},{"type":18,"value":532}," increments the\n",{"type":13,"tag":427,"props":534,"children":535},{"href":459},[536],{"type":18,"value":462},{"type":18,"value":538},"’s reference count, and ",{"type":13,"tag":21,"props":540,"children":542},{"className":541},[],[543],{"type":18,"value":544},"vkDestroySurfaceKHR",{"type":18,"value":546}," will\ndecrement it.",{"type":13,"tag":14,"props":548,"children":549},{},[550,552,558,560,566,568,574,576,582,584,589],{"type":18,"value":551},"On Android, when a swapchain’s ",{"type":13,"tag":21,"props":553,"children":555},{"className":554},[],[556],{"type":18,"value":557},"imageExtent",{"type":18,"value":559}," does not match the\nsurface’s ",{"type":13,"tag":21,"props":561,"children":563},{"className":562},[],[564],{"type":18,"value":565},"currentExtent",{"type":18,"value":567},", the presentable images will be scaled to the\nsurface’s dimensions during presentation.\n",{"type":13,"tag":21,"props":569,"children":571},{"className":570},[],[572],{"type":18,"value":573},"minImageExtent",{"type":18,"value":575}," is (1,1), and ",{"type":13,"tag":21,"props":577,"children":579},{"className":578},[],[580],{"type":18,"value":581},"maxImageExtent",{"type":18,"value":583}," is the maximum\nimage size supported by the consumer.\nFor the system compositor, ",{"type":13,"tag":21,"props":585,"children":587},{"className":586},[],[588],{"type":18,"value":565},{"type":18,"value":590}," is the window size (i.e. the\nconsumer’s preferred size).",{"type":13,"tag":592,"props":593,"children":595},"validity-group",{"name":594},"Valid Usage (Implicit)",[596,624,649,690],{"type":13,"tag":597,"props":598,"children":600},"validity-field",{"name":599},"VUID-vkCreateAndroidSurfaceKHR-instance-parameter",[601],{"type":13,"tag":14,"props":602,"children":603},{},[604,609,610,614,616,622],{"type":13,"tag":21,"props":605,"children":607},{"className":606},[],[608],{"type":18,"value":81},{"type":18,"value":492},{"type":13,"tag":494,"props":611,"children":613},{"type":612},"must",[],{"type":18,"value":615}," be a valid ",{"type":13,"tag":427,"props":617,"children":619},{"href":618},"/man/VkInstance",[620],{"type":18,"value":621},"VkInstance",{"type":18,"value":623}," handle",{"type":13,"tag":597,"props":625,"children":627},{"name":626},"VUID-vkCreateAndroidSurfaceKHR-pCreateInfo-parameter",[628],{"type":13,"tag":14,"props":629,"children":630},{},[631,636,637,640,642,647],{"type":13,"tag":21,"props":632,"children":634},{"className":633},[],[635],{"type":18,"value":404},{"type":18,"value":492},{"type":13,"tag":494,"props":638,"children":639},{"type":612},[],{"type":18,"value":641}," be a valid pointer to a valid ",{"type":13,"tag":427,"props":643,"children":645},{"href":644},"/man/VkAndroidSurfaceCreateInfoKHR",[646],{"type":18,"value":412},{"type":18,"value":648}," structure",{"type":13,"tag":597,"props":650,"children":652},{"name":651},"VUID-vkCreateAndroidSurfaceKHR-pAllocator-parameter",[653],{"type":13,"tag":14,"props":654,"children":655},{},[656,658,663,665,671,673,678,679,682,683,689],{"type":18,"value":657},"If ",{"type":13,"tag":21,"props":659,"children":661},{"className":660},[],[662],{"type":18,"value":423},{"type":18,"value":664}," is not ",{"type":13,"tag":21,"props":666,"children":668},{"className":667},[],[669],{"type":18,"value":670},"NULL",{"type":18,"value":672},", ",{"type":13,"tag":21,"props":674,"children":676},{"className":675},[],[677],{"type":18,"value":423},{"type":18,"value":492},{"type":13,"tag":494,"props":680,"children":681},{"type":612},[],{"type":18,"value":641},{"type":13,"tag":427,"props":684,"children":686},{"href":685},"/man/VkAllocationCallbacks",[687],{"type":18,"value":688},"VkAllocationCallbacks",{"type":18,"value":648},{"type":13,"tag":597,"props":691,"children":693},{"name":692},"VUID-vkCreateAndroidSurfaceKHR-pSurface-parameter",[694],{"type":13,"tag":14,"props":695,"children":696},{},[697,702,703,706,708,712],{"type":13,"tag":21,"props":698,"children":700},{"className":699},[],[701],{"type":18,"value":443},{"type":18,"value":492},{"type":13,"tag":494,"props":704,"children":705},{"type":612},[],{"type":18,"value":707}," be a valid pointer to a ",{"type":13,"tag":427,"props":709,"children":710},{"href":447},[711],{"type":18,"value":26},{"type":18,"value":623},{"type":13,"tag":714,"props":715,"children":716},"style",{},[717],{"type":18,"value":718},"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":40,"searchDepth":69,"depth":69,"links":720},[],"markdown",1729612508450]