[{"data":1,"prerenderedAt":779},["ShallowReactive",2],{"dqDtPn4yeG":3},{"title":4,"description":5,"parent":6,"type":7,"xrefs":8,"body":9,"_type":778,"_id":4},"vkGetPhysicalDeviceSurfaceFormats2KHR","Query color formats supported by surface","VK_KHR_get_surface_capabilities2","protos",[],{"type":10,"children":11,"toc":776},"root",[12,20,338,424,450,542,633,770],{"type":13,"tag":14,"props":15,"children":16},"element","p",{},[17],{"type":18,"value":19},"text","To query the supported swapchain format tuples for a surface, call:",{"type":13,"tag":21,"props":22,"children":23},"code-group",{},[24,149],{"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 vkGetPhysicalDeviceSurfaceFormats2KHR(\n VkPhysicalDevice physicalDevice,\n const VkPhysicalDeviceSurfaceInfo2KHR* pSurfaceInfo,\n uint32_t* pSurfaceFormatCount,\n VkSurfaceFormat2KHR* pSurfaceFormats);\n","C","c","",[33],{"type":13,"tag":34,"props":35,"children":36},"code",{"__ignoreMap":31},[37,59,79,108,126],{"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,68,74],{"type":13,"tag":38,"props":64,"children":65},{"style":45},[66],{"type":18,"value":67}," VkPhysicalDevice ",{"type":13,"tag":38,"props":69,"children":71},{"style":70},"--shiki-default:#953800;--shiki-dark:#FFA657",[72],{"type":18,"value":73},"physicalDevice",{"type":13,"tag":38,"props":75,"children":76},{"style":45},[77],{"type":18,"value":78},",\n",{"type":13,"tag":38,"props":80,"children":82},{"class":40,"line":81},3,[83,89,94,99,104],{"type":13,"tag":38,"props":84,"children":86},{"style":85},"--shiki-default:#CF222E;--shiki-dark:#FF7B72",[87],{"type":18,"value":88}," const",{"type":13,"tag":38,"props":90,"children":91},{"style":45},[92],{"type":18,"value":93}," VkPhysicalDeviceSurfaceInfo2KHR",{"type":13,"tag":38,"props":95,"children":96},{"style":85},[97],{"type":18,"value":98},"*",{"type":13,"tag":38,"props":100,"children":101},{"style":70},[102],{"type":18,"value":103}," pSurfaceInfo",{"type":13,"tag":38,"props":105,"children":106},{"style":45},[107],{"type":18,"value":78},{"type":13,"tag":38,"props":109,"children":111},{"class":40,"line":110},4,[112,117,122],{"type":13,"tag":38,"props":113,"children":114},{"style":85},[115],{"type":18,"value":116}," uint32_t*",{"type":13,"tag":38,"props":118,"children":119},{"style":70},[120],{"type":18,"value":121}," pSurfaceFormatCount",{"type":13,"tag":38,"props":123,"children":124},{"style":45},[125],{"type":18,"value":78},{"type":13,"tag":38,"props":127,"children":129},{"class":40,"line":128},5,[130,135,139,144],{"type":13,"tag":38,"props":131,"children":132},{"style":45},[133],{"type":18,"value":134}," VkSurfaceFormat2KHR",{"type":13,"tag":38,"props":136,"children":137},{"style":85},[138],{"type":18,"value":98},{"type":13,"tag":38,"props":140,"children":141},{"style":70},[142],{"type":18,"value":143}," pSurfaceFormats",{"type":13,"tag":38,"props":145,"children":146},{"style":45},[147],{"type":18,"value":148},");\n",{"type":13,"tag":25,"props":150,"children":155},{"className":151,"code":152,"filename":153,"language":154,"meta":31,"style":31},"language-rs shiki shiki-themes github-light-default github-dark-default","pub fn get_physical_device_surface_formats2_khr(\n physical_device: vk::PhysicalDevice,\n p_surface_info: *const vk::PhysicalDeviceSurfaceInfo2KHR,\n p_surface_format_count: *mut u32,\n p_surface_formats: *mut vk::SurfaceFormat2KHR,\n) -> vk::Result;\n","Rust","rs",[156],{"type":13,"tag":34,"props":157,"children":158},{"__ignoreMap":31},[159,181,213,247,273,306],{"type":13,"tag":38,"props":160,"children":161},{"class":40,"line":41},[162,167,172,177],{"type":13,"tag":38,"props":163,"children":164},{"style":85},[165],{"type":18,"value":166},"pub",{"type":13,"tag":38,"props":168,"children":169},{"style":85},[170],{"type":18,"value":171}," fn",{"type":13,"tag":38,"props":173,"children":174},{"style":51},[175],{"type":18,"value":176}," get_physical_device_surface_formats2_khr",{"type":13,"tag":38,"props":178,"children":179},{"style":45},[180],{"type":18,"value":58},{"type":13,"tag":38,"props":182,"children":183},{"class":40,"line":61},[184,189,194,199,204,209],{"type":13,"tag":38,"props":185,"children":186},{"style":45},[187],{"type":18,"value":188}," physical_device",{"type":13,"tag":38,"props":190,"children":191},{"style":85},[192],{"type":18,"value":193},":",{"type":13,"tag":38,"props":195,"children":196},{"style":70},[197],{"type":18,"value":198}," vk",{"type":13,"tag":38,"props":200,"children":201},{"style":85},[202],{"type":18,"value":203},"::",{"type":13,"tag":38,"props":205,"children":206},{"style":70},[207],{"type":18,"value":208},"PhysicalDevice",{"type":13,"tag":38,"props":210,"children":211},{"style":45},[212],{"type":18,"value":78},{"type":13,"tag":38,"props":214,"children":215},{"class":40,"line":81},[216,221,225,230,234,238,243],{"type":13,"tag":38,"props":217,"children":218},{"style":45},[219],{"type":18,"value":220}," p_surface_info",{"type":13,"tag":38,"props":222,"children":223},{"style":85},[224],{"type":18,"value":193},{"type":13,"tag":38,"props":226,"children":227},{"style":85},[228],{"type":18,"value":229}," *const",{"type":13,"tag":38,"props":231,"children":232},{"style":70},[233],{"type":18,"value":198},{"type":13,"tag":38,"props":235,"children":236},{"style":85},[237],{"type":18,"value":203},{"type":13,"tag":38,"props":239,"children":240},{"style":70},[241],{"type":18,"value":242},"PhysicalDeviceSurfaceInfo2KHR",{"type":13,"tag":38,"props":244,"children":245},{"style":45},[246],{"type":18,"value":78},{"type":13,"tag":38,"props":248,"children":249},{"class":40,"line":110},[250,255,259,264,269],{"type":13,"tag":38,"props":251,"children":252},{"style":45},[253],{"type":18,"value":254}," p_surface_format_count",{"type":13,"tag":38,"props":256,"children":257},{"style":85},[258],{"type":18,"value":193},{"type":13,"tag":38,"props":260,"children":261},{"style":85},[262],{"type":18,"value":263}," *mut",{"type":13,"tag":38,"props":265,"children":266},{"style":70},[267],{"type":18,"value":268}," u32",{"type":13,"tag":38,"props":270,"children":271},{"style":45},[272],{"type":18,"value":78},{"type":13,"tag":38,"props":274,"children":275},{"class":40,"line":128},[276,281,285,289,293,297,302],{"type":13,"tag":38,"props":277,"children":278},{"style":45},[279],{"type":18,"value":280}," p_surface_formats",{"type":13,"tag":38,"props":282,"children":283},{"style":85},[284],{"type":18,"value":193},{"type":13,"tag":38,"props":286,"children":287},{"style":85},[288],{"type":18,"value":263},{"type":13,"tag":38,"props":290,"children":291},{"style":70},[292],{"type":18,"value":198},{"type":13,"tag":38,"props":294,"children":295},{"style":85},[296],{"type":18,"value":203},{"type":13,"tag":38,"props":298,"children":299},{"style":70},[300],{"type":18,"value":301},"SurfaceFormat2KHR",{"type":13,"tag":38,"props":303,"children":304},{"style":45},[305],{"type":18,"value":78},{"type":13,"tag":38,"props":307,"children":309},{"class":40,"line":308},6,[310,315,320,324,328,333],{"type":13,"tag":38,"props":311,"children":312},{"style":45},[313],{"type":18,"value":314},") ",{"type":13,"tag":38,"props":316,"children":317},{"style":85},[318],{"type":18,"value":319},"->",{"type":13,"tag":38,"props":321,"children":322},{"style":70},[323],{"type":18,"value":198},{"type":13,"tag":38,"props":325,"children":326},{"style":85},[327],{"type":18,"value":203},{"type":13,"tag":38,"props":329,"children":330},{"style":70},[331],{"type":18,"value":332},"Result",{"type":13,"tag":38,"props":334,"children":335},{"style":45},[336],{"type":18,"value":337},";\n",{"type":13,"tag":339,"props":340,"children":341},"ul",{},[342,362,386,397],{"type":13,"tag":343,"props":344,"children":345},"li",{},[346,351,353,360],{"type":13,"tag":34,"props":347,"children":349},{"className":348},[],[350],{"type":18,"value":73},{"type":18,"value":352}," is the physical device that will be associated with\nthe swapchain to be created, as described for\n",{"type":13,"tag":354,"props":355,"children":357},"a",{"href":356},"/man/vkCreateSwapchainKHR",[358],{"type":18,"value":359},"vkCreateSwapchainKHR",{"type":18,"value":361},".",{"type":13,"tag":343,"props":363,"children":364},{},[365,371,373,379,381,385],{"type":13,"tag":34,"props":366,"children":368},{"className":367},[],[369],{"type":18,"value":370},"pSurfaceInfo",{"type":18,"value":372}," is a pointer to a\n",{"type":13,"tag":354,"props":374,"children":376},{"href":375},"/man/VkPhysicalDeviceSurfaceInfo2KHR",[377],{"type":18,"value":378},"VkPhysicalDeviceSurfaceInfo2KHR",{"type":18,"value":380}," structure describing the surface\nand other fixed parameters that would be consumed by\n",{"type":13,"tag":354,"props":382,"children":383},{"href":356},[384],{"type":18,"value":359},{"type":18,"value":361},{"type":13,"tag":343,"props":387,"children":388},{},[389,395],{"type":13,"tag":34,"props":390,"children":392},{"className":391},[],[393],{"type":18,"value":394},"pSurfaceFormatCount",{"type":18,"value":396}," is a pointer to an integer related to the\nnumber of format tuples available or queried, as described below.",{"type":13,"tag":343,"props":398,"children":399},{},[400,406,408,414,416,422],{"type":13,"tag":34,"props":401,"children":403},{"className":402},[],[404],{"type":18,"value":405},"pSurfaceFormats",{"type":18,"value":407}," is either ",{"type":13,"tag":34,"props":409,"children":411},{"className":410},[],[412],{"type":18,"value":413},"NULL",{"type":18,"value":415}," or a pointer to an array of\n",{"type":13,"tag":354,"props":417,"children":419},{"href":418},"/man/VkSurfaceFormat2KHR",[420],{"type":18,"value":421},"VkSurfaceFormat2KHR",{"type":18,"value":423}," structures.",{"type":13,"tag":14,"props":425,"children":426},{},[427,432,434,440,442,448],{"type":13,"tag":354,"props":428,"children":430},{"href":429},"/man/vkGetPhysicalDeviceSurfaceFormats2KHR",[431],{"type":18,"value":4},{"type":18,"value":433}," behaves similarly to\n",{"type":13,"tag":354,"props":435,"children":437},{"href":436},"/man/vkGetPhysicalDeviceSurfaceFormatsKHR",[438],{"type":18,"value":439},"vkGetPhysicalDeviceSurfaceFormatsKHR",{"type":18,"value":441},", with the ability to be extended\nvia ",{"type":13,"tag":34,"props":443,"children":445},{"className":444},[],[446],{"type":18,"value":447},"pNext",{"type":18,"value":449}," chains.",{"type":13,"tag":14,"props":451,"children":452},{},[453,455,460,462,467,469,475,477,482,484,489,491,496,498,503,505,510,512,517,519,524,526,532,534,540],{"type":18,"value":454},"If ",{"type":13,"tag":34,"props":456,"children":458},{"className":457},[],[459],{"type":18,"value":405},{"type":18,"value":461}," is ",{"type":13,"tag":34,"props":463,"children":465},{"className":464},[],[466],{"type":18,"value":413},{"type":18,"value":468},", then the number of format tuples\nsupported for the given ",{"type":13,"tag":34,"props":470,"children":472},{"className":471},[],[473],{"type":18,"value":474},"surface",{"type":18,"value":476}," is returned in\n",{"type":13,"tag":34,"props":478,"children":480},{"className":479},[],[481],{"type":18,"value":394},{"type":18,"value":483},".\nOtherwise, ",{"type":13,"tag":34,"props":485,"children":487},{"className":486},[],[488],{"type":18,"value":394},{"type":18,"value":490}," ",{"type":13,"tag":492,"props":493,"children":495},"normative",{"type":494},"must",[],{"type":18,"value":497}," point to a variable set by the\napplication to the number of elements in the ",{"type":13,"tag":34,"props":499,"children":501},{"className":500},[],[502],{"type":18,"value":405},{"type":18,"value":504}," array,\nand on return the variable is overwritten with the number of structures\nactually written to ",{"type":13,"tag":34,"props":506,"children":508},{"className":507},[],[509],{"type":18,"value":405},{"type":18,"value":511},".\nIf the value of ",{"type":13,"tag":34,"props":513,"children":515},{"className":514},[],[516],{"type":18,"value":394},{"type":18,"value":518}," is less than the number of format\ntuples supported, at most ",{"type":13,"tag":34,"props":520,"children":522},{"className":521},[],[523],{"type":18,"value":394},{"type":18,"value":525}," structures will be\nwritten, and ",{"type":13,"tag":34,"props":527,"children":529},{"className":528},[],[530],{"type":18,"value":531},"VK_INCOMPLETE",{"type":18,"value":533}," will be returned instead of\n",{"type":13,"tag":34,"props":535,"children":537},{"className":536},[],[538],{"type":18,"value":539},"VK_SUCCESS",{"type":18,"value":541},", to indicate that not all the available values were\nreturned.",{"type":13,"tag":543,"props":544,"children":546},"validity-group",{"name":545},"Valid Usage",[547,585],{"type":13,"tag":548,"props":549,"children":551},"validity-field",{"name":550},"VUID-vkGetPhysicalDeviceSurfaceFormats2KHR-pSurfaceInfo-06521",[552],{"type":13,"tag":14,"props":553,"children":554},{},[555,557,563,565,571,572,575,577,583],{"type":18,"value":556},"If the ",{"type":13,"tag":354,"props":558,"children":560},{"href":559},"/extensions/VK_GOOGLE_surfaceless_query",[561],{"type":18,"value":562},"VK_GOOGLE_surfaceless_query",{"type":18,"value":564}," extension is not enabled,\n",{"type":13,"tag":34,"props":566,"children":568},{"className":567},[],[569],{"type":18,"value":570},"pSurfaceInfo→surface",{"type":18,"value":490},{"type":13,"tag":492,"props":573,"children":574},{"type":494},[],{"type":18,"value":576}," be a valid ",{"type":13,"tag":354,"props":578,"children":580},{"href":579},"/man/VkSurfaceKHR",[581],{"type":18,"value":582},"VkSurfaceKHR",{"type":18,"value":584}," handle",{"type":13,"tag":548,"props":586,"children":588},{"name":587},"VUID-vkGetPhysicalDeviceSurfaceFormats2KHR-pSurfaceInfo-06522",[589],{"type":13,"tag":14,"props":590,"children":591},{},[592,593,598,600,606,607,612,613,616,618,623,625,631],{"type":18,"value":454},{"type":13,"tag":34,"props":594,"children":596},{"className":595},[],[597],{"type":18,"value":570},{"type":18,"value":599}," is not ",{"type":13,"tag":354,"props":601,"children":603},{"href":602},"/man/VK_NULL_HANDLE",[604],{"type":18,"value":605},"VK_NULL_HANDLE",{"type":18,"value":78},{"type":13,"tag":34,"props":608,"children":610},{"className":609},[],[611],{"type":18,"value":570},{"type":18,"value":490},{"type":13,"tag":492,"props":614,"children":615},{"type":494},[],{"type":18,"value":617}," be supported by ",{"type":13,"tag":34,"props":619,"children":621},{"className":620},[],[622],{"type":18,"value":73},{"type":18,"value":624},",\nas reported by ",{"type":13,"tag":354,"props":626,"children":628},{"href":627},"/man/vkGetPhysicalDeviceSurfaceSupportKHR",[629],{"type":18,"value":630},"vkGetPhysicalDeviceSurfaceSupportKHR",{"type":18,"value":632}," or an\nequivalent platform-specific mechanism",{"type":13,"tag":543,"props":634,"children":636},{"name":635},"Valid Usage (Implicit)",[637,661,685,711],{"type":13,"tag":548,"props":638,"children":640},{"name":639},"VUID-vkGetPhysicalDeviceSurfaceFormats2KHR-physicalDevice-parameter",[641],{"type":13,"tag":14,"props":642,"children":643},{},[644,649,650,653,654,660],{"type":13,"tag":34,"props":645,"children":647},{"className":646},[],[648],{"type":18,"value":73},{"type":18,"value":490},{"type":13,"tag":492,"props":651,"children":652},{"type":494},[],{"type":18,"value":576},{"type":13,"tag":354,"props":655,"children":657},{"href":656},"/man/VkPhysicalDevice",[658],{"type":18,"value":659},"VkPhysicalDevice",{"type":18,"value":584},{"type":13,"tag":548,"props":662,"children":664},{"name":663},"VUID-vkGetPhysicalDeviceSurfaceFormats2KHR-pSurfaceInfo-parameter",[665],{"type":13,"tag":14,"props":666,"children":667},{},[668,673,674,677,679,683],{"type":13,"tag":34,"props":669,"children":671},{"className":670},[],[672],{"type":18,"value":370},{"type":18,"value":490},{"type":13,"tag":492,"props":675,"children":676},{"type":494},[],{"type":18,"value":678}," be a valid pointer to a valid ",{"type":13,"tag":354,"props":680,"children":681},{"href":375},[682],{"type":18,"value":378},{"type":18,"value":684}," structure",{"type":13,"tag":548,"props":686,"children":688},{"name":687},"VUID-vkGetPhysicalDeviceSurfaceFormats2KHR-pSurfaceFormatCount-parameter",[689],{"type":13,"tag":14,"props":690,"children":691},{},[692,697,698,701,703,709],{"type":13,"tag":34,"props":693,"children":695},{"className":694},[],[696],{"type":18,"value":394},{"type":18,"value":490},{"type":13,"tag":492,"props":699,"children":700},{"type":494},[],{"type":18,"value":702}," be a valid pointer to a ",{"type":13,"tag":34,"props":704,"children":706},{"className":705},[],[707],{"type":18,"value":708},"uint32_t",{"type":18,"value":710}," value",{"type":13,"tag":548,"props":712,"children":714},{"name":713},"VUID-vkGetPhysicalDeviceSurfaceFormats2KHR-pSurfaceFormats-parameter",[715],{"type":13,"tag":14,"props":716,"children":717},{},[718,720,725,726,732,734,739,740,745,747,752,753,756,758,763,764,768],{"type":18,"value":719},"If the value referenced by ",{"type":13,"tag":34,"props":721,"children":723},{"className":722},[],[724],{"type":18,"value":394},{"type":18,"value":599},{"type":13,"tag":34,"props":727,"children":729},{"className":728},[],[730],{"type":18,"value":731},"0",{"type":18,"value":733},", and ",{"type":13,"tag":34,"props":735,"children":737},{"className":736},[],[738],{"type":18,"value":405},{"type":18,"value":599},{"type":13,"tag":34,"props":741,"children":743},{"className":742},[],[744],{"type":18,"value":413},{"type":18,"value":746},", ",{"type":13,"tag":34,"props":748,"children":750},{"className":749},[],[751],{"type":18,"value":405},{"type":18,"value":490},{"type":13,"tag":492,"props":754,"children":755},{"type":494},[],{"type":18,"value":757}," be a valid pointer to an array of ",{"type":13,"tag":34,"props":759,"children":761},{"className":760},[],[762],{"type":18,"value":394},{"type":18,"value":490},{"type":13,"tag":354,"props":765,"children":766},{"href":418},[767],{"type":18,"value":421},{"type":18,"value":769}," structures",{"type":13,"tag":771,"props":772,"children":773},"style",{},[774],{"type":18,"value":775},"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":777},[],"markdown",1729612517559]