| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Vulkan.Extensions.VK_EXT_memory_decompression
Description
Name
VK_EXT_memory_decompression - device extension
VK_EXT_memory_decompression
- Name String
VK_EXT_memory_decompression
- Extension Type
- Device extension
- Registered Extension Number
- 551
- Revision
- 1
- Ratification Status
- Ratified
- Extension and Version Dependencies
- VK_KHR_get_physical_device_properties2 and VK_KHR_buffer_device_address
- Contact
- Extension Proposal
- VK_EXT_memory_decompression
Other Extension Metadata
- Last Modified Date
- 2025-01-23
- Contributors
- Vikram Kushwaha, NVIDIA
- Daniel Koch, NVIDIA
- Jeff Bolz, NVIDIA
- Christoph Kubisch, NVIDIA
- Piers Daniell, NVIDIA
- Spencer Fricke, LunarG
Description
This extension adds support for performing memory to memory decompression.
New Commands
New Structures
DecompressMemoryRegionEXTExtending
PhysicalDeviceFeatures2,DeviceCreateInfo:Extending
PhysicalDeviceProperties2:
New Enums
New Bitmasks
New Enum Constants
EXT_MEMORY_DECOMPRESSION_SPEC_VERSIONExtending
AccessFlagBits2:Extending
BufferUsageFlagBits2:Extending
PipelineStageFlagBits2:Extending
StructureType:
Issues
1) How does an app know the minimum size that decompressedSize should
be set to?
RESOLVED: When decompressing, data is typically processed in chunks.
For example, with GDeflate 1.0, data is streamed in 64 KB blocks, but
the final block may be smaller. The exact size of this last block
depends on the compression method and original data size and so it must
be stored in the compressed bitstream so that the decompressor can set
decompressedSize correctly. It is still ok for the last block to take
up all 64 KB, but setting it too low will cause issues and is undefined
behavior. It is a known limitation that the validation layers will not
be able to detect the minimum size of decompressedSize unless it
decides to implement each decompression method specification.
Version History
Revision 1, 2025-01-23 (Daniel Koch)
- Initial draft
See Also
No cross-references are available
Document Notes
For more information, see the Vulkan Specification.
This page is a generated document. Fixes and changes should be made to the generator scripts, not directly.
Synopsis
- cmdDecompressMemoryEXT :: MonadIO io => CommandBuffer -> DecompressMemoryInfoEXT -> io ()
- cmdDecompressMemoryIndirectCountEXT :: MonadIO io => CommandBuffer -> MemoryDecompressionMethodFlagsEXT -> ("indirectCommandsAddress" ::: DeviceAddress) -> ("indirectCommandsCountAddress" ::: DeviceAddress) -> ("maxDecompressionCount" ::: Word32) -> ("stride" ::: Word32) -> io ()
- pattern MEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_NV :: MemoryDecompressionMethodFlagBitsEXT
- data PhysicalDeviceMemoryDecompressionFeaturesEXT = PhysicalDeviceMemoryDecompressionFeaturesEXT {}
- data PhysicalDeviceMemoryDecompressionPropertiesEXT = PhysicalDeviceMemoryDecompressionPropertiesEXT {}
- data DecompressMemoryRegionEXT = DecompressMemoryRegionEXT {}
- data DecompressMemoryInfoEXT = DecompressMemoryInfoEXT {}
- type MemoryDecompressionMethodFlagsEXT = MemoryDecompressionMethodFlagBitsEXT
- newtype MemoryDecompressionMethodFlagBitsEXT where
- type EXT_MEMORY_DECOMPRESSION_SPEC_VERSION = 1
- pattern EXT_MEMORY_DECOMPRESSION_SPEC_VERSION :: Integral a => a
- type EXT_MEMORY_DECOMPRESSION_EXTENSION_NAME = "VK_EXT_memory_decompression"
- pattern EXT_MEMORY_DECOMPRESSION_EXTENSION_NAME :: (Eq a, IsString a) => a
Documentation
cmdDecompressMemoryEXT Source #
Arguments
| :: MonadIO io | |
| => CommandBuffer |
|
| -> DecompressMemoryInfoEXT |
|
| -> io () |
vkCmdDecompressMemoryEXT - Decompress data between memory regions
Valid Usage
- The memoryDecompression feature must be enabled
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
pDecompressMemoryInfoEXTmust be a valid pointer to a validDecompressMemoryInfoEXTstructure -
commandBuffermust be in the recording state - The
CommandPoolthatcommandBufferwas allocated from must supportQUEUE_COMPUTE_BIT, orQUEUE_GRAPHICS_BIToperations - This command must only be called outside of a render pass instance
- This command must not be called between suspended render pass instances
- This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
CommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
|---|---|---|---|---|
| Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | Action |
Conditional Rendering
vkCmdDecompressMemoryEXT is not affected by conditional rendering
See Also
VK_EXT_memory_decompression,
CommandBuffer, DecompressMemoryInfoEXT
cmdDecompressMemoryIndirectCountEXT Source #
Arguments
| :: MonadIO io | |
| => CommandBuffer |
|
| -> MemoryDecompressionMethodFlagsEXT |
|
| -> ("indirectCommandsAddress" ::: DeviceAddress) |
|
| -> ("indirectCommandsCountAddress" ::: DeviceAddress) |
|
| -> ("maxDecompressionCount" ::: Word32) |
|
| -> ("stride" ::: Word32) |
|
| -> io () |
vkCmdDecompressMemoryIndirectCountEXT - Indirect decompress data between memory regions
Description
Each region specified in indirectCommandsAddress is decompressed from
the source to destination region based on the specified
decompressionMethod.
Valid Usage
- The memoryDecompression feature must be enabled
-
indirectCommandsAddressmust be a device address allocated to the application from a buffer created with theBUFFER_USAGE_INDIRECT_BUFFER_BITusage flag set -
indirectCommandsAddressmust be a multiple of4 -
indirectCommandsCountAddressmust be a device address allocated to the application from a buffer created with theBUFFER_USAGE_INDIRECT_BUFFER_BITusage flag set -
indirectCommandsCountAddressmust be a multiple of4 -
The count stored in
indirectCommandsCountAddressmust be less than or equal toPhysicalDeviceMemoryDecompressionPropertiesEXT::maxDecompressionIndirectCount -
All device addresses between
indirectCommandsAddressandindirectCommandsAddress+ (stride× (count stored inindirectCommandsCountAddress)) - 1 must be in the buffer device address range of the same buffer -
The
decompressionMethodmust have a single bit set -
stridemust be a multiple of4and must be greater than or equal to sizeof(DecompressMemoryRegionEXT) -
maxDecompressionCountmust be less than or equal toPhysicalDeviceMemoryDecompressionPropertiesEXT::maxDecompressionIndirectCount -
If
decompressionMethodisMEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_EXT, then all values inDecompressMemoryRegionEXT::decompressedSizemust be less than or equal to 65536 bytes -
decompressionMethodmust be a valid bit specified inPhysicalDeviceMemoryDecompressionPropertiesEXT::decompressionMethods
Valid Usage (Implicit)
-
commandBuffermust be a validCommandBufferhandle
-
decompressionMethodmust be a valid combination ofMemoryDecompressionMethodFlagBitsEXTvalues -
decompressionMethodmust not be0 -
indirectCommandsAddressmust be a validDeviceAddressvalue -
indirectCommandsCountAddressmust be a validDeviceAddressvalue -
commandBuffermust be in the recording state -
The
CommandPoolthatcommandBufferwas allocated from must supportQUEUE_COMPUTE_BIT, orQUEUE_GRAPHICS_BIToperations - This command must only be called outside of a render pass instance
- This command must not be called between suspended render pass instances
- This command must only be called outside of a video coding scope
Host Synchronization
- Host access to
commandBuffermust be externally synchronized
- Host access to the
CommandPoolthatcommandBufferwas allocated from must be externally synchronized
Command Properties
'
| Command Buffer Levels | Render Pass Scope | Video Coding Scope | Supported Queue Types | Command Type |
|---|---|---|---|---|
| Primary Secondary | Outside | Outside | VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BIT | Action |
Conditional Rendering
vkCmdDecompressMemoryIndirectCountEXT is not affected by conditional rendering
See Also
VK_EXT_memory_decompression,
CommandBuffer,
DeviceAddress,
MemoryDecompressionMethodFlagsEXT
pattern MEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_NV :: MemoryDecompressionMethodFlagBitsEXT Source #
data PhysicalDeviceMemoryDecompressionFeaturesEXT Source #
VkPhysicalDeviceMemoryDecompressionFeaturesEXT - Structure describing if memory decompression is supported by an implementation
Members
This structure describes the following features:
Description
If the PhysicalDeviceMemoryDecompressionFeaturesEXT structure is
included in the pNext chain of the
PhysicalDeviceFeatures2
structure passed to
getPhysicalDeviceFeatures2,
it is filled in to indicate whether each corresponding feature is
supported. If the application wishes to use a
Device with any features described by
PhysicalDeviceMemoryDecompressionFeaturesEXT, it must add an
instance of the structure, with the desired feature members set to
TRUE, to the pNext chain of
DeviceCreateInfo when creating the
Device.
Valid Usage (Implicit)
See Also
VK_EXT_memory_decompression,
VK_NV_memory_decompression,
Bool32,
StructureType
Constructors
| PhysicalDeviceMemoryDecompressionFeaturesEXT | |
Fields | |
Instances
data PhysicalDeviceMemoryDecompressionPropertiesEXT Source #
VkPhysicalDeviceMemoryDecompressionPropertiesEXT - Structure describing supported memory decompression methods by an implementation
Description
If
memoryDecompression
feature is supported, decompressionMethods must have at least one
bit set.
If the PhysicalDeviceMemoryDecompressionPropertiesEXT structure is
included in the pNext chain of the
PhysicalDeviceProperties2
structure passed to
getPhysicalDeviceProperties2,
it is filled in with each corresponding implementation-dependent
property.
Valid Usage (Implicit)
See Also
VK_EXT_memory_decompression,
VK_NV_memory_decompression,
MemoryDecompressionMethodFlagsEXT,
StructureType
Constructors
| PhysicalDeviceMemoryDecompressionPropertiesEXT | |
Fields
| |
Instances
data DecompressMemoryRegionEXT Source #
VkDecompressMemoryRegionEXT - Structure specifying decompression region
Description
Accesses to compressed and decompressed data specified in srcAddress
and dstAddress must be
synchronized
with the
PIPELINE_STAGE_2_MEMORY_DECOMPRESSION_BIT_EXT
pipeline stage
with
access type
of
ACCESS_2_MEMORY_DECOMPRESSION_READ_BIT_EXT
or
ACCESS_2_MEMORY_DECOMPRESSION_WRITE_BIT_EXT.
Valid Usage
- The memory range
defined by
srcAddressandcompressedSizemust be contained within the size of the buffer bound tosrcAddress, minus the offset ofsrcAddressfrom the base address of that buffer -
dstAddressmust be 4 byte aligned - The memory range
defined by
dstAddressanddecompressedSizemust be contained within the size of the buffer bound todstAddress, minus the offset ofdstAddressfrom the base address of that buffer -
decompressedSizemust be large enough to hold the decompressed data based on thedecompressionMethod -
compressedSizemust not be zero -
decompressedSizemust not be zero - The memory range
defined by
srcAddressandcompressedSizemust not overlap the memory range defined bydstAddressanddecompressedSize -
srcAddressmust be a device address allocated to the application from a buffer created with theBUFFER_USAGE_2_MEMORY_DECOMPRESSION_BIT_EXTusage flag set -
dstAddressmust be a device address allocated to the application from a buffer created with theBUFFER_USAGE_2_MEMORY_DECOMPRESSION_BIT_EXTusage flag set
Valid Usage (Implicit)
-
srcAddressmust be a validDeviceAddressvalue
-
dstAddressmust be a validDeviceAddressvalue
See Also
VK_EXT_memory_decompression,
DecompressMemoryInfoEXT,
DeviceAddress,
DeviceSize
Constructors
| DecompressMemoryRegionEXT | |
Fields
| |
Instances
data DecompressMemoryInfoEXT Source #
VkDecompressMemoryInfoEXT - Structure specifying decompression memory info
Description
Each memory region specified in pRegions is decompressed from the
source to the destination address based on the decompression method
specified in decompressionMethod. If any of the specified source and
destination regions overlap in memory, then the results of decompression
are undefined.
Valid Usage
- If
decompressionMethodisMEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_EXT, then for each element ofpRegions,decompressedSizemust be less than or equal to 65536 bytes -
decompressionMethodmust be a valid bit specified inPhysicalDeviceMemoryDecompressionPropertiesEXT::decompressionMethods
Valid Usage (Implicit)
-
sTypemust beSTRUCTURE_TYPE_DECOMPRESS_MEMORY_INFO_EXT
-
pNextmust beNULL -
decompressionMethodmust be a valid combination ofMemoryDecompressionMethodFlagBitsEXTvalues -
decompressionMethodmust not be0 -
pRegionsmust be a valid pointer to an array ofregionCountDecompressMemoryRegionEXTstructures -
regionCountmust be greater than0
See Also
VK_EXT_memory_decompression,
DecompressMemoryRegionEXT, MemoryDecompressionMethodFlagsEXT,
StructureType,
cmdDecompressMemoryEXT
Constructors
| DecompressMemoryInfoEXT | |
Fields
| |
Instances
newtype MemoryDecompressionMethodFlagBitsEXT Source #
VkMemoryDecompressionMethodFlagBitsEXT - List the supported memory decompression methods
Description
MEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_EXTspecifies that the GDeflate 1.0 algorithm is used to decompress data.
See Also
VK_EXT_memory_decompression,
VK_NV_memory_decompression,
MemoryDecompressionMethodFlagsEXT
Constructors
| MemoryDecompressionMethodFlagBitsEXT Flags64 |
Bundled Patterns
| pattern MEMORY_DECOMPRESSION_METHOD_GDEFLATE_1_0_BIT_EXT :: MemoryDecompressionMethodFlagBitsEXT |
Instances
type EXT_MEMORY_DECOMPRESSION_SPEC_VERSION = 1 Source #
pattern EXT_MEMORY_DECOMPRESSION_SPEC_VERSION :: Integral a => a Source #
type EXT_MEMORY_DECOMPRESSION_EXTENSION_NAME = "VK_EXT_memory_decompression" Source #
pattern EXT_MEMORY_DECOMPRESSION_EXTENSION_NAME :: (Eq a, IsString a) => a Source #