41. Memory Decompression
To decompress data between one or more memory regions call:
-
commandBuffer
is the command buffer into which the command will be recorded. -
decompressRegionCount
is the number of memory regions to decompress. -
pDecompressMemoryRegions
is a pointer to an array ofdecompressRegionCount
VkDecompressMemoryRegionNV structures specifying decompression parameters.
Each region specified in pDecompressMemoryRegions
is decompressed from
the source to destination region based on the specified decompression
method.
To decompress data between one or more memory regions by specifying decompression parameters indirectly in a buffer, call:
-
commandBuffer
is the command buffer into which the command will be recorded. -
indirectCommandsAddress
is the device address containing decompression parameters laid out as an array of VkDecompressMemoryRegionNV structures. -
indirectCommandsCountAddress
is the device address containing the decompression count. -
stride
is the byte stride between successive sets of decompression parameters located starting fromindirectCommandsAddress
.
Each region specified in indirectCommandsAddress
is decompressed from
the source to destination region based on the specified decompression
method.
Bits which can be set in
VkDecompressMemoryRegionNV
::decompressionMethod
specifying the
decompression method to select, or returned in
VkPhysicalDeviceMemoryDecompressionPropertiesNV
::decompressionMethods
specifying the available decompression methods are:
// Provided by VK_NV_memory_decompression
// Flag bits for VkMemoryDecompressionMethodFlagBitsNV
typedef VkFlags64 VkMemoryDecompressionMethodFlagBitsNV;
static const VkMemoryDecompressionMethodFlagBitsNV VK_MEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_NV = 0x00000001ULL;
// Provided by VK_NV_memory_decompression
typedef VkFlags64 VkMemoryDecompressionMethodFlagsNV;
VkMemoryDecompressionMethodFlagsNV
is a bitmask type for specifying a
mask of one or more VkMemoryDecompressionMethodFlagBitsNV
: