[{"data":1,"prerenderedAt":767},["ShallowReactive",2],{"DNQRr7j7Om":3},{"title":4,"description":5,"parent":6,"type":7,"xrefs":8,"body":9,"_type":766,"_id":4},"VkAccelerationStructureInstanceKHR","Structure specifying a single acceleration structure instance for building into an acceleration structure geometry","VK_KHR_acceleration_structure","structs",[],{"type":10,"children":11,"toc":764},"root",[12,38,43,403,408,472,617,622,717,728,758],{"type":13,"tag":14,"props":15,"children":16},"element","p",{},[17,24,26,31,33,36],{"type":13,"tag":18,"props":19,"children":20},"em",{},[21],{"type":22,"value":23},"text","Acceleration structure instances",{"type":22,"value":25}," ",{"type":13,"tag":27,"props":28,"children":30},"normative",{"type":29},"can",[],{"type":22,"value":32}," be built into top-level acceleration\nstructures.\nEach acceleration structure instance is a separate entry in the top-level\nacceleration structure which includes all the geometry of a bottom-level\nacceleration structure at a transformed location.\nMultiple instances ",{"type":13,"tag":27,"props":34,"children":35},{"type":29},[],{"type":22,"value":37}," point to the same bottom level acceleration\nstructure.",{"type":13,"tag":14,"props":39,"children":40},{},[41],{"type":22,"value":42},"An acceleration structure instance is defined by the structure:",{"type":13,"tag":44,"props":45,"children":46},"code-group",{},[47,210],{"type":13,"tag":48,"props":49,"children":55},"pre",{"className":50,"code":51,"filename":52,"language":53,"meta":54,"style":54},"language-c shiki shiki-themes github-light-default github-dark-default","typedef struct VkAccelerationStructureInstanceKHR {\n // The bitfields in this structure are non-normative since bitfield ordering is implementation-defined in C. The specification defines the normative layout.;\n VkTransformMatrixKHR transform;\n uint32_t instanceCustomIndex:24;\n uint32_t mask:8;\n uint32_t instanceShaderBindingTableRecordOffset:24;\n VkGeometryInstanceFlagsKHR flags:8;\n uint64_t accelerationStructureReference;\n} VkAccelerationStructureInstanceKHR;\n","C","c","",[56],{"type":13,"tag":57,"props":58,"children":59},"code",{"__ignoreMap":54},[60,83,93,102,127,149,170,187,201],{"type":13,"tag":61,"props":62,"children":65},"span",{"class":63,"line":64},"line",1,[66,72,77],{"type":13,"tag":61,"props":67,"children":69},{"style":68},"--shiki-default:#CF222E;--shiki-dark:#FF7B72",[70],{"type":22,"value":71},"typedef",{"type":13,"tag":61,"props":73,"children":74},{"style":68},[75],{"type":22,"value":76}," struct",{"type":13,"tag":61,"props":78,"children":80},{"style":79},"--shiki-default:#1F2328;--shiki-dark:#E6EDF3",[81],{"type":22,"value":82}," VkAccelerationStructureInstanceKHR {\n",{"type":13,"tag":61,"props":84,"children":86},{"class":63,"line":85},2,[87],{"type":13,"tag":61,"props":88,"children":90},{"style":89},"--shiki-default:#6E7781;--shiki-dark:#8B949E",[91],{"type":22,"value":92}," // The bitfields in this structure are non-normative since bitfield ordering is implementation-defined in C. The specification defines the normative layout.;\n",{"type":13,"tag":61,"props":94,"children":96},{"class":63,"line":95},3,[97],{"type":13,"tag":61,"props":98,"children":99},{"style":79},[100],{"type":22,"value":101}," VkTransformMatrixKHR transform;\n",{"type":13,"tag":61,"props":103,"children":105},{"class":63,"line":104},4,[106,111,116,122],{"type":13,"tag":61,"props":107,"children":108},{"style":68},[109],{"type":22,"value":110}," uint32_t",{"type":13,"tag":61,"props":112,"children":113},{"style":79},[114],{"type":22,"value":115}," instanceCustomIndex:",{"type":13,"tag":61,"props":117,"children":119},{"style":118},"--shiki-default:#0550AE;--shiki-dark:#79C0FF",[120],{"type":22,"value":121},"24",{"type":13,"tag":61,"props":123,"children":124},{"style":79},[125],{"type":22,"value":126},";\n",{"type":13,"tag":61,"props":128,"children":130},{"class":63,"line":129},5,[131,135,140,145],{"type":13,"tag":61,"props":132,"children":133},{"style":68},[134],{"type":22,"value":110},{"type":13,"tag":61,"props":136,"children":137},{"style":79},[138],{"type":22,"value":139}," mask:",{"type":13,"tag":61,"props":141,"children":142},{"style":118},[143],{"type":22,"value":144},"8",{"type":13,"tag":61,"props":146,"children":147},{"style":79},[148],{"type":22,"value":126},{"type":13,"tag":61,"props":150,"children":152},{"class":63,"line":151},6,[153,157,162,166],{"type":13,"tag":61,"props":154,"children":155},{"style":68},[156],{"type":22,"value":110},{"type":13,"tag":61,"props":158,"children":159},{"style":79},[160],{"type":22,"value":161}," instanceShaderBindingTableRecordOffset:",{"type":13,"tag":61,"props":163,"children":164},{"style":118},[165],{"type":22,"value":121},{"type":13,"tag":61,"props":167,"children":168},{"style":79},[169],{"type":22,"value":126},{"type":13,"tag":61,"props":171,"children":173},{"class":63,"line":172},7,[174,179,183],{"type":13,"tag":61,"props":175,"children":176},{"style":79},[177],{"type":22,"value":178}," VkGeometryInstanceFlagsKHR flags:",{"type":13,"tag":61,"props":180,"children":181},{"style":118},[182],{"type":22,"value":144},{"type":13,"tag":61,"props":184,"children":185},{"style":79},[186],{"type":22,"value":126},{"type":13,"tag":61,"props":188,"children":190},{"class":63,"line":189},8,[191,196],{"type":13,"tag":61,"props":192,"children":193},{"style":68},[194],{"type":22,"value":195}," uint64_t",{"type":13,"tag":61,"props":197,"children":198},{"style":79},[199],{"type":22,"value":200}," accelerationStructureReference;\n",{"type":13,"tag":61,"props":202,"children":204},{"class":63,"line":203},9,[205],{"type":13,"tag":61,"props":206,"children":207},{"style":79},[208],{"type":22,"value":209},"} VkAccelerationStructureInstanceKHR;\n",{"type":13,"tag":48,"props":211,"children":216},{"className":212,"code":213,"filename":214,"language":215,"meta":54,"style":54},"language-rs shiki shiki-themes github-light-default github-dark-default","pub struct AccelerationStructureInstanceKHR {\n /// The bitfields in this structure are non-normative since bitfield ordering is implementation-defined in C. The specification defines the normative layout.\n transform: vk::TransformMatrixKHR,\n instance_custom_index: u32,\n mask: u32,\n instance_shader_binding_table_record_offset: u32,\n flags: vk::GeometryInstanceFlagsKHR,\n acceleration_structure_reference: u64,\n}\n","Rust","rs",[217],{"type":13,"tag":57,"props":218,"children":219},{"__ignoreMap":54},[220,243,251,284,305,325,345,374,395],{"type":13,"tag":61,"props":221,"children":222},{"class":63,"line":64},[223,228,232,238],{"type":13,"tag":61,"props":224,"children":225},{"style":68},[226],{"type":22,"value":227},"pub",{"type":13,"tag":61,"props":229,"children":230},{"style":68},[231],{"type":22,"value":76},{"type":13,"tag":61,"props":233,"children":235},{"style":234},"--shiki-default:#953800;--shiki-dark:#FFA657",[236],{"type":22,"value":237}," AccelerationStructureInstanceKHR",{"type":13,"tag":61,"props":239,"children":240},{"style":79},[241],{"type":22,"value":242}," {\n",{"type":13,"tag":61,"props":244,"children":245},{"class":63,"line":85},[246],{"type":13,"tag":61,"props":247,"children":248},{"style":89},[249],{"type":22,"value":250}," /// The bitfields in this structure are non-normative since bitfield ordering is implementation-defined in C. The specification defines the normative layout.\n",{"type":13,"tag":61,"props":252,"children":253},{"class":63,"line":95},[254,259,264,269,274,279],{"type":13,"tag":61,"props":255,"children":256},{"style":79},[257],{"type":22,"value":258}," transform",{"type":13,"tag":61,"props":260,"children":261},{"style":68},[262],{"type":22,"value":263},":",{"type":13,"tag":61,"props":265,"children":266},{"style":234},[267],{"type":22,"value":268}," vk",{"type":13,"tag":61,"props":270,"children":271},{"style":68},[272],{"type":22,"value":273},"::",{"type":13,"tag":61,"props":275,"children":276},{"style":234},[277],{"type":22,"value":278},"TransformMatrixKHR",{"type":13,"tag":61,"props":280,"children":281},{"style":79},[282],{"type":22,"value":283},",\n",{"type":13,"tag":61,"props":285,"children":286},{"class":63,"line":104},[287,292,296,301],{"type":13,"tag":61,"props":288,"children":289},{"style":79},[290],{"type":22,"value":291}," instance_custom_index",{"type":13,"tag":61,"props":293,"children":294},{"style":68},[295],{"type":22,"value":263},{"type":13,"tag":61,"props":297,"children":298},{"style":234},[299],{"type":22,"value":300}," u32",{"type":13,"tag":61,"props":302,"children":303},{"style":79},[304],{"type":22,"value":283},{"type":13,"tag":61,"props":306,"children":307},{"class":63,"line":129},[308,313,317,321],{"type":13,"tag":61,"props":309,"children":310},{"style":79},[311],{"type":22,"value":312}," mask",{"type":13,"tag":61,"props":314,"children":315},{"style":68},[316],{"type":22,"value":263},{"type":13,"tag":61,"props":318,"children":319},{"style":234},[320],{"type":22,"value":300},{"type":13,"tag":61,"props":322,"children":323},{"style":79},[324],{"type":22,"value":283},{"type":13,"tag":61,"props":326,"children":327},{"class":63,"line":151},[328,333,337,341],{"type":13,"tag":61,"props":329,"children":330},{"style":79},[331],{"type":22,"value":332}," instance_shader_binding_table_record_offset",{"type":13,"tag":61,"props":334,"children":335},{"style":68},[336],{"type":22,"value":263},{"type":13,"tag":61,"props":338,"children":339},{"style":234},[340],{"type":22,"value":300},{"type":13,"tag":61,"props":342,"children":343},{"style":79},[344],{"type":22,"value":283},{"type":13,"tag":61,"props":346,"children":347},{"class":63,"line":172},[348,353,357,361,365,370],{"type":13,"tag":61,"props":349,"children":350},{"style":79},[351],{"type":22,"value":352}," flags",{"type":13,"tag":61,"props":354,"children":355},{"style":68},[356],{"type":22,"value":263},{"type":13,"tag":61,"props":358,"children":359},{"style":234},[360],{"type":22,"value":268},{"type":13,"tag":61,"props":362,"children":363},{"style":68},[364],{"type":22,"value":273},{"type":13,"tag":61,"props":366,"children":367},{"style":234},[368],{"type":22,"value":369},"GeometryInstanceFlagsKHR",{"type":13,"tag":61,"props":371,"children":372},{"style":79},[373],{"type":22,"value":283},{"type":13,"tag":61,"props":375,"children":376},{"class":63,"line":189},[377,382,386,391],{"type":13,"tag":61,"props":378,"children":379},{"style":79},[380],{"type":22,"value":381}," acceleration_structure_reference",{"type":13,"tag":61,"props":383,"children":384},{"style":68},[385],{"type":22,"value":263},{"type":13,"tag":61,"props":387,"children":388},{"style":234},[389],{"type":22,"value":390}," u64",{"type":13,"tag":61,"props":392,"children":393},{"style":79},[394],{"type":22,"value":283},{"type":13,"tag":61,"props":396,"children":397},{"class":63,"line":203},[398],{"type":13,"tag":61,"props":399,"children":400},{"style":79},[401],{"type":22,"value":402},"}\n",{"type":13,"tag":14,"props":404,"children":405},{},[406],{"type":22,"value":407},"or the equivalent",{"type":13,"tag":44,"props":409,"children":410},{},[411,430],{"type":13,"tag":48,"props":412,"children":414},{"className":50,"code":413,"filename":52,"language":53,"meta":54,"style":54},"typedef VkAccelerationStructureInstanceKHR VkAccelerationStructureInstanceNV;\n",[415],{"type":13,"tag":57,"props":416,"children":417},{"__ignoreMap":54},[418],{"type":13,"tag":61,"props":419,"children":420},{"class":63,"line":64},[421,425],{"type":13,"tag":61,"props":422,"children":423},{"style":68},[424],{"type":22,"value":71},{"type":13,"tag":61,"props":426,"children":427},{"style":79},[428],{"type":22,"value":429}," VkAccelerationStructureInstanceKHR VkAccelerationStructureInstanceNV;\n",{"type":13,"tag":48,"props":431,"children":433},{"className":212,"code":432,"filename":214,"language":215,"meta":54,"style":54},"type AccelerationStructureInstanceNV = vk::AccelerationStructureInstanceKHR;\n",[434],{"type":13,"tag":57,"props":435,"children":436},{"__ignoreMap":54},[437],{"type":13,"tag":61,"props":438,"children":439},{"class":63,"line":64},[440,445,450,455,459,463,468],{"type":13,"tag":61,"props":441,"children":442},{"style":68},[443],{"type":22,"value":444},"type",{"type":13,"tag":61,"props":446,"children":447},{"style":234},[448],{"type":22,"value":449}," AccelerationStructureInstanceNV",{"type":13,"tag":61,"props":451,"children":452},{"style":68},[453],{"type":22,"value":454}," =",{"type":13,"tag":61,"props":456,"children":457},{"style":234},[458],{"type":22,"value":268},{"type":13,"tag":61,"props":460,"children":461},{"style":68},[462],{"type":22,"value":273},{"type":13,"tag":61,"props":464,"children":465},{"style":234},[466],{"type":22,"value":467},"AccelerationStructureInstanceKHR",{"type":13,"tag":61,"props":469,"children":470},{"style":79},[471],{"type":22,"value":126},{"type":13,"tag":473,"props":474,"children":475},"ul",{},[476,497,516,539,550,569],{"type":13,"tag":477,"props":478,"children":479},"li",{},[480,486,488,495],{"type":13,"tag":57,"props":481,"children":483},{"className":482},[],[484],{"type":22,"value":485},"transform",{"type":22,"value":487}," is a ",{"type":13,"tag":489,"props":490,"children":492},"a",{"href":491},"/man/VkTransformMatrixKHR",[493],{"type":22,"value":494},"VkTransformMatrixKHR",{"type":22,"value":496}," structure describing a\ntransformation to be applied to the acceleration structure.",{"type":13,"tag":477,"props":498,"children":499},{},[500,506,508,514],{"type":13,"tag":57,"props":501,"children":503},{"className":502},[],[504],{"type":22,"value":505},"instanceCustomIndex",{"type":22,"value":507}," is a 24-bit application-specified index value\naccessible to ray shaders in the ",{"type":13,"tag":57,"props":509,"children":511},{"className":510},[],[512],{"type":22,"value":513},"InstanceCustomIndexKHR",{"type":22,"value":515}," built-in.",{"type":13,"tag":477,"props":517,"children":518},{},[519,525,527,531,533],{"type":13,"tag":57,"props":520,"children":522},{"className":521},[],[523],{"type":22,"value":524},"mask",{"type":22,"value":526}," is an 8-bit visibility mask for the geometry.\nThe instance ",{"type":13,"tag":27,"props":528,"children":530},{"type":529},"may",[],{"type":22,"value":532}," only be hit if ",{"type":13,"tag":57,"props":534,"children":536},{"className":535},[],[537],{"type":22,"value":538},"Cull Mask & instance.mask != 0",{"type":13,"tag":477,"props":540,"children":541},{},[542,548],{"type":13,"tag":57,"props":543,"children":545},{"className":544},[],[546],{"type":22,"value":547},"instanceShaderBindingTableRecordOffset",{"type":22,"value":549}," is a 24-bit offset used in\ncalculating the hit shader binding table index.",{"type":13,"tag":477,"props":551,"children":552},{},[553,559,561,567],{"type":13,"tag":57,"props":554,"children":556},{"className":555},[],[557],{"type":22,"value":558},"flags",{"type":22,"value":560}," is an 8-bit mask of ",{"type":13,"tag":489,"props":562,"children":564},{"href":563},"/man/VkGeometryInstanceFlagBitsKHR",[565],{"type":22,"value":566},"VkGeometryInstanceFlagBitsKHR",{"type":22,"value":568},"\nvalues to apply to this instance.",{"type":13,"tag":477,"props":570,"children":571},{},[572,578,580],{"type":13,"tag":57,"props":573,"children":575},{"className":574},[],[576],{"type":22,"value":577},"accelerationStructureReference",{"type":22,"value":579}," is either:",{"type":13,"tag":473,"props":581,"children":582},{},[583,604],{"type":13,"tag":477,"props":584,"children":585},{},[586,588,594,596,602],{"type":22,"value":587},"a device address containing the value obtained from\n",{"type":13,"tag":489,"props":589,"children":591},{"href":590},"/man/vkGetAccelerationStructureDeviceAddressKHR",[592],{"type":22,"value":593},"vkGetAccelerationStructureDeviceAddressKHR",{"type":22,"value":595},"\nor\n",{"type":13,"tag":489,"props":597,"children":599},{"href":598},"/man/vkGetAccelerationStructureHandleNV",[600],{"type":22,"value":601},"vkGetAccelerationStructureHandleNV",{"type":22,"value":603},"\n(used by device operations which reference acceleration structures) or,",{"type":13,"tag":477,"props":605,"children":606},{},[607,609,615],{"type":22,"value":608},"a ",{"type":13,"tag":489,"props":610,"children":612},{"href":611},"/man/VkAccelerationStructureKHR",[613],{"type":22,"value":614},"VkAccelerationStructureKHR",{"type":22,"value":616}," object (used by host operations\nwhich reference acceleration structures).",{"type":13,"tag":14,"props":618,"children":619},{},[620],{"type":22,"value":621},"The C language specification does not define the ordering of bit-fields, but\nin practice, this struct produces the correct layout with existing\ncompilers.\nThe intended bit pattern is for the following:",{"type":13,"tag":473,"props":623,"children":624},{},[625,673],{"type":13,"tag":477,"props":626,"children":627},{},[628,633,635,640,642,648,650],{"type":13,"tag":57,"props":629,"children":631},{"className":630},[],[632],{"type":22,"value":505},{"type":22,"value":634}," and ",{"type":13,"tag":57,"props":636,"children":638},{"className":637},[],[639],{"type":22,"value":524},{"type":22,"value":641}," occupy the same memory as if a\nsingle ",{"type":13,"tag":57,"props":643,"children":645},{"className":644},[],[646],{"type":22,"value":647},"uint32_t",{"type":22,"value":649}," was specified in their place",{"type":13,"tag":473,"props":651,"children":652},{},[653,663],{"type":13,"tag":477,"props":654,"children":655},{},[656,661],{"type":13,"tag":57,"props":657,"children":659},{"className":658},[],[660],{"type":22,"value":505},{"type":22,"value":662}," occupies the 24 least significant bits of\nthat memory",{"type":13,"tag":477,"props":664,"children":665},{},[666,671],{"type":13,"tag":57,"props":667,"children":669},{"className":668},[],[670],{"type":22,"value":524},{"type":22,"value":672}," occupies the 8 most significant bits of that memory",{"type":13,"tag":477,"props":674,"children":675},{},[676,681,682,687,689,694,695],{"type":13,"tag":57,"props":677,"children":679},{"className":678},[],[680],{"type":22,"value":547},{"type":22,"value":634},{"type":13,"tag":57,"props":683,"children":685},{"className":684},[],[686],{"type":22,"value":558},{"type":22,"value":688}," occupy the\nsame memory as if a single ",{"type":13,"tag":57,"props":690,"children":692},{"className":691},[],[693],{"type":22,"value":647},{"type":22,"value":649},{"type":13,"tag":473,"props":696,"children":697},{},[698,708],{"type":13,"tag":477,"props":699,"children":700},{},[701,706],{"type":13,"tag":57,"props":702,"children":704},{"className":703},[],[705],{"type":22,"value":547},{"type":22,"value":707}," occupies the 24 least\nsignificant bits of that memory",{"type":13,"tag":477,"props":709,"children":710},{},[711,716],{"type":13,"tag":57,"props":712,"children":714},{"className":713},[],[715],{"type":22,"value":558},{"type":22,"value":672},{"type":13,"tag":14,"props":718,"children":719},{},[720,722,726],{"type":22,"value":721},"If a compiler produces code that diverges from that pattern, applications\n",{"type":13,"tag":27,"props":723,"children":725},{"type":724},"must",[],{"type":22,"value":727}," employ another method to set values according to the correct bit\npattern.",{"type":13,"tag":729,"props":730,"children":732},"validity-group",{"name":731},"Valid Usage (Implicit)",[733],{"type":13,"tag":734,"props":735,"children":737},"validity-field",{"name":736},"VUID-VkAccelerationStructureInstanceKHR-flags-parameter",[738],{"type":13,"tag":14,"props":739,"children":740},{},[741,746,747,750,752,756],{"type":13,"tag":57,"props":742,"children":744},{"className":743},[],[745],{"type":22,"value":558},{"type":22,"value":25},{"type":13,"tag":27,"props":748,"children":749},{"type":724},[],{"type":22,"value":751}," be a valid combination of ",{"type":13,"tag":489,"props":753,"children":754},{"href":563},[755],{"type":22,"value":566},{"type":22,"value":757}," values",{"type":13,"tag":759,"props":760,"children":761},"style",{},[762],{"type":22,"value":763},"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":54,"searchDepth":85,"depth":85,"links":765},[],"markdown",1725732537693]