vulkan
Safe HaskellNone
LanguageHaskell2010

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

New Enums

New Bitmasks

New Enum Constants

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

Documentation

cmdDecompressMemoryEXT Source #

Arguments

:: MonadIO io 
=> CommandBuffer

commandBuffer is the command buffer into which the command will be recorded.

-> DecompressMemoryInfoEXT

pDecompressMemoryInfoEXT is a pointer to a DecompressMemoryInfoEXT structure describing the decompression parameters.

-> io () 

vkCmdDecompressMemoryEXT - Decompress data between memory regions

Valid Usage

Valid Usage (Implicit)

  • pDecompressMemoryInfoEXT must be a valid pointer to a valid DecompressMemoryInfoEXT structure
  • commandBuffer must be in the recording state
  • The CommandPool that commandBuffer was allocated from must support QUEUE_COMPUTE_BIT, or QUEUE_GRAPHICS_BIT operations
  • 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 commandBuffer must be externally synchronized
  • Host access to the CommandPool that commandBuffer was allocated from must be externally synchronized

Command Properties

'

Command Buffer LevelsRender Pass ScopeVideo Coding ScopeSupported Queue TypesCommand Type
Primary SecondaryOutside Outside VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BITAction

Conditional Rendering

vkCmdDecompressMemoryEXT is not affected by conditional rendering

See Also

VK_EXT_memory_decompression, CommandBuffer, DecompressMemoryInfoEXT

cmdDecompressMemoryIndirectCountEXT Source #

Arguments

:: MonadIO io 
=> CommandBuffer

commandBuffer is the command buffer into which the command will be recorded.

-> MemoryDecompressionMethodFlagsEXT

decompressionMethod is a bitmask of MemoryDecompressionMethodFlagBitsEXT with a single bit set specifying the method used to decompress data.

-> ("indirectCommandsAddress" ::: DeviceAddress)

indirectCommandsAddress is the device address containing decompression parameters laid out as an array of DecompressMemoryRegionEXT structures.

-> ("indirectCommandsCountAddress" ::: DeviceAddress)

indirectCommandsCountAddress is the device address containing a 32-bit integer value specifying the decompression count.

-> ("maxDecompressionCount" ::: Word32)

maxDecompressionCount is maximum number of decompressions that will be executed. The actual number of executed decompressions is the minimum of the count specified in indirectCommandsCountAddress and maxDecompressionCount.

-> ("stride" ::: Word32)

stride is the byte stride between successive sets of decompression parameters located starting from indirectCommandsAddress.

-> 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

Valid Usage (Implicit)

  • decompressionMethod must be a valid combination of MemoryDecompressionMethodFlagBitsEXT values
  • decompressionMethod must not be 0
  • indirectCommandsAddress must be a valid DeviceAddress value
  • indirectCommandsCountAddress must be a valid DeviceAddress value
  • commandBuffer must be in the recording state
  • The CommandPool that commandBuffer was allocated from must support QUEUE_COMPUTE_BIT, or QUEUE_GRAPHICS_BIT operations
  • 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 commandBuffer must be externally synchronized
  • Host access to the CommandPool that commandBuffer was allocated from must be externally synchronized

Command Properties

'

Command Buffer LevelsRender Pass ScopeVideo Coding ScopeSupported Queue TypesCommand Type
Primary SecondaryOutside Outside VK_QUEUE_COMPUTE_BIT VK_QUEUE_GRAPHICS_BITAction

Conditional Rendering

vkCmdDecompressMemoryIndirectCountEXT is not affected by conditional rendering

See Also

VK_EXT_memory_decompression, CommandBuffer, DeviceAddress, MemoryDecompressionMethodFlagsEXT

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

Instances details
Eq PhysicalDeviceMemoryDecompressionFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_memory_decompression

Storable PhysicalDeviceMemoryDecompressionFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_memory_decompression

Show PhysicalDeviceMemoryDecompressionFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_memory_decompression

FromCStruct PhysicalDeviceMemoryDecompressionFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_memory_decompression

ToCStruct PhysicalDeviceMemoryDecompressionFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_memory_decompression

Zero PhysicalDeviceMemoryDecompressionFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_memory_decompression

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

Instances details
Eq PhysicalDeviceMemoryDecompressionPropertiesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_memory_decompression

Storable PhysicalDeviceMemoryDecompressionPropertiesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_memory_decompression

Show PhysicalDeviceMemoryDecompressionPropertiesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_memory_decompression

FromCStruct PhysicalDeviceMemoryDecompressionPropertiesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_memory_decompression

ToCStruct PhysicalDeviceMemoryDecompressionPropertiesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_memory_decompression

Zero PhysicalDeviceMemoryDecompressionPropertiesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_memory_decompression

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

  • srcAddress must be 4 byte aligned
  • The memory range defined by srcAddress and compressedSize must be contained within the size of the buffer bound to srcAddress, minus the offset of srcAddress from the base address of that buffer
  • dstAddress must be 4 byte aligned
  • The memory range defined by dstAddress and decompressedSize must be contained within the size of the buffer bound to dstAddress, minus the offset of dstAddress from the base address of that buffer
  • decompressedSize must be large enough to hold the decompressed data based on the decompressionMethod
  • compressedSize must not be zero
  • decompressedSize must not be zero
  • The memory range defined by srcAddress and compressedSize must not overlap the memory range defined by dstAddress and decompressedSize
  • srcAddress must be a device address allocated to the application from a buffer created with the BUFFER_USAGE_2_MEMORY_DECOMPRESSION_BIT_EXT usage flag set
  • dstAddress must be a device address allocated to the application from a buffer created with the BUFFER_USAGE_2_MEMORY_DECOMPRESSION_BIT_EXT usage flag set

