1bf215546Sopenharmony_ci<?xml version="1.0" ?> 2bf215546Sopenharmony_ci<genxml name="RT" gen=""> 3bf215546Sopenharmony_ci <struct name="BINDLESS_SHADER_RECORD" length="2"> 4bf215546Sopenharmony_ci <field name="Offset To Local Arguments" start="0" end="2" type="uint"/> 5bf215546Sopenharmony_ci <field name="Bindless Shader Dispatch Mode" start="4" end="4" type="uint"> 6bf215546Sopenharmony_ci <value name="RT_SIMD16" value="0"/> 7bf215546Sopenharmony_ci <value name="RT_SIMD8" value="1"/> 8bf215546Sopenharmony_ci </field> 9bf215546Sopenharmony_ci <field name="Kernel Start Pointer" start="6" end="31" type="offset"/> 10bf215546Sopenharmony_ci </struct> 11bf215546Sopenharmony_ci 12bf215546Sopenharmony_ci <struct name="RT_GENERAL_SBT_HANDLE" length="8"> 13bf215546Sopenharmony_ci <field name="General" start="0" end="63" type="BINDLESS_SHADER_RECORD"/> 14bf215546Sopenharmony_ci </struct> 15bf215546Sopenharmony_ci 16bf215546Sopenharmony_ci <struct name="RT_TRIANGLES_SBT_HANDLE" length="8"> 17bf215546Sopenharmony_ci <field name="Closest Hit" start="0" end="63" type="BINDLESS_SHADER_RECORD"/> 18bf215546Sopenharmony_ci <field name="Any Hit" start="64" end="127" type="BINDLESS_SHADER_RECORD"/> 19bf215546Sopenharmony_ci </struct> 20bf215546Sopenharmony_ci 21bf215546Sopenharmony_ci <struct name="RT_PROCEDURAL_SBT_HANDLE" length="8"> 22bf215546Sopenharmony_ci <field name="Closest Hit" start="0" end="63" type="BINDLESS_SHADER_RECORD"/> 23bf215546Sopenharmony_ci <field name="Intersection" start="64" end="127" type="BINDLESS_SHADER_RECORD"/> 24bf215546Sopenharmony_ci </struct> 25bf215546Sopenharmony_ci 26bf215546Sopenharmony_ci <struct name="RT_SHADER_TABLE" length="2"> 27bf215546Sopenharmony_ci <field name="Base Address" start="0" end="47" type="address"/> 28bf215546Sopenharmony_ci <field name="Stride" start="48" end="63" type="uint"/> 29bf215546Sopenharmony_ci </struct> 30bf215546Sopenharmony_ci 31bf215546Sopenharmony_ci <struct name="RT_DISPATCH_GLOBALS" length="20"> 32bf215546Sopenharmony_ci <!-- These are dictated by hardware --> 33bf215546Sopenharmony_ci <field name="Mem Base Address" start="0" end="63" type="address"/> 34bf215546Sopenharmony_ci <field name="Call Stack Handler" start="64" end="127" type="BINDLESS_SHADER_RECORD"/> 35bf215546Sopenharmony_ci <field name="Async RT Stack Size" start="128" end="159" type="uint"/> 36bf215546Sopenharmony_ci <field name="Num DSS RT Stacks" start="160" end="175" type="uint"/> 37bf215546Sopenharmony_ci <field name="Max BVH Levels" start="192" end="194" type="uint"/> 38bf215546Sopenharmony_ci <field name="Flags" start="224" end="224" type="uint"> 39bf215546Sopenharmony_ci <value name="RT_DEPTH_TEST_LESS_EQUAL" value="1"/> 40bf215546Sopenharmony_ci </field> 41bf215546Sopenharmony_ci 42bf215546Sopenharmony_ci <!-- These are simply a software interface --> 43bf215546Sopenharmony_ci <field name="Hit Group Table" start="256" end="319" type="RT_SHADER_TABLE"/> 44bf215546Sopenharmony_ci <field name="Miss Group Table" start="320" end="383" type="RT_SHADER_TABLE"/> 45bf215546Sopenharmony_ci <field name="SW Stack Size" start="384" end="415" type="uint"/> 46bf215546Sopenharmony_ci <field name="Launch Width" start="416" end="447" type="uint"/> 47bf215546Sopenharmony_ci <field name="Launch Height" start="448" end="479" type="uint"/> 48bf215546Sopenharmony_ci <field name="Launch Depth" start="480" end="511" type="uint"/> 49bf215546Sopenharmony_ci <field name="Callable Group Table" start="512" end="575" type="RT_SHADER_TABLE"/> 50bf215546Sopenharmony_ci <field name="Resume Shader Table" start="576" end="639" type="address"/> 51bf215546Sopenharmony_ci </struct> 52bf215546Sopenharmony_ci 53bf215546Sopenharmony_ci <struct name="RT_BVH_VEC3" length="3"> 54bf215546Sopenharmony_ci <field name="X" start="0" end="31" type="float"/> 55bf215546Sopenharmony_ci <field name="Y" start="32" end="63" type="float"/> 56bf215546Sopenharmony_ci <field name="Z" start="64" end="95" type="float"/> 57bf215546Sopenharmony_ci </struct> 58bf215546Sopenharmony_ci 59bf215546Sopenharmony_ci <struct name="RT_BVH" length="16"> 60bf215546Sopenharmony_ci <field name="Root Node Offset" start="0" end="63" type="offset"/> 61bf215546Sopenharmony_ci <field name="Bounds Min" start="64" end="159" type="RT_BVH_VEC3"/> 62bf215546Sopenharmony_ci <field name="Bounds Max" start="160" end="255" type="RT_BVH_VEC3"/> 63bf215546Sopenharmony_ci </struct> 64bf215546Sopenharmony_ci 65bf215546Sopenharmony_ci <struct name="RT_BVH_INTERNAL_NODE" length="16"> 66bf215546Sopenharmony_ci <field name="Origin" start="0" end="95" type="RT_BVH_VEC3"/> 67bf215546Sopenharmony_ci <field name="Child Offset" start="96" end="127" type="int"/> 68bf215546Sopenharmony_ci <field name="Node Type" start="128" end="135" type="uint" prefix="NODE_TYPE"> 69bf215546Sopenharmony_ci <value name="INTERNAL" value="0"/> 70bf215546Sopenharmony_ci <value name="INSTANCE" value="1"/> 71bf215546Sopenharmony_ci <value name="PROCEDURAL" value="3"/> 72bf215546Sopenharmony_ci <value name="QUAD" value="4"/> 73bf215546Sopenharmony_ci <value name="INVALID" value="7"/> 74bf215546Sopenharmony_ci </field> 75bf215546Sopenharmony_ci <field name="Child Bounds Exponent X" start="144" end="151" type="int"/> 76bf215546Sopenharmony_ci <field name="Child Bounds Exponent Y" start="152" end="159" type="int"/> 77bf215546Sopenharmony_ci <field name="Child Bounds Exponent Z" start="160" end="168" type="int"/> 78bf215546Sopenharmony_ci <field name="Node Ray Mask" start="168" end="175" type="uint"/> 79bf215546Sopenharmony_ci <group count="6" start="176" size="8"> 80bf215546Sopenharmony_ci <field name="Child Size" start="0" end="1" type="uint"/> 81bf215546Sopenharmony_ci <field name="Child Type" start="2" end="5" type="uint"/> 82bf215546Sopenharmony_ci <field name="Start Primitive" start="2" end="5" type="uint"/> 83bf215546Sopenharmony_ci </group> 84bf215546Sopenharmony_ci <group count="6" start="224" size="8"> 85bf215546Sopenharmony_ci <field name="Child Lower X Bound" start="0" end="7" type="uint"/> 86bf215546Sopenharmony_ci </group> 87bf215546Sopenharmony_ci <group count="6" start="272" size="8"> 88bf215546Sopenharmony_ci <field name="Child Upper X Bound" start="0" end="7" type="uint"/> 89bf215546Sopenharmony_ci </group> 90bf215546Sopenharmony_ci <group count="6" start="320" size="8"> 91bf215546Sopenharmony_ci <field name="Child Lower Y Bound" start="0" end="7" type="uint"/> 92bf215546Sopenharmony_ci </group> 93bf215546Sopenharmony_ci <group count="6" start="368" size="8"> 94bf215546Sopenharmony_ci <field name="Child Upper Y Bound" start="0" end="7" type="uint"/> 95bf215546Sopenharmony_ci </group> 96bf215546Sopenharmony_ci <group count="6" start="416" size="8"> 97bf215546Sopenharmony_ci <field name="Child Lower Z Bound" start="0" end="7" type="uint"/> 98bf215546Sopenharmony_ci </group> 99bf215546Sopenharmony_ci <group count="6" start="464" size="8"> 100bf215546Sopenharmony_ci <field name="Child Upper Z Bound" start="0" end="7" type="uint"/> 101bf215546Sopenharmony_ci </group> 102bf215546Sopenharmony_ci </struct> 103bf215546Sopenharmony_ci 104bf215546Sopenharmony_ci <struct name="RT_BVH_PRIMITIVE_LEAF_DESCRIPTOR" length="2"> 105bf215546Sopenharmony_ci <field name="Shader Index" start="0" end="23" type="uint"/> 106bf215546Sopenharmony_ci <field name="Geometry Ray Mask" start="24" end="31" type="uint"/> 107bf215546Sopenharmony_ci <field name="Geometry Index" start="32" end="60" type="uint"/> 108bf215546Sopenharmony_ci <field name="Leaf Type" start="61" end="61" type="uint"> 109bf215546Sopenharmony_ci <value name="TYPE_QUAD" value="0"/> 110bf215546Sopenharmony_ci <value name="TYPE_OPAQUE_CULLING_ENABLED" value="0"/> 111bf215546Sopenharmony_ci <value name="TYPE_OPAQUE_CULLING_DISABLED" value="1"/> 112bf215546Sopenharmony_ci </field> 113bf215546Sopenharmony_ci <field name="Geometry Flags" start="62" end="63" type="uint"> 114bf215546Sopenharmony_ci <value name="GEOMETRY_OPAQUE" value="1"/> 115bf215546Sopenharmony_ci </field> 116bf215546Sopenharmony_ci </struct> 117bf215546Sopenharmony_ci 118bf215546Sopenharmony_ci <struct name="RT_BVH_QUAD_LEAF" length="16"> 119bf215546Sopenharmony_ci <field name="Leaf Descriptor" start="0" end="63" type="RT_BVH_PRIMITIVE_LEAF_DESCRIPTOR"/> 120bf215546Sopenharmony_ci <field name="Primitive Index 0" start="64" end="95" type="uint"/> 121bf215546Sopenharmony_ci <field name="Primitive Index 1 Delta" start="96" end="112" type="uint"/> 122bf215546Sopenharmony_ci <field name="j0" start="112" end="113" type="uint"/> 123bf215546Sopenharmony_ci <field name="j1" start="114" end="115" type="uint"/> 124bf215546Sopenharmony_ci <field name="j2" start="116" end="117" type="uint"/> 125bf215546Sopenharmony_ci <field name="Last Quad" start="118" end="118" type="bool"/> 126bf215546Sopenharmony_ci <group count="4" start="128" size="96"> 127bf215546Sopenharmony_ci <field name="Quad Vertex" start="0" end="95" type="RT_BVH_VEC3"/> 128bf215546Sopenharmony_ci </group> 129bf215546Sopenharmony_ci </struct> 130bf215546Sopenharmony_ci 131bf215546Sopenharmony_ci <struct name="RT_BVH_INSTANCE_LEAF" length="32"> 132bf215546Sopenharmony_ci <field name="Shader Index" start="0" end="23" type="uint"/> 133bf215546Sopenharmony_ci <field name="Geometry Ray Mask" start="24" end="31" type="uint"/> 134bf215546Sopenharmony_ci <field name="Instance Contribution To Hit Group Index" start="32" end="55" type="uint"/> 135bf215546Sopenharmony_ci <field name="Leaf Type" start="61" end="61" type="uint"> 136bf215546Sopenharmony_ci <value name="TYPE_OPAQUE_CULLING_ENABLED" value="0"/> 137bf215546Sopenharmony_ci <value name="TYPE_OPAQUE_CULLING_DISABLED" value="1"/> 138bf215546Sopenharmony_ci </field> 139bf215546Sopenharmony_ci <field name="Geometry Flags" start="62" end="63" type="uint"> 140bf215546Sopenharmony_ci <value name="GEOMETRY_OPAQUE" value="1"/> 141bf215546Sopenharmony_ci </field> 142bf215546Sopenharmony_ci <field name="Start Node Address" start="64" end="111" type="address"/> 143bf215546Sopenharmony_ci <field name="Instance Flags" start="112" end="119" type="uint"> 144bf215546Sopenharmony_ci <value name="TRIANGLE_CULL_DISABLE" value="1"/> 145bf215546Sopenharmony_ci <value name="TRIANGLE_FRONT_COUNTERCLOCKWISE" value="2"/> 146bf215546Sopenharmony_ci <value name="FORCE_OPAQUE" value="4"/> 147bf215546Sopenharmony_ci <value name="FORCE_NON_OPAQUE" value="8"/> 148bf215546Sopenharmony_ci </field> 149bf215546Sopenharmony_ci <field name="World To Object m00" start="128" end="159" type="float"/> 150bf215546Sopenharmony_ci <field name="World To Object m01" start="160" end="191" type="float"/> 151bf215546Sopenharmony_ci <field name="World To Object m02" start="192" end="223" type="float"/> 152bf215546Sopenharmony_ci <field name="World To Object m10" start="224" end="255" type="float"/> 153bf215546Sopenharmony_ci <field name="World To Object m11" start="256" end="287" type="float"/> 154bf215546Sopenharmony_ci <field name="World To Object m12" start="288" end="319" type="float"/> 155bf215546Sopenharmony_ci <field name="World To Object m20" start="320" end="351" type="float"/> 156bf215546Sopenharmony_ci <field name="World To Object m21" start="352" end="383" type="float"/> 157bf215546Sopenharmony_ci <field name="World To Object m22" start="384" end="415" type="float"/> 158bf215546Sopenharmony_ci <field name="Object To World m30" start="416" end="447" type="float"/> 159bf215546Sopenharmony_ci <field name="Object To World m31" start="448" end="479" type="float"/> 160bf215546Sopenharmony_ci <field name="Object To World m32" start="480" end="511" type="float"/> 161bf215546Sopenharmony_ci <field name="BVH Address" start="512" end="559" type="address"/> 162bf215546Sopenharmony_ci <field name="Instance ID" start="576" end="607" type="uint"/> 163bf215546Sopenharmony_ci <field name="Instance Index" start="608" end="639" type="uint"/> 164bf215546Sopenharmony_ci <field name="Object To World m00" start="640" end="671" type="float"/> 165bf215546Sopenharmony_ci <field name="Object To World m01" start="672" end="703" type="float"/> 166bf215546Sopenharmony_ci <field name="Object To World m02" start="704" end="735" type="float"/> 167bf215546Sopenharmony_ci <field name="Object To World m10" start="736" end="767" type="float"/> 168bf215546Sopenharmony_ci <field name="Object To World m11" start="768" end="799" type="float"/> 169bf215546Sopenharmony_ci <field name="Object To World m12" start="800" end="831" type="float"/> 170bf215546Sopenharmony_ci <field name="Object To World m20" start="832" end="863" type="float"/> 171bf215546Sopenharmony_ci <field name="Object To World m21" start="864" end="895" type="float"/> 172bf215546Sopenharmony_ci <field name="Object To World m22" start="896" end="927" type="float"/> 173bf215546Sopenharmony_ci <field name="World To Object m30" start="928" end="959" type="float"/> 174bf215546Sopenharmony_ci <field name="World To Object m31" start="960" end="991" type="float"/> 175bf215546Sopenharmony_ci <field name="World To Object m32" start="992" end="1023" type="float"/> 176bf215546Sopenharmony_ci </struct> 177bf215546Sopenharmony_ci 178bf215546Sopenharmony_ci <struct name="RT_BVH_PROCEDURAL_LEAF" length="16"> 179bf215546Sopenharmony_ci <field name="Leaf Descriptor" start="0" end="63" type="RT_BVH_PRIMITIVE_LEAF_DESCRIPTOR"/> 180bf215546Sopenharmony_ci 181bf215546Sopenharmony_ci <!-- Software defined --> 182bf215546Sopenharmony_ci <field name="Num Primitives" start="64" end="67" type="uint"/> 183bf215546Sopenharmony_ci <field name="Last Primitive" start="83" end="95" type="uint"/> 184bf215546Sopenharmony_ci <group count="13" start="96" size="32"> 185bf215546Sopenharmony_ci <field name="Primitive Index" start="0" end="31" type="uint"/> 186bf215546Sopenharmony_ci </group> 187bf215546Sopenharmony_ci </struct> 188bf215546Sopenharmony_ci</genxml> 189