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