Valid Usage (Implicit)

See Also

VK_EXT_memory_decompression, DecompressMemoryInfoEXT, DeviceAddress, DeviceSize

Constructors

DecompressMemoryRegionEXT 

Fields

Instances

Instances details
Eq DecompressMemoryRegionEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_memory_decompression

Storable DecompressMemoryRegionEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_memory_decompression

Show DecompressMemoryRegionEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_memory_decompression

FromCStruct DecompressMemoryRegionEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_memory_decompression

ToCStruct DecompressMemoryRegionEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_memory_decompression

Zero DecompressMemoryRegionEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_memory_decompression

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

  • The decompressionMethod must have a single bit set

Valid Usage (Implicit)

See Also

VK_EXT_memory_decompression, DecompressMemoryRegionEXT, MemoryDecompressionMethodFlagsEXT, StructureType, cmdDecompressMemoryEXT

Constructors

DecompressMemoryInfoEXT 

Fields

newtype MemoryDecompressionMethodFlagBitsEXT Source #

VkMemoryDecompressionMethodFlagBitsEXT - List the supported memory decompression methods

Description

See Also

VK_EXT_memory_decompression, VK_NV_memory_decompression, MemoryDecompressionMethodFlagsEXT

Instances

Instances details
Bits MemoryDecompressionMethodFlagBitsEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_memory_decompression

Methods

(.&.) :: MemoryDecompressionMethodFlagBitsEXT -> MemoryDecompressionMethodFlagBitsEXT -> MemoryDecompressionMethodFlagBitsEXT #

(.|.) :: MemoryDecompressionMethodFlagBitsEXT -> MemoryDecompressionMethodFlagBitsEXT -> MemoryDecompressionMethodFlagBitsEXT #

xor :: MemoryDecompressionMethodFlagBitsEXT -> MemoryDecompressionMethodFlagBitsEXT -> MemoryDecompressionMethodFlagBitsEXT #

complement :: MemoryDecompressionMethodFlagBitsEXT -> MemoryDecompressionMethodFlagBitsEXT #

shift :: MemoryDecompressionMethodFlagBitsEXT -> Int -> MemoryDecompressionMethodFlagBitsEXT #

rotate :: MemoryDecompressionMethodFlagBitsEXT -> Int -> MemoryDecompressionMethodFlagBitsEXT #

zeroBits :: MemoryDecompressionMethodFlagBitsEXT #

bit :: Int -> MemoryDecompressionMethodFlagBitsEXT #

setBit :: MemoryDecompressionMethodFlagBitsEXT -> Int -> MemoryDecompressionMethodFlagBitsEXT #

clearBit :: MemoryDecompressionMethodFlagBitsEXT -> Int -> MemoryDecompressionMethodFlagBitsEXT #

complementBit :: MemoryDecompressionMethodFlagBitsEXT -> Int -> MemoryDecompressionMethodFlagBitsEXT #

testBit :: MemoryDecompressionMethodFlagBitsEXT -> Int -> Bool #

bitSizeMaybe :: MemoryDecompressionMethodFlagBitsEXT -> Maybe Int #

bitSize :: MemoryDecompressionMethodFlagBitsEXT -> Int #

isSigned :: MemoryDecompressionMethodFlagBitsEXT -> Bool #

shiftL :: MemoryDecompressionMethodFlagBitsEXT -> Int -> MemoryDecompressionMethodFlagBitsEXT #

unsafeShiftL :: MemoryDecompressionMethodFlagBitsEXT -> Int -> MemoryDecompressionMethodFlagBitsEXT #

shiftR :: MemoryDecompressionMethodFlagBitsEXT -> Int -> MemoryDecompressionMethodFlagBitsEXT #

unsafeShiftR :: MemoryDecompressionMethodFlagBitsEXT -> Int -> MemoryDecompressionMethodFlagBitsEXT #

rotateL :: MemoryDecompressionMethodFlagBitsEXT -> Int -> MemoryDecompressionMethodFlagBitsEXT #

rotateR :: MemoryDecompressionMethodFlagBitsEXT -> Int -> MemoryDecompressionMethodFlagBitsEXT #

popCount :: MemoryDecompressionMethodFlagBitsEXT -> Int #

FiniteBits MemoryDecompressionMethodFlagBitsEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_memory_decompression

Eq MemoryDecompressionMethodFlagBitsEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_memory_decompression

Ord MemoryDecompressionMethodFlagBitsEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_memory_decompression

Storable MemoryDecompressionMethodFlagBitsEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_memory_decompression

Read MemoryDecompressionMethodFlagBitsEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_memory_decompression

Show MemoryDecompressionMethodFlagBitsEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_memory_decompression

Zero MemoryDecompressionMethodFlagBitsEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_memory_decompression

type EXT_MEMORY_DECOMPRESSION_EXTENSION_NAME = "VK_EXT_memory_decompression" Source #