[{"data":1,"prerenderedAt":600},["ShallowReactive",2],{"QMKWVezaML":3},{"title":4,"description":5,"parent":6,"type":7,"xrefs":8,"body":9,"_type":599,"_id":4},"vkCreateInstance","Create a new Vulkan instance","VK_VERSION_1_0","protos",[],{"type":10,"children":11,"toc":597},"root",[12,20,326,389,457,498,591],{"type":13,"tag":14,"props":15,"children":16},"element","p",{},[17],{"type":18,"value":19},"text","To create an instance object, call:",{"type":13,"tag":21,"props":22,"children":23},"code-group",{},[24,139],{"type":13,"tag":25,"props":26,"children":32},"pre",{"className":27,"code":28,"filename":29,"language":30,"meta":31,"style":31},"language-c shiki shiki-themes github-light-default github-dark-default","VkResult vkCreateInstance(\n const VkInstanceCreateInfo* pCreateInfo,\n const VkAllocationCallbacks* pAllocator,\n VkInstance* pInstance);\n","C","c","",[33],{"type":13,"tag":34,"props":35,"children":36},"code",{"__ignoreMap":31},[37,59,90,116],{"type":13,"tag":38,"props":39,"children":42},"span",{"class":40,"line":41},"line",1,[43,49,54],{"type":13,"tag":38,"props":44,"children":46},{"style":45},"--shiki-default:#1F2328;--shiki-dark:#E6EDF3",[47],{"type":18,"value":48},"VkResult ",{"type":13,"tag":38,"props":50,"children":52},{"style":51},"--shiki-default:#8250DF;--shiki-dark:#D2A8FF",[53],{"type":18,"value":4},{"type":13,"tag":38,"props":55,"children":56},{"style":45},[57],{"type":18,"value":58},"(\n",{"type":13,"tag":38,"props":60,"children":62},{"class":40,"line":61},2,[63,69,74,79,85],{"type":13,"tag":38,"props":64,"children":66},{"style":65},"--shiki-default:#CF222E;--shiki-dark:#FF7B72",[67],{"type":18,"value":68}," const",{"type":13,"tag":38,"props":70,"children":71},{"style":45},[72],{"type":18,"value":73}," VkInstanceCreateInfo",{"type":13,"tag":38,"props":75,"children":76},{"style":65},[77],{"type":18,"value":78},"*",{"type":13,"tag":38,"props":80,"children":82},{"style":81},"--shiki-default:#953800;--shiki-dark:#FFA657",[83],{"type":18,"value":84}," pCreateInfo",{"type":13,"tag":38,"props":86,"children":87},{"style":45},[88],{"type":18,"value":89},",\n",{"type":13,"tag":38,"props":91,"children":93},{"class":40,"line":92},3,[94,98,103,107,112],{"type":13,"tag":38,"props":95,"children":96},{"style":65},[97],{"type":18,"value":68},{"type":13,"tag":38,"props":99,"children":100},{"style":45},[101],{"type":18,"value":102}," VkAllocationCallbacks",{"type":13,"tag":38,"props":104,"children":105},{"style":65},[106],{"type":18,"value":78},{"type":13,"tag":38,"props":108,"children":109},{"style":81},[110],{"type":18,"value":111}," pAllocator",{"type":13,"tag":38,"props":113,"children":114},{"style":45},[115],{"type":18,"value":89},{"type":13,"tag":38,"props":117,"children":119},{"class":40,"line":118},4,[120,125,129,134],{"type":13,"tag":38,"props":121,"children":122},{"style":45},[123],{"type":18,"value":124}," VkInstance",{"type":13,"tag":38,"props":126,"children":127},{"style":65},[128],{"type":18,"value":78},{"type":13,"tag":38,"props":130,"children":131},{"style":81},[132],{"type":18,"value":133}," pInstance",{"type":13,"tag":38,"props":135,"children":136},{"style":45},[137],{"type":18,"value":138},");\n",{"type":13,"tag":25,"props":140,"children":145},{"className":141,"code":142,"filename":143,"language":144,"meta":31,"style":31},"language-rs shiki shiki-themes github-light-default github-dark-default","pub fn create_instance(\n p_create_info: *const vk::InstanceCreateInfo,\n p_allocator: *const vk::AllocationCallbacks,\n p_instance: *mut crate :: vk :: vk::Instance,\n) -> vk::Result;\n","Rust","rs",[146],{"type":13,"tag":34,"props":147,"children":148},{"__ignoreMap":31},[149,171,208,241,294],{"type":13,"tag":38,"props":150,"children":151},{"class":40,"line":41},[152,157,162,167],{"type":13,"tag":38,"props":153,"children":154},{"style":65},[155],{"type":18,"value":156},"pub",{"type":13,"tag":38,"props":158,"children":159},{"style":65},[160],{"type":18,"value":161}," fn",{"type":13,"tag":38,"props":163,"children":164},{"style":51},[165],{"type":18,"value":166}," create_instance",{"type":13,"tag":38,"props":168,"children":169},{"style":45},[170],{"type":18,"value":58},{"type":13,"tag":38,"props":172,"children":173},{"class":40,"line":61},[174,179,184,189,194,199,204],{"type":13,"tag":38,"props":175,"children":176},{"style":45},[177],{"type":18,"value":178}," p_create_info",{"type":13,"tag":38,"props":180,"children":181},{"style":65},[182],{"type":18,"value":183},":",{"type":13,"tag":38,"props":185,"children":186},{"style":65},[187],{"type":18,"value":188}," *const",{"type":13,"tag":38,"props":190,"children":191},{"style":81},[192],{"type":18,"value":193}," vk",{"type":13,"tag":38,"props":195,"children":196},{"style":65},[197],{"type":18,"value":198},"::",{"type":13,"tag":38,"props":200,"children":201},{"style":81},[202],{"type":18,"value":203},"InstanceCreateInfo",{"type":13,"tag":38,"props":205,"children":206},{"style":45},[207],{"type":18,"value":89},{"type":13,"tag":38,"props":209,"children":210},{"class":40,"line":92},[211,216,220,224,228,232,237],{"type":13,"tag":38,"props":212,"children":213},{"style":45},[214],{"type":18,"value":215}," p_allocator",{"type":13,"tag":38,"props":217,"children":218},{"style":65},[219],{"type":18,"value":183},{"type":13,"tag":38,"props":221,"children":222},{"style":65},[223],{"type":18,"value":188},{"type":13,"tag":38,"props":225,"children":226},{"style":81},[227],{"type":18,"value":193},{"type":13,"tag":38,"props":229,"children":230},{"style":65},[231],{"type":18,"value":198},{"type":13,"tag":38,"props":233,"children":234},{"style":81},[235],{"type":18,"value":236},"AllocationCallbacks",{"type":13,"tag":38,"props":238,"children":239},{"style":45},[240],{"type":18,"value":89},{"type":13,"tag":38,"props":242,"children":243},{"class":40,"line":118},[244,249,253,258,263,268,273,277,281,285,290],{"type":13,"tag":38,"props":245,"children":246},{"style":45},[247],{"type":18,"value":248}," p_instance",{"type":13,"tag":38,"props":250,"children":251},{"style":65},[252],{"type":18,"value":183},{"type":13,"tag":38,"props":254,"children":255},{"style":65},[256],{"type":18,"value":257}," *mut",{"type":13,"tag":38,"props":259,"children":260},{"style":65},[261],{"type":18,"value":262}," crate",{"type":13,"tag":38,"props":264,"children":265},{"style":65},[266],{"type":18,"value":267}," ::",{"type":13,"tag":38,"props":269,"children":270},{"style":45},[271],{"type":18,"value":272}," vk ",{"type":13,"tag":38,"props":274,"children":275},{"style":65},[276],{"type":18,"value":198},{"type":13,"tag":38,"props":278,"children":279},{"style":81},[280],{"type":18,"value":193},{"type":13,"tag":38,"props":282,"children":283},{"style":65},[284],{"type":18,"value":198},{"type":13,"tag":38,"props":286,"children":287},{"style":81},[288],{"type":18,"value":289},"Instance",{"type":13,"tag":38,"props":291,"children":292},{"style":45},[293],{"type":18,"value":89},{"type":13,"tag":38,"props":295,"children":297},{"class":40,"line":296},5,[298,303,308,312,316,321],{"type":13,"tag":38,"props":299,"children":300},{"style":45},[301],{"type":18,"value":302},") ",{"type":13,"tag":38,"props":304,"children":305},{"style":65},[306],{"type":18,"value":307},"->",{"type":13,"tag":38,"props":309,"children":310},{"style":81},[311],{"type":18,"value":193},{"type":13,"tag":38,"props":313,"children":314},{"style":65},[315],{"type":18,"value":198},{"type":13,"tag":38,"props":317,"children":318},{"style":81},[319],{"type":18,"value":320},"Result",{"type":13,"tag":38,"props":322,"children":323},{"style":45},[324],{"type":18,"value":325},";\n",{"type":13,"tag":327,"props":328,"children":329},"ul",{},[330,351,370],{"type":13,"tag":331,"props":332,"children":333},"li",{},[334,340,342,349],{"type":13,"tag":34,"props":335,"children":337},{"className":336},[],[338],{"type":18,"value":339},"pCreateInfo",{"type":18,"value":341}," is a pointer to a ",{"type":13,"tag":343,"props":344,"children":346},"a",{"href":345},"/man/VkInstanceCreateInfo",[347],{"type":18,"value":348},"VkInstanceCreateInfo",{"type":18,"value":350}," structure\ncontrolling creation of the instance.",{"type":13,"tag":331,"props":352,"children":353},{},[354,360,362,368],{"type":13,"tag":34,"props":355,"children":357},{"className":356},[],[358],{"type":18,"value":359},"pAllocator",{"type":18,"value":361}," controls host memory allocation as described in the\n",{"type":13,"tag":343,"props":363,"children":365},{"href":364},"/chapters/memory#memory-allocation",[366],{"type":18,"value":367},"Memory Allocation",{"type":18,"value":369}," chapter.",{"type":13,"tag":331,"props":371,"children":372},{},[373,379,381,387],{"type":13,"tag":34,"props":374,"children":376},{"className":375},[],[377],{"type":18,"value":378},"pInstance",{"type":18,"value":380}," points a ",{"type":13,"tag":343,"props":382,"children":384},{"href":383},"/man/VkInstance",[385],{"type":18,"value":386},"VkInstance",{"type":18,"value":388}," handle in which the resulting\ninstance is returned.",{"type":13,"tag":14,"props":390,"children":391},{},[392,397,399,404,406,412,414,419,421,426,428,433,435,441,443,448,450,455],{"type":13,"tag":34,"props":393,"children":395},{"className":394},[],[396],{"type":18,"value":4},{"type":18,"value":398}," verifies that the requested layers exist.\nIf not, ",{"type":13,"tag":34,"props":400,"children":402},{"className":401},[],[403],{"type":18,"value":4},{"type":18,"value":405}," will return ",{"type":13,"tag":34,"props":407,"children":409},{"className":408},[],[410],{"type":18,"value":411},"VK_ERROR_LAYER_NOT_PRESENT",{"type":18,"value":413},".\nNext ",{"type":13,"tag":34,"props":415,"children":417},{"className":416},[],[418],{"type":18,"value":4},{"type":18,"value":420}," verifies that the requested extensions are\nsupported (e.g. in the implementation or in any enabled instance layer) and\nif any requested extension is not supported, ",{"type":13,"tag":34,"props":422,"children":424},{"className":423},[],[425],{"type":18,"value":4},{"type":18,"value":427}," ",{"type":13,"tag":429,"props":430,"children":432},"normative",{"type":431},"must",[],{"type":18,"value":434},"\nreturn ",{"type":13,"tag":34,"props":436,"children":438},{"className":437},[],[439],{"type":18,"value":440},"VK_ERROR_EXTENSION_NOT_PRESENT",{"type":18,"value":442},".\nAfter verifying and enabling the instance layers and extensions the\n",{"type":13,"tag":34,"props":444,"children":446},{"className":445},[],[447],{"type":18,"value":386},{"type":18,"value":449}," object is created and returned to the application.\nIf a requested extension is only supported by a layer, both the layer and\nthe extension need to be specified at ",{"type":13,"tag":34,"props":451,"children":453},{"className":452},[],[454],{"type":18,"value":4},{"type":18,"value":456}," time for the\ncreation to succeed.",{"type":13,"tag":458,"props":459,"children":461},"validity-group",{"name":460},"Valid Usage",[462],{"type":13,"tag":463,"props":464,"children":466},"validity-field",{"name":465},"VUID-vkCreateInstance-ppEnabledExtensionNames-01388",[467],{"type":13,"tag":14,"props":468,"children":469},{},[470,472,478,480,484,485,491,493,496],{"type":18,"value":471},"All ",{"type":13,"tag":343,"props":473,"children":475},{"href":474},"/chapters/extendingvulkan#extendingvulkan-extensions-extensiondependencies",[476],{"type":18,"value":477},"required\nextensions",{"type":18,"value":479}," for each extension in the\n",{"type":13,"tag":343,"props":481,"children":482},{"href":345},[483],{"type":18,"value":348},{"type":18,"value":198},{"type":13,"tag":34,"props":486,"children":488},{"className":487},[],[489],{"type":18,"value":490},"ppEnabledExtensionNames",{"type":18,"value":492}," list ",{"type":13,"tag":429,"props":494,"children":495},{"type":431},[],{"type":18,"value":497},"\nalso be present in that list",{"type":13,"tag":458,"props":499,"children":501},{"name":500},"Valid Usage (Implicit)",[502,526,567],{"type":13,"tag":463,"props":503,"children":505},{"name":504},"VUID-vkCreateInstance-pCreateInfo-parameter",[506],{"type":13,"tag":14,"props":507,"children":508},{},[509,514,515,518,520,524],{"type":13,"tag":34,"props":510,"children":512},{"className":511},[],[513],{"type":18,"value":339},{"type":18,"value":427},{"type":13,"tag":429,"props":516,"children":517},{"type":431},[],{"type":18,"value":519}," be a valid pointer to a valid ",{"type":13,"tag":343,"props":521,"children":522},{"href":345},[523],{"type":18,"value":348},{"type":18,"value":525}," structure",{"type":13,"tag":463,"props":527,"children":529},{"name":528},"VUID-vkCreateInstance-pAllocator-parameter",[530],{"type":13,"tag":14,"props":531,"children":532},{},[533,535,540,542,548,550,555,556,559,560,566],{"type":18,"value":534},"If ",{"type":13,"tag":34,"props":536,"children":538},{"className":537},[],[539],{"type":18,"value":359},{"type":18,"value":541}," is not ",{"type":13,"tag":34,"props":543,"children":545},{"className":544},[],[546],{"type":18,"value":547},"NULL",{"type":18,"value":549},", ",{"type":13,"tag":34,"props":551,"children":553},{"className":552},[],[554],{"type":18,"value":359},{"type":18,"value":427},{"type":13,"tag":429,"props":557,"children":558},{"type":431},[],{"type":18,"value":519},{"type":13,"tag":343,"props":561,"children":563},{"href":562},"/man/VkAllocationCallbacks",[564],{"type":18,"value":565},"VkAllocationCallbacks",{"type":18,"value":525},{"type":13,"tag":463,"props":568,"children":570},{"name":569},"VUID-vkCreateInstance-pInstance-parameter",[571],{"type":13,"tag":14,"props":572,"children":573},{},[574,579,580,583,585,589],{"type":13,"tag":34,"props":575,"children":577},{"className":576},[],[578],{"type":18,"value":378},{"type":18,"value":427},{"type":13,"tag":429,"props":581,"children":582},{"type":431},[],{"type":18,"value":584}," be a valid pointer to a ",{"type":13,"tag":343,"props":586,"children":587},{"href":383},[588],{"type":18,"value":386},{"type":18,"value":590}," handle",{"type":13,"tag":592,"props":593,"children":594},"style",{},[595],{"type":18,"value":596},"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":31,"searchDepth":61,"depth":61,"links":598},[],"markdown",1729612509633]