[{"data":1,"prerenderedAt":808},["ShallowReactive",2],{"$f9_B59TwQUswZ66yBCKvDD3Nrr4txndn1FkzyZ7BXkWs":3},{"title":4,"description":5,"parent":6,"type":7,"xrefs":8,"body":9,"_type":807,"_id":4},"vkCreateAccelerationStructure2KHR","Create a new acceleration structure object using a device address","VK_KHR_device_address_commands","protos",[],{"type":10,"children":11,"toc":805},"root",[12,20,354,426,445,463,503,557,658,799],{"type":13,"tag":14,"props":15,"children":16},"element","p",{},[17],{"type":18,"value":19},"text","To create an acceleration structure using a device address, call:",{"type":13,"tag":21,"props":22,"children":23},"code-group",{},[24,157],{"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 vkCreateAccelerationStructure2KHR(\n VkDevice device,\n const VkAccelerationStructureCreateInfo2KHR* pCreateInfo,\n const VkAllocationCallbacks* pAllocator,\n VkAccelerationStructureKHR* pAccelerationStructure);\n","C","c","",[33],{"type":13,"tag":34,"props":35,"children":36},"code",{"__ignoreMap":31},[37,59,79,108,134],{"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}," VkDevice ",{"type":13,"tag":38,"props":69,"children":71},{"style":70},"--shiki-default:#953800;--shiki-dark:#FFA657",[72],{"type":18,"value":73},"device",{"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}," VkAccelerationStructureCreateInfo2KHR",{"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}," pCreateInfo",{"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,116,121,125,130],{"type":13,"tag":38,"props":113,"children":114},{"style":85},[115],{"type":18,"value":88},{"type":13,"tag":38,"props":117,"children":118},{"style":45},[119],{"type":18,"value":120}," VkAllocationCallbacks",{"type":13,"tag":38,"props":122,"children":123},{"style":85},[124],{"type":18,"value":98},{"type":13,"tag":38,"props":126,"children":127},{"style":70},[128],{"type":18,"value":129}," pAllocator",{"type":13,"tag":38,"props":131,"children":132},{"style":45},[133],{"type":18,"value":78},{"type":13,"tag":38,"props":135,"children":137},{"class":40,"line":136},5,[138,143,147,152],{"type":13,"tag":38,"props":139,"children":140},{"style":45},[141],{"type":18,"value":142}," VkAccelerationStructureKHR",{"type":13,"tag":38,"props":144,"children":145},{"style":85},[146],{"type":18,"value":98},{"type":13,"tag":38,"props":148,"children":149},{"style":70},[150],{"type":18,"value":151}," pAccelerationStructure",{"type":13,"tag":38,"props":153,"children":154},{"style":45},[155],{"type":18,"value":156},");\n",{"type":13,"tag":25,"props":158,"children":163},{"className":159,"code":160,"filename":161,"language":162,"meta":31,"style":31},"language-rs shiki shiki-themes github-light-default github-dark-default","pub fn create_acceleration_structure2_khr(\n device: vk::Device,\n p_create_info: *const vk::AccelerationStructureCreateInfo2KHR,\n p_allocator: *const vk::AllocationCallbacks,\n p_acceleration_structure: *mut vk::AccelerationStructureKHR,\n) -> vk::Result;\n","Rust","rs",[164],{"type":13,"tag":34,"props":165,"children":166},{"__ignoreMap":31},[167,189,221,255,288,322],{"type":13,"tag":38,"props":168,"children":169},{"class":40,"line":41},[170,175,180,185],{"type":13,"tag":38,"props":171,"children":172},{"style":85},[173],{"type":18,"value":174},"pub",{"type":13,"tag":38,"props":176,"children":177},{"style":85},[178],{"type":18,"value":179}," fn",{"type":13,"tag":38,"props":181,"children":182},{"style":51},[183],{"type":18,"value":184}," create_acceleration_structure2_khr",{"type":13,"tag":38,"props":186,"children":187},{"style":45},[188],{"type":18,"value":58},{"type":13,"tag":38,"props":190,"children":191},{"class":40,"line":61},[192,197,202,207,212,217],{"type":13,"tag":38,"props":193,"children":194},{"style":45},[195],{"type":18,"value":196}," device",{"type":13,"tag":38,"props":198,"children":199},{"style":85},[200],{"type":18,"value":201},":",{"type":13,"tag":38,"props":203,"children":204},{"style":70},[205],{"type":18,"value":206}," vk",{"type":13,"tag":38,"props":208,"children":209},{"style":85},[210],{"type":18,"value":211},"::",{"type":13,"tag":38,"props":213,"children":214},{"style":70},[215],{"type":18,"value":216},"Device",{"type":13,"tag":38,"props":218,"children":219},{"style":45},[220],{"type":18,"value":78},{"type":13,"tag":38,"props":222,"children":223},{"class":40,"line":81},[224,229,233,238,242,246,251],{"type":13,"tag":38,"props":225,"children":226},{"style":45},[227],{"type":18,"value":228}," p_create_info",{"type":13,"tag":38,"props":230,"children":231},{"style":85},[232],{"type":18,"value":201},{"type":13,"tag":38,"props":234,"children":235},{"style":85},[236],{"type":18,"value":237}," *const",{"type":13,"tag":38,"props":239,"children":240},{"style":70},[241],{"type":18,"value":206},{"type":13,"tag":38,"props":243,"children":244},{"style":85},[245],{"type":18,"value":211},{"type":13,"tag":38,"props":247,"children":248},{"style":70},[249],{"type":18,"value":250},"AccelerationStructureCreateInfo2KHR",{"type":13,"tag":38,"props":252,"children":253},{"style":45},[254],{"type":18,"value":78},{"type":13,"tag":38,"props":256,"children":257},{"class":40,"line":110},[258,263,267,271,275,279,284],{"type":13,"tag":38,"props":259,"children":260},{"style":45},[261],{"type":18,"value":262}," p_allocator",{"type":13,"tag":38,"props":264,"children":265},{"style":85},[266],{"type":18,"value":201},{"type":13,"tag":38,"props":268,"children":269},{"style":85},[270],{"type":18,"value":237},{"type":13,"tag":38,"props":272,"children":273},{"style":70},[274],{"type":18,"value":206},{"type":13,"tag":38,"props":276,"children":277},{"style":85},[278],{"type":18,"value":211},{"type":13,"tag":38,"props":280,"children":281},{"style":70},[282],{"type":18,"value":283},"AllocationCallbacks",{"type":13,"tag":38,"props":285,"children":286},{"style":45},[287],{"type":18,"value":78},{"type":13,"tag":38,"props":289,"children":290},{"class":40,"line":136},[291,296,300,305,309,313,318],{"type":13,"tag":38,"props":292,"children":293},{"style":45},[294],{"type":18,"value":295}," p_acceleration_structure",{"type":13,"tag":38,"props":297,"children":298},{"style":85},[299],{"type":18,"value":201},{"type":13,"tag":38,"props":301,"children":302},{"style":85},[303],{"type":18,"value":304}," *mut",{"type":13,"tag":38,"props":306,"children":307},{"style":70},[308],{"type":18,"value":206},{"type":13,"tag":38,"props":310,"children":311},{"style":85},[312],{"type":18,"value":211},{"type":13,"tag":38,"props":314,"children":315},{"style":70},[316],{"type":18,"value":317},"AccelerationStructureKHR",{"type":13,"tag":38,"props":319,"children":320},{"style":45},[321],{"type":18,"value":78},{"type":13,"tag":38,"props":323,"children":325},{"class":40,"line":324},6,[326,331,336,340,344,349],{"type":13,"tag":38,"props":327,"children":328},{"style":45},[329],{"type":18,"value":330},") ",{"type":13,"tag":38,"props":332,"children":333},{"style":85},[334],{"type":18,"value":335},"->",{"type":13,"tag":38,"props":337,"children":338},{"style":70},[339],{"type":18,"value":206},{"type":13,"tag":38,"props":341,"children":342},{"style":85},[343],{"type":18,"value":211},{"type":13,"tag":38,"props":345,"children":346},{"style":70},[347],{"type":18,"value":348},"Result",{"type":13,"tag":38,"props":350,"children":351},{"style":45},[352],{"type":18,"value":353},";\n",{"type":13,"tag":355,"props":356,"children":357},"ul",{},[358,369,389,408],{"type":13,"tag":359,"props":360,"children":361},"li",{},[362,367],{"type":13,"tag":34,"props":363,"children":365},{"className":364},[],[366],{"type":18,"value":73},{"type":18,"value":368}," is the logical device that creates the acceleration\nstructure object.",{"type":13,"tag":359,"props":370,"children":371},{},[372,378,380,387],{"type":13,"tag":34,"props":373,"children":375},{"className":374},[],[376],{"type":18,"value":377},"pCreateInfo",{"type":18,"value":379}," is a pointer to a\n",{"type":13,"tag":381,"props":382,"children":384},"a",{"href":383},"/man/VkAccelerationStructureCreateInfo2KHR",[385],{"type":18,"value":386},"VkAccelerationStructureCreateInfo2KHR",{"type":18,"value":388}," structure containing\nparameters affecting creation of the acceleration structure.",{"type":13,"tag":359,"props":390,"children":391},{},[392,398,400,406],{"type":13,"tag":34,"props":393,"children":395},{"className":394},[],[396],{"type":18,"value":397},"pAllocator",{"type":18,"value":399}," controls host memory allocation as described in the\n",{"type":13,"tag":381,"props":401,"children":403},{"href":402},"/chapters/memory#memory-allocation",[404],{"type":18,"value":405},"Memory Allocation",{"type":18,"value":407}," chapter.",{"type":13,"tag":359,"props":409,"children":410},{},[411,417,418,424],{"type":13,"tag":34,"props":412,"children":414},{"className":413},[],[415],{"type":18,"value":416},"pAccelerationStructure",{"type":18,"value":379},{"type":13,"tag":34,"props":419,"children":421},{"className":420},[],[422],{"type":18,"value":423},"VkAccelerationStructureKHR",{"type":18,"value":425}," handle in which the resulting\nacceleration structure object is returned.",{"type":13,"tag":14,"props":427,"children":428},{},[429,431,437,439,443],{"type":18,"value":430},"Similar to other objects in Vulkan, the acceleration structure creation\nmerely creates an object with a specific ",{"type":13,"tag":34,"props":432,"children":434},{"className":433},[],[435],{"type":18,"value":436},"shape",{"type":18,"value":438},".\nThe type and quantity of geometry that can be built into an acceleration\nstructure is determined by the parameters of\n",{"type":13,"tag":381,"props":440,"children":441},{"href":383},[442],{"type":18,"value":386},{"type":18,"value":444},".",{"type":13,"tag":14,"props":446,"children":447},{},[448,450,455,456,462],{"type":18,"value":449},"The acceleration structure data is stored in the object referred to by\n",{"type":13,"tag":34,"props":451,"children":453},{"className":452},[],[454],{"type":18,"value":386},{"type":18,"value":211},{"type":13,"tag":34,"props":457,"children":459},{"className":458},[],[460],{"type":18,"value":461},"addressRange.address",{"type":18,"value":444},{"type":13,"tag":14,"props":464,"children":465},{},[466,468,473,475,480,482,488,490,496,498,501],{"type":18,"value":467},"Once the ",{"type":13,"tag":34,"props":469,"children":471},{"className":470},[],[472],{"type":18,"value":423},{"type":18,"value":474}," object has been created, it ",{"type":13,"tag":476,"props":477,"children":479},"normative",{"type":478},"must",[],{"type":18,"value":481},"\nbe populated by acceleration structure build or acceleration structure copy\ncommands such as ",{"type":13,"tag":381,"props":483,"children":485},{"href":484},"/man/vkCmdBuildAccelerationStructuresKHR",[486],{"type":18,"value":487},"vkCmdBuildAccelerationStructuresKHR",{"type":18,"value":489}," and\n",{"type":13,"tag":381,"props":491,"children":493},{"href":492},"/man/vkCmdCopyAccelerationStructureKHR",[494],{"type":18,"value":495},"vkCmdCopyAccelerationStructureKHR",{"type":18,"value":497},".\nAcceleration structures created with this command ",{"type":13,"tag":476,"props":499,"children":500},{"type":478},[],{"type":18,"value":502}," not be used by host\ncommands.",{"type":13,"tag":504,"props":505,"children":506},"note",{},[507],{"type":13,"tag":14,"props":508,"children":509},{},[510,512,518,520,526,528,534,536,542,543,548,549,555],{"type":18,"value":511},"The expected usage for a trace capture/replay tool is that it will serialize\nand later deserialize the acceleration structure data using acceleration\nstructure copy commands.\nDuring capture the tool will use\n",{"type":13,"tag":381,"props":513,"children":515},{"href":514},"/man/vkCmdCopyAccelerationStructureToMemoryKHR",[516],{"type":18,"value":517},"vkCmdCopyAccelerationStructureToMemoryKHR",{"type":18,"value":519}," with a ",{"type":13,"tag":34,"props":521,"children":523},{"className":522},[],[524],{"type":18,"value":525},"mode",{"type":18,"value":527}," of\n",{"type":13,"tag":34,"props":529,"children":531},{"className":530},[],[532],{"type":18,"value":533},"VK_COPY_ACCELERATION_STRUCTURE_MODE_SERIALIZE_KHR",{"type":18,"value":535},", and\n",{"type":13,"tag":381,"props":537,"children":539},{"href":538},"/man/vkCmdCopyMemoryToAccelerationStructureKHR",[540],{"type":18,"value":541},"vkCmdCopyMemoryToAccelerationStructureKHR",{"type":18,"value":519},{"type":13,"tag":34,"props":544,"children":546},{"className":545},[],[547],{"type":18,"value":525},{"type":18,"value":527},{"type":13,"tag":34,"props":550,"children":552},{"className":551},[],[553],{"type":18,"value":554},"VK_COPY_ACCELERATION_STRUCTURE_MODE_DESERIALIZE_KHR",{"type":18,"value":556}," during replay.",{"type":13,"tag":558,"props":559,"children":561},"validity-group",{"name":560},"Valid Usage",[562,596,628],{"type":13,"tag":563,"props":564,"children":566},"validity-field",{"name":565},"VUID-vkCreateAccelerationStructure2KHR-accelerationStructure-03611",[567],{"type":13,"tag":14,"props":568,"children":569},{},[570,572,589,591,594],{"type":18,"value":571},"The ",{"type":13,"tag":381,"props":573,"children":575},{"href":574},"/man/VkPhysicalDeviceAccelerationStructureFeaturesKHR#features-accelerationStructure",[576,582,583],{"type":13,"tag":34,"props":577,"children":579},{"className":578},[],[580],{"type":18,"value":581},"VkPhysicalDeviceAccelerationStructureFeaturesKHR",{"type":18,"value":211},{"type":13,"tag":34,"props":584,"children":586},{"className":585},[],[587],{"type":18,"value":588},"accelerationStructure",{"type":18,"value":590},"\nfeature ",{"type":13,"tag":476,"props":592,"children":593},{"type":478},[],{"type":18,"value":595}," be enabled",{"type":13,"tag":563,"props":597,"children":599},{"name":598},"VUID-vkCreateAccelerationStructure2KHR-device-03489",[600],{"type":13,"tag":14,"props":601,"children":602},{},[603,605,610,612,622,624,627],{"type":18,"value":604},"If ",{"type":13,"tag":34,"props":606,"children":608},{"className":607},[],[609],{"type":18,"value":73},{"type":18,"value":611}," was created with multiple physical devices, then the\n",{"type":13,"tag":381,"props":613,"children":615},{"href":614},"/man/VkPhysicalDeviceVulkan12Features#features-bufferDeviceAddressMultiDevice",[616],{"type":13,"tag":34,"props":617,"children":619},{"className":618},[],[620],{"type":18,"value":621},"bufferDeviceAddressMultiDevice",{"type":18,"value":623}," feature ",{"type":13,"tag":476,"props":625,"children":626},{"type":478},[],{"type":18,"value":595},{"type":13,"tag":563,"props":629,"children":631},{"name":630},"VUID-vkCreateAccelerationStructure2KHR-deviceAddressCommands-13086",[632],{"type":13,"tag":14,"props":633,"children":634},{},[635,636,653,654,657],{"type":18,"value":571},{"type":13,"tag":381,"props":637,"children":639},{"href":638},"/man/VkPhysicalDeviceDeviceAddressCommandsFeaturesKHR#features-deviceAddressCommands",[640,646,647],{"type":13,"tag":34,"props":641,"children":643},{"className":642},[],[644],{"type":18,"value":645},"VkPhysicalDeviceDeviceAddressCommandsFeaturesKHR",{"type":18,"value":211},{"type":13,"tag":34,"props":648,"children":650},{"className":649},[],[651],{"type":18,"value":652},"deviceAddressCommands",{"type":18,"value":590},{"type":13,"tag":476,"props":655,"children":656},{"type":478},[],{"type":18,"value":595},{"type":13,"tag":558,"props":659,"children":661},{"name":660},"Valid Usage (Implicit)",[662,689,713,753,777],{"type":13,"tag":563,"props":663,"children":665},{"name":664},"VUID-vkCreateAccelerationStructure2KHR-device-parameter",[666],{"type":13,"tag":14,"props":667,"children":668},{},[669,674,676,679,681,687],{"type":13,"tag":34,"props":670,"children":672},{"className":671},[],[673],{"type":18,"value":73},{"type":18,"value":675}," ",{"type":13,"tag":476,"props":677,"children":678},{"type":478},[],{"type":18,"value":680}," be a valid ",{"type":13,"tag":381,"props":682,"children":684},{"href":683},"/man/VkDevice",[685],{"type":18,"value":686},"VkDevice",{"type":18,"value":688}," handle",{"type":13,"tag":563,"props":690,"children":692},{"name":691},"VUID-vkCreateAccelerationStructure2KHR-pCreateInfo-parameter",[693],{"type":13,"tag":14,"props":694,"children":695},{},[696,701,702,705,707,711],{"type":13,"tag":34,"props":697,"children":699},{"className":698},[],[700],{"type":18,"value":377},{"type":18,"value":675},{"type":13,"tag":476,"props":703,"children":704},{"type":478},[],{"type":18,"value":706}," be a valid pointer to a valid ",{"type":13,"tag":381,"props":708,"children":709},{"href":383},[710],{"type":18,"value":386},{"type":18,"value":712}," structure",{"type":13,"tag":563,"props":714,"children":716},{"name":715},"VUID-vkCreateAccelerationStructure2KHR-pAllocator-parameter",[717],{"type":13,"tag":14,"props":718,"children":719},{},[720,721,726,728,734,736,741,742,745,746,752],{"type":18,"value":604},{"type":13,"tag":34,"props":722,"children":724},{"className":723},[],[725],{"type":18,"value":397},{"type":18,"value":727}," is not ",{"type":13,"tag":34,"props":729,"children":731},{"className":730},[],[732],{"type":18,"value":733},"NULL",{"type":18,"value":735},", ",{"type":13,"tag":34,"props":737,"children":739},{"className":738},[],[740],{"type":18,"value":397},{"type":18,"value":675},{"type":13,"tag":476,"props":743,"children":744},{"type":478},[],{"type":18,"value":706},{"type":13,"tag":381,"props":747,"children":749},{"href":748},"/man/VkAllocationCallbacks",[750],{"type":18,"value":751},"VkAllocationCallbacks",{"type":18,"value":712},{"type":13,"tag":563,"props":754,"children":756},{"name":755},"VUID-vkCreateAccelerationStructure2KHR-pAccelerationStructure-parameter",[757],{"type":13,"tag":14,"props":758,"children":759},{},[760,765,766,769,771,776],{"type":13,"tag":34,"props":761,"children":763},{"className":762},[],[764],{"type":18,"value":416},{"type":18,"value":675},{"type":13,"tag":476,"props":767,"children":768},{"type":478},[],{"type":18,"value":770}," be a valid pointer to a ",{"type":13,"tag":381,"props":772,"children":774},{"href":773},"/man/VkAccelerationStructureKHR",[775],{"type":18,"value":423},{"type":18,"value":688},{"type":13,"tag":563,"props":778,"children":780},{"name":779},"VUID-vkCreateAccelerationStructure2KHR-device-queuecount",[781],{"type":13,"tag":14,"props":782,"children":783},{},[784,786,789,791,797],{"type":18,"value":785},"The device ",{"type":13,"tag":476,"props":787,"children":788},{"type":478},[],{"type":18,"value":790}," have been created with at least ",{"type":13,"tag":34,"props":792,"children":794},{"className":793},[],[795],{"type":18,"value":796},"1",{"type":18,"value":798}," queue",{"type":13,"tag":800,"props":801,"children":802},"style",{},[803],{"type":18,"value":804},"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":806},[],"markdown",1773471485997]