1// Copyright 2020-2022 The Khronos Group Inc. 2// 3// SPDX-License-Identifier: CC-BY-4.0 4 5[[micromap]] 6= Micromap 7 8 9[[micromap-def]] 10== Micromaps 11 12_Acceleration structures_ store and organize geometry for ray tracing, but 13in some cases it is beneficial to include some information within the 14geometry, particularly for triangles. 15A _micromap_ organizes this data around a map of values corresponding to 16subdivided microtriangles which can be added to a triangle geometry when 17building a _bottom level acceleration structure_. 18 19An _opacity micromap_ is a type of micromap which stores information to 20control intersection opacity as described in <<ray-opacity-micromap,Ray 21Opacity Micromap>>. 22 23A micromap is considered to be constructed if a <<micromap-building,micromap 24build command>> or <<micromap-copying,copy command>> has been executed with 25the given acceleration structure as the destination. 26 27 28[[micromap-building]] 29=== Building Micromaps 30 31[open,refpage='vkCmdBuildMicromapsEXT',desc='Build a micromap',type='protos'] 32-- 33:refpage: vkCmdBuildMicromapsEXT 34 35To build micromaps call: 36 37include::{generated}/api/protos/vkCmdBuildMicromapsEXT.adoc[] 38 39 * pname:commandBuffer is the command buffer into which the command will be 40 recorded. 41 * pname:infoCount is the number of micromaps to build. 42 It specifies the number of the pname:pInfos structures that must: be 43 provided. 44 * pname:pInfos is a pointer to an array of pname:infoCount 45 slink:VkMicromapBuildInfoEXT structures defining the data used to build 46 each micromap. 47 48The fname:vkCmdBuildMicromapsEXT command provides the ability to initiate 49multiple micromaps builds, however there is no ordering or synchronization 50implied between any of the individual micromap builds. 51 52[NOTE] 53.Note 54==== 55This means that there cannot: be any memory aliasing between any micromap 56memories or scratch memories being used by any of the builds. 57==== 58 59[[micromap-scratch]] 60Accesses to the micromap scratch buffers as identified by the 61slink:VkMicromapBuildInfoEXT::pname:scratchData buffer device addresses 62must: be <<synchronization-dependencies,synchronized>> with the 63ename:VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT 64<<synchronization-pipeline-stages, pipeline stage>> and an 65<<synchronization-access-types, access type>> of 66(ename:VK_ACCESS_2_MICROMAP_READ_BIT_EXT | 67ename:VK_ACCESS_2_MICROMAP_WRITE_BIT_EXT). 68Accesses to slink:VkMicromapBuildInfoEXT::pname:dstMicromap must: be 69<<synchronization-dependencies,synchronized>> with the 70ename:VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT 71<<synchronization-pipeline-stages, pipeline stage>> and an 72<<synchronization-access-types, access type>> of 73ename:VK_ACCESS_2_MICROMAP_WRITE_BIT_EXT. 74 75Accesses to other input buffers as identified by any used values of 76slink:VkMicromapBuildInfoEXT::pname:data or 77slink:VkMicromapBuildInfoEXT::pname:triangleArray must: be 78<<synchronization-dependencies,synchronized>> with the 79ename:VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT 80<<synchronization-pipeline-stages, pipeline stage>> and an 81<<synchronization-access-types, access type>> of 82ename:VK_ACCESS_SHADER_READ_BIT. 83 84 85.Valid Usage 86**** 87include::{chapters}/commonvalidity/build_micromap_common.adoc[] 88 * [[VUID-vkCmdBuildMicromapsEXT-pInfos-07508]] 89 For each element of pname:pInfos, the pname:buffer used to create its 90 pname:dstMicromap member must: be bound to device memory 91 * [[VUID-vkCmdBuildMicromapsEXT-pInfos-07509]] 92 If pname:pInfos[i].pname:mode is ename:VK_BUILD_MICROMAP_MODE_BUILD_EXT, 93 all addresses between pname:pInfos[i].pname:scratchData.deviceAddress 94 and pname:pInfos[i].pname:scratchData.deviceAddress {plus} N - 1 must: 95 be in the buffer device address range of the same buffer, where N is 96 given by the pname:buildScratchSize member of the 97 slink:VkMicromapBuildSizesInfoEXT structure returned from a call to 98 flink:vkGetMicromapBuildSizesEXT with an identical 99 slink:VkMicromapBuildInfoEXT structure and primitive count 100 * [[VUID-vkCmdBuildMicromapsEXT-data-07510]] 101 The buffers from which the buffer device addresses for all of the 102 pname:data and pname:triangleArray members of all pname:pInfos[i] are 103 queried must: have been created with the 104 ename:VK_BUFFER_USAGE_MICROMAP_BUILD_INPUT_READ_ONLY_BIT_EXT usage flag 105 * [[VUID-vkCmdBuildMicromapsEXT-pInfos-07511]] 106 For each element of pname:pInfos[i] the buffer from which the buffer 107 device address pname:pInfos[i].pname:scratchData.deviceAddress is 108 queried must: have been created with 109 ename:VK_BUFFER_USAGE_STORAGE_BUFFER_BIT usage flag 110 * [[VUID-vkCmdBuildMicromapsEXT-pInfos-07512]] 111 For each element of pname:pInfos, its pname:scratchData.deviceAddress, 112 pname:data.deviceAddress, and pname:triangleArray.deviceAddress members 113 must: be valid device addresses obtained from 114 flink:vkGetBufferDeviceAddress 115 * [[VUID-vkCmdBuildMicromapsEXT-pInfos-07513]] 116 For each element of pname:pInfos, if pname:scratchData.deviceAddress, 117 pname:data.deviceAddress, or pname:triangleArray.deviceAddress is the 118 address of a non-sparse buffer then it must: be bound completely and 119 contiguously to a single slink:VkDeviceMemory object 120 * [[VUID-vkCmdBuildMicromapsEXT-pInfos-07514]] 121 For each element of pname:pInfos, its pname:scratchData.deviceAddress 122 member must: be a multiple of 123 slink:VkPhysicalDeviceAccelerationStructurePropertiesKHR::pname:minAccelerationStructureScratchOffsetAlignment 124 * [[VUID-vkCmdBuildMicromapsEXT-pInfos-07515]] 125 For each element of pname:pInfos, its pname:triangleArray.deviceAddress 126 and pname:data.deviceAddress members must: be a multiple of `256` 127**** 128 129include::{generated}/validity/protos/vkCmdBuildMicromapsEXT.adoc[] 130-- 131 132[open,refpage='VkOpacityMicromapFormatEXT',desc='Format enum for opacity micromaps',type='enums'] 133-- 134:refpage: VkOpacityMicromapFormatEXT 135 136Formats which can: be set in slink:VkMicromapUsageEXT::pname:format and 137slink:VkMicromapTriangleEXT::pname:format for micromap builds, are: 138 139include::{generated}/api/enums/VkOpacityMicromapFormatEXT.adoc[] 140 141 * ename:VK_OPACITY_MICROMAP_FORMAT_2_STATE_EXT indicates that the given 142 micromap format has one bit per subtriangle encoding either fully opaque 143 or fully transparent. 144 * ename:VK_OPACITY_MICROMAP_FORMAT_4_STATE_EXT indicates that the given 145 micromap format has two bits per subtriangle encoding four modes which 146 can be interpreted as described in <<ray-opacity-micromap,ray 147 traversal>>. 148-- 149 150[NOTE] 151.Note 152==== 153For compactness, these values are stored as 16-bit in some structures. 154==== 155 156[open,refpage='VkMicromapBuildInfoEXT',desc='Structure specifying the data used to build a micromap',type='structs'] 157-- 158:refpage: VkMicromapBuildInfoEXT 159 160The sname:VkMicromapBuildInfoEXT structure is defined as: 161 162include::{generated}/api/structs/VkMicromapBuildInfoEXT.adoc[] 163 164 * pname:sType is the type of this structure. 165 * pname:pNext is `NULL` or a pointer to a structure extending this 166 structure. 167 * pname:type is a elink:VkMicromapTypeEXT value specifying the type of 168 micromap being built. 169 * pname:flags is a bitmask of elink:VkBuildMicromapFlagBitsEXT specifying 170 additional parameters of the micromap. 171 * pname:mode is a elink:VkBuildMicromapModeEXT value specifying the type 172 of operation to perform. 173 * pname:dstMicromap is a pointer to the target micromap for the build. 174 * pname:usageCountsCount specifies the number of usage counts structures 175 that will be used to determine the size of this micromap. 176 * pname:pUsageCounts is a pointer to an array of slink:VkMicromapUsageEXT 177 structures. 178 * pname:ppUsageCounts is a pointer to an array of pointers to 179 slink:VkMicromapUsageEXT structures. 180 * pname:data is the device or host address to memory which contains the 181 data for the micromap. 182 * pname:scratchData is the device or host address to memory that will be 183 used as scratch memory for the build. 184 * pname:triangleArray is the device or host address to memory containing 185 the slink:VkMicromapTriangleEXT data 186 * pname:triangleArrayStride is the stride in bytes between each element of 187 pname:triangleArray 188 189Only one of pname:pUsageCounts or pname:ppUsageCounts can: be a valid 190pointer, the other must: be `NULL`. 191The elements of the non-`NULL` array describe the total counts used to build 192each micromap. 193Each element contains a pname:count which is the number of micromap 194triangles of that pname:format and pname:subdivisionLevel contained in the 195micromap. 196Multiple elements with the same pname:format and pname:subdivisionLevel are 197allowed and the total count for that pname:format and pname:subdivisionLevel 198is the sum of the pname:count for each element. 199 200 201 202Each micromap triangle refers to one element in pname:triangleArray which 203contains the pname:format and pname:subdivisionLevel for that particular 204triangle as well as a pname:dataOffset in bytes which is the location 205relative to pname:data where that triangle's micromap data begins. 206The data at pname:triangleArray is laid out as a 4 byte unsigned integer for 207the pname:dataOffset followed by a 2 byte unsigned integer for the 208subdivision level then a 2 byte unsigned integer for the format. 209In practice, compilers compile slink:VkMicromapTriangleEXT to match this 210pattern. 211 212The data at pname:data is packed as either one bit per element for 213ename:VK_OPACITY_MICROMAP_FORMAT_2_STATE_EXT or two bits per element for 214ename:VK_OPACITY_MICROMAP_FORMAT_4_STATE_EXT and is packed from LSB to MSB 215in each byte. 216The data at each index in those bytes is interpreted as discussed in 217<<ray-opacity-micromap, Ray Opacity Micromap>>. 218 219.Valid Usage 220**** 221 * [[VUID-VkMicromapBuildInfoEXT-pUsageCounts-07516]] 222 Only one of pname:pUsageCounts or pname:ppUsageCounts can: be a valid 223 pointer, the other must: be `NULL` 224 * [[VUID-VkMicromapBuildInfoEXT-type-07517]] 225 If pname:type is ename:VK_MICROMAP_TYPE_OPACITY_MICROMAP_EXT the 226 pname:format member of slink:VkMicromapUsageEXT must: be a valid value 227 from ename:VkOpacityMicromapFormatEXT 228 * [[VUID-VkMicromapBuildInfoEXT-type-07518]] 229 If pname:type is ename:VK_MICROMAP_TYPE_OPACITY_MICROMAP_EXT the 230 pname:format member of slink:VkMicromapTriangleEXT must: be a valid 231 value from ename:VkOpacityMicromapFormatEXT 232**** 233include::{generated}/validity/structs/VkMicromapBuildInfoEXT.adoc[] 234-- 235 236[open,refpage='VkBuildMicromapModeEXT',desc='Enum specifying the type of build operation to perform',type='enums'] 237-- 238:refpage: VkBuildMicromapModeEXT 239 240The ename:VkBuildMicromapModeEXT enumeration is defined as: 241 242include::{generated}/api/enums/VkBuildMicromapModeEXT.adoc[] 243 244 * ename:VK_BUILD_MICROMAP_MODE_BUILD_EXT specifies that the destination 245 micromap will be built using the specified data. 246-- 247 248[open,refpage='VkMicromapUsageEXT',desc='Structure specifying the usage information used to build a micromap',type='structs'] 249-- 250:refpage: VkMicromapUsageEXT 251 252The sname:VkMicromapUsageEXT structure is defined as: 253 254include::{generated}/api/structs/VkMicromapUsageEXT.adoc[] 255 256 * pname:count is the number of triangles in the usage format defined by 257 the pname:subdivisionLevel and pname:format below in the micromap 258 * pname:subdivisionLevel is the subdivision level of this usage format 259 * pname:format is the format of this usage format 260 261.Valid Usage 262**** 263 * [[VUID-VkMicromapUsageEXT-format-07519]] 264 If the elink:VkMicromapTypeEXT of the micromap is 265 ename:VK_MICROMAP_TYPE_OPACITY_MICROMAP_EXT then pname:format must: be 266 ename:VK_OPACITY_MICROMAP_FORMAT_2_STATE_EXT or 267 ename:VK_OPACITY_MICROMAP_FORMAT_4_STATE_EXT 268 * [[VUID-VkMicromapUsageEXT-format-07520]] 269 If the elink:VkMicromapTypeEXT of the micromap is 270 ename:VK_MICROMAP_TYPE_OPACITY_MICROMAP_EXT and pname:format is 271 ename:VK_OPACITY_MICROMAP_FORMAT_2_STATE_EXT then pname:subdivisionLevel 272 must: be less than or equal to pname:maxOpacity2StateSubdivisionLevel of 273 slink:VkPhysicalDeviceOpacityMicromapPropertiesEXT 274 * [[VUID-VkMicromapUsageEXT-format-07521]] 275 If the elink:VkMicromapTypeEXT of the micromap is 276 ename:VK_MICROMAP_TYPE_OPACITY_MICROMAP_EXT and pname:format is 277 ename:VK_OPACITY_MICROMAP_FORMAT_4_STATE_EXT then pname:subdivisionLevel 278 must: be less than or equal to pname:maxOpacity4StateSubdivisionLevel of 279 slink:VkPhysicalDeviceOpacityMicromapPropertiesEXT 280**** 281 282The pname:format is interpreted based on the pname:type of the micromap 283using it. 284 285include::{generated}/validity/structs/VkMicromapUsageEXT.adoc[] 286-- 287 288[open,refpage='VkMicromapTriangleEXT',desc='Structure specifying the micromap format and data for a triangle',type='structs'] 289-- 290:refpage: VkMicromapTriangleEXT 291 292The sname:VkMicromapTriangleEXT structure is defined as: 293 294include::{generated}/api/structs/VkMicromapTriangleEXT.adoc[] 295 296 * pname:dataOffset is the offset in bytes of the start of the data for 297 this triangle. 298 This is a byte aligned value. 299 * pname:subdivisionLevel is the subdivision level of this triangle 300 * pname:format is the format of this triangle 301 302.Valid Usage 303**** 304 * [[VUID-VkMicromapTriangleEXT-format-07522]] 305 If the elink:VkMicromapTypeEXT of the micromap is 306 ename:VK_MICROMAP_TYPE_OPACITY_MICROMAP_EXT then pname:format must: be 307 ename:VK_OPACITY_MICROMAP_FORMAT_2_STATE_EXT or 308 ename:VK_OPACITY_MICROMAP_FORMAT_4_STATE_EXT 309 * [[VUID-VkMicromapTriangleEXT-format-07523]] 310 If the elink:VkMicromapTypeEXT of the micromap is 311 ename:VK_MICROMAP_TYPE_OPACITY_MICROMAP_EXT and pname:format is 312 ename:VK_OPACITY_MICROMAP_FORMAT_2_STATE_EXT then pname:subdivisionLevel 313 must: be less than or equal to pname:maxOpacity2StateSubdivisionLevel of 314 slink:VkPhysicalDeviceOpacityMicromapPropertiesEXT 315 * [[VUID-VkMicromapTriangleEXT-format-07524]] 316 If the elink:VkMicromapTypeEXT of the micromap is 317 ename:VK_MICROMAP_TYPE_OPACITY_MICROMAP_EXT and pname:format is 318 ename:VK_OPACITY_MICROMAP_FORMAT_4_STATE_EXT then pname:subdivisionLevel 319 must: be less than or equal to pname:maxOpacity4StateSubdivisionLevel of 320 slink:VkPhysicalDeviceOpacityMicromapPropertiesEXT 321**** 322 323The pname:format is interpreted based on the pname:type of the micromap 324using it. 325 326include::{generated}/validity/structs/VkMicromapTriangleEXT.adoc[] 327-- 328 329 330[[micromap-copying]] 331=== Copying Micromaps 332 333An additional command exists for copying micromaps without updating their 334contents. 335Before copying, an application must: query the size of the resulting 336micromap. 337 338[open,refpage='vkCmdWriteMicromapsPropertiesEXT',desc='Write micromap result parameters to query results.',type='protos'] 339-- 340:refpage: vkCmdWriteMicromapsPropertiesEXT 341 342To query micromap size parameters call: 343 344include::{generated}/api/protos/vkCmdWriteMicromapsPropertiesEXT.adoc[] 345 346 * pname:commandBuffer is the command buffer into which the command will be 347 recorded. 348 * pname:micromapCount is the count of micromaps for which to query the 349 property. 350 * pname:pMicromaps is a pointer to an array of existing previously built 351 micromaps. 352 * pname:queryType is a elink:VkQueryType value specifying the type of 353 queries managed by the pool. 354 * pname:queryPool is the query pool that will manage the results of the 355 query. 356 * pname:firstQuery is the first query index within the query pool that 357 will contain the pname:micromapCount number of results. 358 359Accesses to any of the micromaps listed in pname:pMicromaps must: be 360<<synchronization-dependencies, synchronized>> with the 361ename:VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT 362<<synchronization-pipeline-stages, pipeline stage>> and an 363<<synchronization-access-types, access type>> of 364ename:VK_ACCESS_2_MICROMAP_READ_BIT_EXT. 365 366 * If pname:queryType is 367 ename:VK_QUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXT, then the value 368 written out is the number of bytes required by a serialized micromap. 369 * If pname:queryType is ename:VK_QUERY_TYPE_MICROMAP_COMPACTED_SIZE_EXT, 370 then the value written out is the number of bytes required by a 371 compacted micromap. 372 373.Valid Usage 374**** 375 * [[VUID-vkCmdWriteMicromapsPropertiesEXT-queryPool-07525]] 376 pname:queryPool must: have been created with a pname:queryType matching 377 pname:queryType 378 * [[VUID-vkCmdWriteMicromapsPropertiesEXT-queryPool-07526]] 379 The queries identified by pname:queryPool and pname:firstQuery must: be 380 _unavailable_ 381 * [[VUID-vkCmdWriteMicromapsPropertiesEXT-buffer-07527]] 382 The pname:buffer used to create each micromap in pname:pMicrmaps must: 383 be bound to device memory 384 * [[VUID-vkCmdWriteMicromapsPropertiesEXT-query-07528]] 385 The sum of pname:query plus pname:micromapCount must: be less than or 386 equal to the number of queries in pname:queryPool 387include::{chapters}/commonvalidity/write_micromap_properties_common.adoc[] 388**** 389 390include::{generated}/validity/protos/vkCmdWriteMicromapsPropertiesEXT.adoc[] 391-- 392 393[open,refpage='vkCmdCopyMicromapEXT',desc='Copy a micromap',type='protos'] 394-- 395:refpage: vkCmdCopyMicromapEXT 396 397To copy a micromap call: 398 399include::{generated}/api/protos/vkCmdCopyMicromapEXT.adoc[] 400 401 * pname:commandBuffer is the command buffer into which the command will be 402 recorded. 403 * pname:pInfo is a pointer to a slink:VkCopyMicromapInfoEXT structure 404 defining the copy operation. 405 406This command copies the pname:pInfo->src micromap to the pname:pInfo->dst 407micromap in the manner specified by pname:pInfo->mode. 408 409Accesses to pname:pInfo->src and pname:pInfo->dst must: be 410<<synchronization-dependencies, synchronized>> with the 411ename:VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT 412<<synchronization-pipeline-stages, pipeline stage>> and an 413<<synchronization-access-types, access type>> of 414ename:VK_ACCESS_2_MICROMAP_READ_BIT_EXT or 415ename:VK_ACCESS_2_MICROMAP_WRITE_BIT_EXT as appropriate. 416 417.Valid Usage 418**** 419 * [[VUID-vkCmdCopyMicromapEXT-buffer-07529]] 420 The pname:buffer used to create pname:pInfo->src must: be bound to 421 device memory 422 * [[VUID-vkCmdCopyMicromapEXT-buffer-07530]] 423 The pname:buffer used to create pname:pInfo->dst must: be bound to 424 device memory 425**** 426 427include::{generated}/validity/protos/vkCmdCopyMicromapEXT.adoc[] 428-- 429 430[open,refpage='VkCopyMicromapInfoEXT',desc='Parameters for copying a micromap',type='structs'] 431-- 432:refpage: VkCopyMicromapInfoEXT 433 434The sname:VkCopyMicromapInfoEXT structure is defined as: 435 436include::{generated}/api/structs/VkCopyMicromapInfoEXT.adoc[] 437 438 * pname:sType is the type of this structure. 439 * pname:pNext is `NULL` or a pointer to a structure extending this 440 structure. 441 * pname:src is the source micromap for the copy. 442 * pname:dst is the target micromap for the copy. 443 * pname:mode is a elink:VkCopyMicromapModeEXT value specifying additional 444 operations to perform during the copy. 445 446.Valid Usage 447**** 448 * [[VUID-VkCopyMicromapInfoEXT-mode-07531]] 449 pname:mode must: be ename:VK_COPY_MICROMAP_MODE_COMPACT_EXT or 450 ename:VK_COPY_MICROMAP_MODE_CLONE_EXT 451 * [[VUID-VkCopyMicromapInfoEXT-src-07532]] 452 The source acceleration structure pname:src must: have been constructed 453 prior to the execution of this command 454 * [[VUID-VkCopyMicromapInfoEXT-mode-07533]] 455 If pname:mode is ename:VK_COPY_MICROMAP_MODE_COMPACT_EXT, pname:src 456 must: have been constructed with 457 ename:VK_BUILD_MICROMAP_ALLOW_COMPACTION_BIT_EXT in the build 458 * [[VUID-VkCopyMicromapInfoEXT-buffer-07534]] 459 The pname:buffer used to create pname:src must: be bound to device 460 memory 461 * [[VUID-VkCopyMicromapInfoEXT-buffer-07535]] 462 The pname:buffer used to create pname:dst must: be bound to device 463 memory 464**** 465 466include::{generated}/validity/structs/VkCopyMicromapInfoEXT.adoc[] 467-- 468 469[open,refpage='VkCopyMicromapModeEXT',desc='Micromap copy mode',type='enums'] 470-- 471:refpage: VkCopyMicromapModeEXT 472 473Possible values of pname:mode specifying additional operations to perform 474during the copy, are: 475 476include::{generated}/api/enums/VkCopyMicromapModeEXT.adoc[] 477 478 * ename:VK_COPY_MICROMAP_MODE_CLONE_EXT creates a direct copy of the 479 micromap specified in pname:src into the one specified by pname:dst. 480 The pname:dst micromap must: have been created with the same parameters 481 as pname:src. 482 * ename:VK_COPY_MICROMAP_MODE_SERIALIZE_EXT serializes the micromap to a 483 semi-opaque format which can be reloaded on a compatible implementation. 484 * ename:VK_COPY_MICROMAP_MODE_DESERIALIZE_EXT deserializes the semi-opaque 485 serialization format in the buffer to the micromap. 486 * ename:VK_COPY_MICROMAP_MODE_COMPACT_EXT creates a more compact version 487 of a micromap pname:src into pname:dst. 488 The micromap pname:dst must: have been created with a size at least as 489 large as that returned by flink:vkCmdWriteMicromapsPropertiesEXT after 490 the build of the micromap specified by pname:src. 491-- 492 493[open,refpage='vkCmdCopyMicromapToMemoryEXT',desc='Copy a micromap to device memory',type='protos'] 494-- 495:refpage: vkCmdCopyMicromapToMemoryEXT 496 497To copy a micromap to device memory call: 498 499include::{generated}/api/protos/vkCmdCopyMicromapToMemoryEXT.adoc[] 500 501 * pname:commandBuffer is the command buffer into which the command will be 502 recorded. 503 * pname:pInfo is an a pointer to a slink:VkCopyMicromapToMemoryInfoEXT 504 structure defining the copy operation. 505 506Accesses to pname:pInfo->src must: be <<synchronization-dependencies, 507synchronized>> with the ename:VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT 508<<synchronization-pipeline-stages, pipeline stage>> and an 509<<synchronization-access-types, access type>> of 510ename:VK_ACCESS_2_MICROMAP_READ_BIT_EXT. 511Accesses to the buffer indicated by pname:pInfo->dst.deviceAddress must: be 512synchronized with the ename:VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT 513pipeline stage and an access type of ename:VK_ACCESS_TRANSFER_WRITE_BIT. 514 515This command produces the same results as flink:vkCopyMicromapToMemoryEXT, 516but writes its result to a device address, and is executed on the device 517rather than the host. 518The output may: not necessarily be bit-for-bit identical, but it can be 519equally used by either flink:vkCmdCopyMemoryToMicromapEXT or 520flink:vkCopyMemoryToMicromapEXT. 521 522[[serialized-micromap-header]] 523The defined header structure for the serialized data consists of: 524 525 * ename:VK_UUID_SIZE bytes of data matching 526 sname:VkPhysicalDeviceIDProperties::pname:driverUUID 527 * ename:VK_UUID_SIZE bytes of data identifying the compatibility for 528 comparison using flink:vkGetDeviceMicromapCompatibilityEXT 529The serialized data is written to the buffer (or read from the buffer) 530according to the host endianness. 531 532.Valid Usage 533**** 534 * [[VUID-vkCmdCopyMicromapToMemoryEXT-pInfo-07536]] 535 pname:pInfo->dst.deviceAddress must: be a valid device address for a 536 buffer bound to device memory 537 * [[VUID-vkCmdCopyMicromapToMemoryEXT-pInfo-07537]] 538 pname:pInfo->dst.deviceAddress must: be aligned to `256` bytes 539 * [[VUID-vkCmdCopyMicromapToMemoryEXT-pInfo-07538]] 540 If the buffer pointed to by pname:pInfo->dst.deviceAddress is non-sparse 541 then it must: be bound completely and contiguously to a single 542 slink:VkDeviceMemory object 543 * [[VUID-vkCmdCopyMicromapToMemoryEXT-buffer-07539]] 544 The pname:buffer used to create pname:pInfo->src must: be bound to 545 device memory 546**** 547 548include::{generated}/validity/protos/vkCmdCopyMicromapToMemoryEXT.adoc[] 549-- 550 551[open,refpage='VkCopyMicromapToMemoryInfoEXT',desc='Parameters for serializing a micromap',type='structs'] 552-- 553:refpage: VkCopyMicromapToMemoryInfoEXT 554 555include::{generated}/api/structs/VkCopyMicromapToMemoryInfoEXT.adoc[] 556 557 * pname:sType is the type of this structure. 558 * pname:pNext is `NULL` or a pointer to a structure extending this 559 structure. 560 * pname:src is the source micromap for the copy 561 * pname:dst is the device or host address to memory which is the target 562 for the copy 563 * pname:mode is a elink:VkCopyMicromapModeEXT value specifying additional 564 operations to perform during the copy. 565 566.Valid Usage 567**** 568 * [[VUID-VkCopyMicromapToMemoryInfoEXT-src-07540]] 569 The source micromap pname:src must: have been constructed prior to the 570 execution of this command 571 * [[VUID-VkCopyMicromapToMemoryInfoEXT-dst-07541]] 572 The memory pointed to by pname:dst must: be at least as large as the 573 serialization size of pname:src, as reported by 574 flink:vkWriteMicromapsPropertiesEXT or 575 flink:vkCmdWriteMicromapsPropertiesEXT with a query type of 576 ename:VK_QUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXT 577 * [[VUID-VkCopyMicromapToMemoryInfoEXT-mode-07542]] 578 pname:mode must: be ename:VK_COPY_MICROMAP_MODE_SERIALIZE_EXT 579**** 580 581include::{generated}/validity/structs/VkCopyMicromapToMemoryInfoEXT.adoc[] 582-- 583 584[open,refpage='vkCmdCopyMemoryToMicromapEXT',desc='Copy device memory to a micromap',type='protos'] 585-- 586:refpage: vkCmdCopyMemoryToMicromapEXT 587 588To copy device memory to a micromap call: 589 590include::{generated}/api/protos/vkCmdCopyMemoryToMicromapEXT.adoc[] 591 592 * pname:commandBuffer is the command buffer into which the command will be 593 recorded. 594 * pname:pInfo is a pointer to a slink:VkCopyMicromapToMemoryInfoEXT 595 structure defining the copy operation. 596 597Accesses to pname:pInfo->dst must: be <<synchronization-dependencies, 598synchronized>> with the ename:VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT 599<<synchronization-pipeline-stages, pipeline stage>> and an 600<<synchronization-access-types, access type>> of 601ename:VK_ACCESS_2_MICROMAP_READ_BIT_EXT. 602Accesses to the buffer indicated by pname:pInfo->src.deviceAddress must: be 603synchronized with the ename:VK_PIPELINE_STAGE_2_MICROMAP_BUILD_BIT_EXT 604pipeline stage and an access type of ename:VK_ACCESS_TRANSFER_READ_BIT. 605 606This command can accept micromaps produced by either 607flink:vkCmdCopyMicromapToMemoryEXT or flink:vkCopyMicromapToMemoryEXT. 608 609.Valid Usage 610**** 611 * [[VUID-vkCmdCopyMemoryToMicromapEXT-pInfo-07543]] 612 pname:pInfo->src.deviceAddress must: be a valid device address for a 613 buffer bound to device memory 614 * [[VUID-vkCmdCopyMemoryToMicromapEXT-pInfo-07544]] 615 pname:pInfo->src.deviceAddress must: be aligned to `256` bytes 616 * [[VUID-vkCmdCopyMemoryToMicromapEXT-pInfo-07545]] 617 If the buffer pointed to by pname:pInfo->src.deviceAddress is non-sparse 618 then it must: be bound completely and contiguously to a single 619 slink:VkDeviceMemory object 620 * [[VUID-vkCmdCopyMemoryToMicromapEXT-buffer-07546]] 621 The pname:buffer used to create pname:pInfo->dst must: be bound to 622 device memory 623**** 624 625include::{generated}/validity/protos/vkCmdCopyMemoryToMicromapEXT.adoc[] 626-- 627 628[open,refpage='VkCopyMemoryToMicromapInfoEXT',desc='Parameters for deserializing a micromap',type='structs'] 629-- 630:refpage: VkCopyMemoryToMicromapInfoEXT 631 632The sname:VkCopyMemoryToMicromapInfoEXT structure is defined as: 633 634include::{generated}/api/structs/VkCopyMemoryToMicromapInfoEXT.adoc[] 635 636 * pname:sType is the type of this structure. 637 * pname:pNext is `NULL` or a pointer to a structure extending this 638 structure. 639 * pname:src is the device or host address to memory containing the source 640 data for the copy. 641 * pname:dst is the target micromap for the copy. 642 * pname:mode is a elink:VkCopyMicromapModeEXT value specifying additional 643 operations to perform during the copy. 644 645.Valid Usage 646**** 647 * [[VUID-VkCopyMemoryToMicromapInfoEXT-src-07547]] 648 The source memory pointed to by pname:src must: contain data previously 649 serialized using flink:vkCmdCopyMicromapToMemoryEXT 650 * [[VUID-VkCopyMemoryToMicromapInfoEXT-mode-07548]] 651 pname:mode must: be ename:VK_COPY_MICROMAP_MODE_DESERIALIZE_EXT 652 * [[VUID-VkCopyMemoryToMicromapInfoEXT-src-07549]] 653 The data in pname:src must: have a format compatible with the 654 destination physical device as returned by 655 flink:vkGetDeviceMicromapCompatibilityEXT 656 * [[VUID-VkCopyMemoryToMicromapInfoEXT-dst-07550]] 657 pname:dst must: have been created with a pname:size greater than or 658 equal to that used to serialize the data in pname:src 659**** 660 661include::{generated}/validity/structs/VkCopyMemoryToMicromapInfoEXT.adoc[] 662-- 663 664[open,refpage='vkGetDeviceMicromapCompatibilityEXT',desc='Check if a serialized micromap is compatible with the current device',type='protos'] 665-- 666:refpage: vkGetDeviceMicromapCompatibilityEXT 667 668To check if a serialized micromap is compatible with the current device 669call: 670 671include::{generated}/api/protos/vkGetDeviceMicromapCompatibilityEXT.adoc[] 672 673 * pname:device is the device to check the version against. 674 * pname:pVersionInfo is a pointer to a slink:VkMicromapVersionInfoEXT 675 structure specifying version information to check against the device. 676 * pname:pCompatibility is a pointer to a 677 elink:VkAccelerationStructureCompatibilityKHR value in which 678 compatibility information is returned. 679 680.Valid Usage 681**** 682 * [[VUID-vkGetDeviceMicromapCompatibilityEXT-micromap-07551]] 683 The <<features-micromap, pname:micromap>> feature must: be enabled 684**** 685 686include::{generated}/validity/protos/vkGetDeviceMicromapCompatibilityEXT.adoc[] 687-- 688 689[open,refpage='VkMicromapVersionInfoEXT',desc='Micromap version information',type='structs'] 690-- 691:refpage: VkMicromapVersionInfoEXT 692 693The sname:VkMicromapVersionInfoEXT structure is defined as: 694 695include::{generated}/api/structs/VkMicromapVersionInfoEXT.adoc[] 696 697 * pname:sType is the type of this structure. 698 * pname:pNext is `NULL` or a pointer to a structure extending this 699 structure. 700 * pname:pVersionData is a pointer to the version header of a micromap as 701 defined in flink:vkCmdCopyMicromapToMemoryEXT 702 703[NOTE] 704.Note 705==== 706pname:pVersionData is a _pointer_ to an array of 2{times}ename:VK_UUID_SIZE 707code:uint8_t values instead of two ename:VK_UUID_SIZE arrays as the expected 708use case for this member is to be pointed at the header of a previously 709serialized micromap (via flink:vkCmdCopyMicromapToMemoryEXT or 710flink:vkCopyMicromapToMemoryEXT) that is loaded in memory. 711Using arrays would necessitate extra memory copies of the UUIDs. 712==== 713 714include::{generated}/validity/structs/VkMicromapVersionInfoEXT.adoc[] 715-- 716 717 718[[host-micromap]] 719== Host Micromap Operations 720 721Implementations are also required to provide host implementations of the 722micromap operations if the <<features-micromapHostCommands, 723pname:micromapHostCommands>> feature is enabled: 724 725 * flink:vkBuildMicromapsEXT corresponding to flink:vkCmdBuildMicromapsEXT 726 * flink:vkCopyMicromapEXT corresponding to flink:vkCmdCopyMicromapEXT 727 * flink:vkCopyMicromapToMemoryEXT corresponding to 728 flink:vkCmdCopyMicromapToMemoryEXT 729 * flink:vkCopyMemoryToMicromapEXT corresponding to 730 flink:vkCmdCopyMemoryToMicromapEXT 731 * flink:vkWriteMicromapsPropertiesEXT corresponding to 732 flink:vkCmdWriteMicromapsPropertiesEXT 733 734These commands are functionally equivalent to their device counterparts, 735except that they are executed on the host timeline, rather than being 736enqueued into command buffers. 737 738All micromaps used by the host commands must: be bound to host-visible 739memory, and all input data for micromap builds must: be referenced using 740host addresses instead of device addresses. 741Applications are not required to map micromap memory when using the host 742commands. 743 744 745[NOTE] 746.Note 747==== 748The flink:vkBuildMicromapsEXT and flink:vkCmdBuildMicromapsEXT may: use 749different algorithms, and thus are not required to produce identical 750structures. 751 752Apart from these details, the host and device operations are 753interchangeable. 754==== 755 756[NOTE] 757.Note 758==== 759For efficient execution, micromaps manipulated using these commands should 760always be bound to host cached memory, as the implementation may need to 761repeatedly read and write this memory during the execution of the command. 762==== 763 764[open,refpage='vkBuildMicromapsEXT',desc='Build a micromap on the host',type='protos'] 765-- 766:refpage: vkBuildMicromapsEXT 767 768To build micromaps on the host, call: 769 770include::{generated}/api/protos/vkBuildMicromapsEXT.adoc[] 771 772 * pname:device is the sname:VkDevice for which the micromaps are being 773 built. 774 * pname:deferredOperation is an optional slink:VkDeferredOperationKHR to 775 <<deferred-host-operations-requesting, request deferral>> for this 776 command. 777 * pname:infoCount is the number of micromaps to build. 778 It specifies the number of the pname:pInfos that must: be provided. 779 * pname:pInfos is a pointer to an array of pname:infoCount 780 slink:VkMicromapBuildInfoEXT structures defining the geometry used to 781 build each micromap. 782 783This command fulfills the same task as flink:vkCmdBuildMicromapsEXT but is 784executed by the host. 785 786The fname:vkBuildMicromapsEXT command provides the ability to initiate 787multiple micromaps builds, however there is no ordering or synchronization 788implied between any of the individual micromap builds. 789 790[NOTE] 791.Note 792==== 793This means that there cannot: be any memory aliasing between any micromap 794memories or scratch memories being used by any of the builds. 795==== 796 797.Valid Usage 798**** 799include::{chapters}/commonvalidity/build_micromap_common.adoc[] 800 * [[VUID-vkBuildMicromapsEXT-pInfos-07552]] 801 For each element of pname:pInfos, the pname:buffer used to create its 802 pname:dstMicromap member must: be bound to host-visible device memory 803 * [[VUID-vkBuildMicromapsEXT-pInfos-07553]] 804 For each element of pname:pInfos, all referenced addresses of 805 pname:pInfos[i].pname:data.hostAddress must: be valid host memory 806 * [[VUID-vkBuildMicromapsEXT-pInfos-07554]] 807 For each element of pname:pInfos, all referenced addresses of 808 pname:pInfos[i].pname:triangleArray.hostAddress must: be valid host 809 memory 810 * [[VUID-vkBuildMicromapsEXT-micromapHostCommands-07555]] 811 The <<features-micromapHostCommands, 812 sname:VkPhysicalDeviceOpacityMicromapFeaturesEXT::pname:micromapHostCommands>> 813 feature must: be enabled 814 * [[VUID-vkBuildMicromapsEXT-pInfos-07556]] 815 If pname:pInfos[i].pname:mode is ename:VK_BUILD_MICROMAP_MODE_BUILD_EXT, 816 all addresses between pname:pInfos[i].pname:scratchData.hostAddress and 817 pname:pInfos[i].pname:scratchData.hostAddress + N - 1 must: be valid 818 host memory, where N is given by the pname:buildScratchSize member of 819 the slink:VkMicromapBuildSizesInfoEXT structure returned from a call to 820 flink:vkGetMicromapBuildSizesEXT with an identical 821 slink:VkMicromapBuildInfoEXT structure and primitive count 822ifdef::VK_KHR_device_group,VK_VERSION_1_1[] 823 * [[VUID-vkBuildMicromapsEXT-pInfos-07557]] 824 For each element of pname:pInfos, the pname:buffer used to create its 825 pname:dstMicromap member must: be bound to memory that was not allocated 826 with multiple instances 827endif::VK_KHR_device_group,VK_VERSION_1_1[] 828**** 829 830include::{generated}/validity/protos/vkBuildMicromapsEXT.adoc[] 831-- 832 833[open,refpage='vkCopyMicromapEXT',desc='Copy a micromap on the host',type='protos'] 834-- 835:refpage: vkCopyMicromapEXT 836 837To copy or compact a micromap on the host, call: 838 839include::{generated}/api/protos/vkCopyMicromapEXT.adoc[] 840 841 * pname:device is the device which owns the micromaps. 842 * pname:deferredOperation is an optional slink:VkDeferredOperationKHR to 843 <<deferred-host-operations-requesting, request deferral>> for this 844 command. 845 * pname:pInfo is a pointer to a slink:VkCopyMicromapInfoEXT structure 846 defining the copy operation. 847 848This command fulfills the same task as flink:vkCmdCopyMicromapEXT but is 849executed by the host. 850 851.Valid Usage 852**** 853include::{chapters}/commonvalidity/deferred_operations_common.adoc[] 854 * [[VUID-vkCopyMicromapEXT-buffer-07558]] 855 The pname:buffer used to create pname:pInfo->src must: be bound to 856 host-visible device memory 857 * [[VUID-vkCopyMicromapEXT-buffer-07559]] 858 The pname:buffer used to create pname:pInfo->dst must: be bound to 859 host-visible device memory 860 * [[VUID-vkCopyMicromapEXT-micromapHostCommands-07560]] 861 The <<features-micromapHostCommands, 862 sname:VkPhysicalDeviceOpacityMicromapFeaturesEXT::pname:micromapHostCommands>> 863 feature must: be enabled 864ifdef::VK_KHR_device_group,VK_VERSION_1_1[] 865 * [[VUID-vkCopyMicromapEXT-buffer-07561]] 866 The pname:buffer used to create pname:pInfo->src must: be bound to 867 memory that was not allocated with multiple instances 868 * [[VUID-vkCopyMicromapEXT-buffer-07562]] 869 The pname:buffer used to create pname:pInfo->dst must: be bound to 870 memory that was not allocated with multiple instances 871endif::VK_KHR_device_group,VK_VERSION_1_1[] 872**** 873 874include::{generated}/validity/protos/vkCopyMicromapEXT.adoc[] 875-- 876 877[open,refpage='vkCopyMemoryToMicromapEXT',desc='Deserialize a micromap on the host',type='protos'] 878-- 879:refpage: vkCopyMemoryToMicromapEXT 880 881To copy host accessible memory to a micromap, call: 882 883include::{generated}/api/protos/vkCopyMemoryToMicromapEXT.adoc[] 884 885 * pname:device is the device which owns pname:pInfo->dst. 886 * pname:deferredOperation is an optional slink:VkDeferredOperationKHR to 887 <<deferred-host-operations-requesting, request deferral>> for this 888 command. 889 * pname:pInfo is a pointer to a slink:VkCopyMemoryToMicromapInfoEXT 890 structure defining the copy operation. 891 892This command fulfills the same task as flink:vkCmdCopyMemoryToMicromapEXT 893but is executed by the host. 894 895This command can accept micromaps produced by either 896flink:vkCmdCopyMicromapToMemoryEXT or flink:vkCopyMicromapToMemoryEXT. 897 898.Valid Usage 899**** 900include::{chapters}/commonvalidity/deferred_operations_common.adoc[] 901 * [[VUID-vkCopyMemoryToMicromapEXT-pInfo-07563]] 902 pname:pInfo->src.hostAddress must: be a valid host pointer 903 * [[VUID-vkCopyMemoryToMicromapEXT-pInfo-07564]] 904 pname:pInfo->src.hostAddress must: be aligned to 16 bytes 905 * [[VUID-vkCopyMemoryToMicromapEXT-buffer-07565]] 906 The pname:buffer used to create pname:pInfo->dst must: be bound to 907 host-visible device memory 908 * [[VUID-vkCopyMemoryToMicromapEXT-micromapHostCommands-07566]] 909 The <<features-micromapHostCommands, 910 sname:VkPhysicalDeviceOpacityMicromapFeaturesEXT::pname:micromapHostCommands>> 911 feature must: be enabled 912ifdef::VK_KHR_device_group,VK_VERSION_1_1[] 913 * [[VUID-vkCopyMemoryToMicromapEXT-buffer-07567]] 914 The pname:buffer used to create pname:pInfo->dst must: be bound to 915 memory that was not allocated with multiple instances 916endif::VK_KHR_device_group,VK_VERSION_1_1[] 917**** 918 919include::{generated}/validity/protos/vkCopyMemoryToMicromapEXT.adoc[] 920-- 921 922[open,refpage='vkCopyMicromapToMemoryEXT',desc='Serialize a micromap on the host',type='protos'] 923-- 924:refpage: vkCopyMicromapToMemoryEXT 925 926To copy a micromap to host accessible memory, call: 927 928include::{generated}/api/protos/vkCopyMicromapToMemoryEXT.adoc[] 929 930 * pname:device is the device which owns pname:pInfo->src. 931 * pname:deferredOperation is an optional slink:VkDeferredOperationKHR to 932 <<deferred-host-operations-requesting, request deferral>> for this 933 command. 934 * pname:pInfo is a pointer to a slink:VkCopyMicromapToMemoryInfoEXT 935 structure defining the copy operation. 936 937This command fulfills the same task as flink:vkCmdCopyMicromapToMemoryEXT 938but is executed by the host. 939 940This command produces the same results as 941flink:vkCmdCopyMicromapToMemoryEXT, but writes its result directly to a host 942pointer, and is executed on the host rather than the device. 943The output may: not necessarily be bit-for-bit identical, but it can be 944equally used by either flink:vkCmdCopyMemoryToMicromapEXT or 945flink:vkCopyMemoryToMicromapEXT. 946 947.Valid Usage 948**** 949include::{chapters}/commonvalidity/deferred_operations_common.adoc[] 950 * [[VUID-vkCopyMicromapToMemoryEXT-buffer-07568]] 951 The pname:buffer used to create pname:pInfo->src must: be bound to 952 host-visible device memory 953 * [[VUID-vkCopyMicromapToMemoryEXT-pInfo-07569]] 954 pname:pInfo->dst.hostAddress must: be a valid host pointer 955 * [[VUID-vkCopyMicromapToMemoryEXT-pInfo-07570]] 956 pname:pInfo->dst.hostAddress must: be aligned to 16 bytes 957 * [[VUID-vkCopyMicromapToMemoryEXT-micromapHostCommands-07571]] 958 The <<features-micromapHostCommands, 959 sname:VkPhysicalDeviceOpacityMicromapFeaturesEXT::pname:micromapHostCommands>> 960 feature must: be enabled 961ifdef::VK_KHR_device_group,VK_VERSION_1_1[] 962 * [[VUID-vkCopyMicromapToMemoryEXT-buffer-07572]] 963 The pname:buffer used to create pname:pInfo->src must: be bound to 964 memory that was not allocated with multiple instances 965endif::VK_KHR_device_group,VK_VERSION_1_1[] 966**** 967 968include::{generated}/validity/protos/vkCopyMicromapToMemoryEXT.adoc[] 969-- 970 971[open,refpage='vkWriteMicromapsPropertiesEXT',desc='Query micromap meta-data on the host',type='protos'] 972-- 973:refpage: vkWriteMicromapsPropertiesEXT 974 975To query micromap size parameters on the host, call: 976 977include::{generated}/api/protos/vkWriteMicromapsPropertiesEXT.adoc[] 978 979 * pname:device is the device which owns the micromaps in pname:pMicromaps. 980 * pname:micromapCount is the count of micromaps for which to query the 981 property. 982 * pname:pMicromaps is a pointer to an array of existing previously built 983 micromaps. 984 * pname:queryType is a elink:VkQueryType value specifying the property to 985 be queried. 986 * pname:dataSize is the size in bytes of the buffer pointed to by 987 pname:pData. 988 * pname:pData is a pointer to a user-allocated buffer where the results 989 will be written. 990 * pname:stride is the stride in bytes between results for individual 991 queries within pname:pData. 992 993This command fulfills the same task as 994flink:vkCmdWriteMicromapsPropertiesEXT but is executed by the host. 995 996.Valid Usage 997**** 998include::{chapters}/commonvalidity/write_micromap_properties_common.adoc[] 999 * [[VUID-vkWriteMicromapsPropertiesEXT-queryType-07573]] 1000 If pname:queryType is 1001 ename:VK_QUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXT, then pname:stride 1002 must: be a multiple of the size of basetype:VkDeviceSize 1003 * [[VUID-vkWriteMicromapsPropertiesEXT-queryType-07574]] 1004 If pname:queryType is 1005 ename:VK_QUERY_TYPE_MICROMAP_SERIALIZATION_SIZE_EXT, then pname:pData 1006 must: point to a basetype:VkDeviceSize 1007 * [[VUID-vkWriteMicromapsPropertiesEXT-queryType-07575]] 1008 If pname:queryType is 1009 * [[VUID-vkWriteMicromapsPropertiesEXT-dataSize-07576]] 1010 pname:dataSize must: be greater than or equal to 1011 [eq]#pname:micromapCount*pname:stride# 1012 * [[VUID-vkWriteMicromapsPropertiesEXT-buffer-07577]] 1013 The pname:buffer used to create each micromap in pname:pMicromaps must: 1014 be bound to host-visible device memory 1015 * [[VUID-vkWriteMicromapsPropertiesEXT-micromapHostCommands-07578]] 1016 The <<features-micromapHostCommands, 1017 sname:VkPhysicalDeviceOpacityMicromapFeaturesEXT::pname:micromapHostCommands>> 1018 feature must: be enabled 1019ifdef::VK_KHR_device_group,VK_VERSION_1_1[] 1020 * [[VUID-vkWriteMicromapsPropertiesEXT-buffer-07579]] 1021 The pname:buffer used to create each micromap in pname:pMicromaps must: 1022 be bound to memory that was not allocated with multiple instances 1023endif::VK_KHR_device_group,VK_VERSION_1_1[] 1024**** 1025 1026include::{generated}/validity/protos/vkWriteMicromapsPropertiesEXT.adoc[] 1027-- 1028