Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Name
VK_EXT_image_compression_control - device extension
VK_EXT_image_compression_control
- Name String
VK_EXT_image_compression_control
- Extension Type
- Device extension
- Registered Extension Number
- 339
- Revision
- 1
- Ratification Status
- Not ratified
- Extension and Version Dependencies
- VK_KHR_get_physical_device_properties2
- Contact
- Extension Proposal
- VK_EXT_image_compression_control
Other Extension Metadata
- Last Modified Date
- 2022-05-02
- IP Status
- No known IP claims.
- Contributors
- Jan-Harald Fredriksen, Arm
- Graeme Leese, Broadcom
- Andrew Garrard, Imagination
- Lisa Wu, Arm
- Peter Kohaut, Arm
Description
This extension enables fixed-rate image compression and adds the ability to control when this kind of compression can be applied. Many implementations support some form of framebuffer compression. This is typically transparent to applications as lossless compression schemes are used. With fixed-rate compression, the compression is done at a defined bitrate. Such compression algorithms generally produce results that are visually lossless, but the results are typically not bit-exact when compared to a non-compressed result. The implementation may not be able to use the requested compression rate in all cases. This extension adds a query that can be used to determine the compression scheme and rate that was applied to an image.
New Commands
New Structures
SubresourceLayout2EXT
Extending
ImageCreateInfo
,SwapchainCreateInfoKHR
,PhysicalDeviceImageFormatInfo2
:Extending
ImageFormatProperties2
,SurfaceFormat2KHR
,SubresourceLayout2KHR
:Extending
PhysicalDeviceFeatures2
,DeviceCreateInfo
:
New Enums
New Bitmasks
New Enum Constants
EXT_IMAGE_COMPRESSION_CONTROL_SPEC_VERSION
Extending
Result
:Extending
StructureType
:
Version History
Revision 1, 2022-05-02 (Jan-Harald Fredriksen)
- Initial draft
See Also
ImageCompressionControlEXT
, ImageCompressionFixedRateFlagBitsEXT
,
ImageCompressionFixedRateFlagsEXT
, ImageCompressionFlagBitsEXT
,
ImageCompressionFlagsEXT
, ImageCompressionPropertiesEXT
,
ImageSubresource2EXT
,
PhysicalDeviceImageCompressionControlFeaturesEXT
,
SubresourceLayout2EXT
,
getImageSubresourceLayout2EXT
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
- pattern STRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2_EXT :: StructureType
- pattern STRUCTURE_TYPE_IMAGE_SUBRESOURCE_2_EXT :: StructureType
- data ImageCompressionControlEXT = ImageCompressionControlEXT {}
- data PhysicalDeviceImageCompressionControlFeaturesEXT = PhysicalDeviceImageCompressionControlFeaturesEXT {}
- data ImageCompressionPropertiesEXT = ImageCompressionPropertiesEXT {}
- type ImageCompressionFlagsEXT = ImageCompressionFlagBitsEXT
- newtype ImageCompressionFlagBitsEXT where
- ImageCompressionFlagBitsEXT Flags
- pattern IMAGE_COMPRESSION_DEFAULT_EXT :: ImageCompressionFlagBitsEXT
- pattern IMAGE_COMPRESSION_FIXED_RATE_DEFAULT_EXT :: ImageCompressionFlagBitsEXT
- pattern IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT :: ImageCompressionFlagBitsEXT
- pattern IMAGE_COMPRESSION_DISABLED_EXT :: ImageCompressionFlagBitsEXT
- type ImageCompressionFixedRateFlagsEXT = ImageCompressionFixedRateFlagBitsEXT
- newtype ImageCompressionFixedRateFlagBitsEXT where
- ImageCompressionFixedRateFlagBitsEXT Flags
- pattern IMAGE_COMPRESSION_FIXED_RATE_NONE_EXT :: ImageCompressionFixedRateFlagBitsEXT
- pattern IMAGE_COMPRESSION_FIXED_RATE_1BPC_BIT_EXT :: ImageCompressionFixedRateFlagBitsEXT
- pattern IMAGE_COMPRESSION_FIXED_RATE_2BPC_BIT_EXT :: ImageCompressionFixedRateFlagBitsEXT
- pattern IMAGE_COMPRESSION_FIXED_RATE_3BPC_BIT_EXT :: ImageCompressionFixedRateFlagBitsEXT
- pattern IMAGE_COMPRESSION_FIXED_RATE_4BPC_BIT_EXT :: ImageCompressionFixedRateFlagBitsEXT
- pattern IMAGE_COMPRESSION_FIXED_RATE_5BPC_BIT_EXT :: ImageCompressionFixedRateFlagBitsEXT
- pattern IMAGE_COMPRESSION_FIXED_RATE_6BPC_BIT_EXT :: ImageCompressionFixedRateFlagBitsEXT
- pattern IMAGE_COMPRESSION_FIXED_RATE_7BPC_BIT_EXT :: ImageCompressionFixedRateFlagBitsEXT
- pattern IMAGE_COMPRESSION_FIXED_RATE_8BPC_BIT_EXT :: ImageCompressionFixedRateFlagBitsEXT
- pattern IMAGE_COMPRESSION_FIXED_RATE_9BPC_BIT_EXT :: ImageCompressionFixedRateFlagBitsEXT
- pattern IMAGE_COMPRESSION_FIXED_RATE_10BPC_BIT_EXT :: ImageCompressionFixedRateFlagBitsEXT
- pattern IMAGE_COMPRESSION_FIXED_RATE_11BPC_BIT_EXT :: ImageCompressionFixedRateFlagBitsEXT
- pattern IMAGE_COMPRESSION_FIXED_RATE_12BPC_BIT_EXT :: ImageCompressionFixedRateFlagBitsEXT
- pattern IMAGE_COMPRESSION_FIXED_RATE_13BPC_BIT_EXT :: ImageCompressionFixedRateFlagBitsEXT
- pattern IMAGE_COMPRESSION_FIXED_RATE_14BPC_BIT_EXT :: ImageCompressionFixedRateFlagBitsEXT
- pattern IMAGE_COMPRESSION_FIXED_RATE_15BPC_BIT_EXT :: ImageCompressionFixedRateFlagBitsEXT
- pattern IMAGE_COMPRESSION_FIXED_RATE_16BPC_BIT_EXT :: ImageCompressionFixedRateFlagBitsEXT
- pattern IMAGE_COMPRESSION_FIXED_RATE_17BPC_BIT_EXT :: ImageCompressionFixedRateFlagBitsEXT
- pattern IMAGE_COMPRESSION_FIXED_RATE_18BPC_BIT_EXT :: ImageCompressionFixedRateFlagBitsEXT
- pattern IMAGE_COMPRESSION_FIXED_RATE_19BPC_BIT_EXT :: ImageCompressionFixedRateFlagBitsEXT
- pattern IMAGE_COMPRESSION_FIXED_RATE_20BPC_BIT_EXT :: ImageCompressionFixedRateFlagBitsEXT
- pattern IMAGE_COMPRESSION_FIXED_RATE_21BPC_BIT_EXT :: ImageCompressionFixedRateFlagBitsEXT
- pattern IMAGE_COMPRESSION_FIXED_RATE_22BPC_BIT_EXT :: ImageCompressionFixedRateFlagBitsEXT
- pattern IMAGE_COMPRESSION_FIXED_RATE_23BPC_BIT_EXT :: ImageCompressionFixedRateFlagBitsEXT
- pattern IMAGE_COMPRESSION_FIXED_RATE_24BPC_BIT_EXT :: ImageCompressionFixedRateFlagBitsEXT
- type EXT_IMAGE_COMPRESSION_CONTROL_SPEC_VERSION = 1
- pattern EXT_IMAGE_COMPRESSION_CONTROL_SPEC_VERSION :: forall a. Integral a => a
- type EXT_IMAGE_COMPRESSION_CONTROL_EXTENSION_NAME = "VK_EXT_image_compression_control"
- pattern EXT_IMAGE_COMPRESSION_CONTROL_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a
- data ImageSubresource2KHR = ImageSubresource2KHR {}
- data SubresourceLayout2KHR (es :: [Type]) = SubresourceLayout2KHR {
- next :: Chain es
- subresourceLayout :: SubresourceLayout
- getImageSubresourceLayout2KHR :: forall a io. (Extendss SubresourceLayout2KHR a, PokeChain a, PeekChain a, MonadIO io) => Device -> Image -> ImageSubresource2KHR -> io (SubresourceLayout2KHR a)
- type ImageSubresource2EXT = ImageSubresource2KHR
- type SubresourceLayout2EXT = SubresourceLayout2KHR
- getImageSubresourceLayout2EXT :: forall {a :: [Type]} {io}. (Extendss SubresourceLayout2KHR a, PokeChain a, PeekChain a, MonadIO io) => Device -> Image -> ImageSubresource2KHR -> io (SubresourceLayout2KHR a)
Documentation
data ImageCompressionControlEXT Source #
VkImageCompressionControlEXT - Specify image compression properties
Description
If enabled, fixed-rate compression is done in an implementation-defined manner and may be applied at block granularity. In that case, a write to an individual texel may modify the value of other texels in the same block.
Valid Usage
-
flags
must be one ofIMAGE_COMPRESSION_DEFAULT_EXT
,IMAGE_COMPRESSION_FIXED_RATE_DEFAULT_EXT
,IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT
, orIMAGE_COMPRESSION_DISABLED_EXT
- If
flags
includesIMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT
,pFixedRateFlags
must not beNULL
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_IMAGE_COMPRESSION_CONTROL_EXT
Note
Some combinations of compression properties may not be supported. For example, some implementations may not support different fixed-rate compression rates per plane of a multi-planar format and will not be able to enable fixed-rate compression for any plane if the requested rates differ.
See Also
VK_EXT_image_compression_control,
ImageCompressionFixedRateFlagsEXT
, ImageCompressionFlagsEXT
,
StructureType
ImageCompressionControlEXT | |
|
Instances
data PhysicalDeviceImageCompressionControlFeaturesEXT Source #
VkPhysicalDeviceImageCompressionControlFeaturesEXT - Structure describing whether image compression controls can be supported by an implementation
Members
This structure describes the following feature:
Description
If the PhysicalDeviceImageCompressionControlFeaturesEXT
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. PhysicalDeviceImageCompressionControlFeaturesEXT
can also
be used in the pNext
chain of DeviceCreateInfo
to selectively enable these features.
Valid Usage (Implicit)
See Also
Instances
data ImageCompressionPropertiesEXT Source #
VkImageCompressionPropertiesEXT - Compression properties of an image
Valid Usage (Implicit)
See Also
VK_EXT_image_compression_control,
ImageCompressionFixedRateFlagsEXT
, ImageCompressionFlagsEXT
,
StructureType
ImageCompressionPropertiesEXT | |
|
Instances
newtype ImageCompressionFlagBitsEXT Source #
VkImageCompressionFlagBitsEXT - Bitmask specifying image compression controls
Description
If ImageCompressionControlEXT
::flags
is
IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT
, then the i
th member of
the pFixedRateFlags
array specifies the allowed compression rates for
the image’s i
th plane.
Note
If IMAGE_COMPRESSION_DISABLED_EXT
is included in
ImageCompressionControlEXT
::flags
, both lossless and fixed-rate
compression will be disabled. This is likely to have a negative impact
on performance and is only intended to be used for debugging purposes.
See Also
pattern IMAGE_COMPRESSION_DEFAULT_EXT :: ImageCompressionFlagBitsEXT |
|
pattern IMAGE_COMPRESSION_FIXED_RATE_DEFAULT_EXT :: ImageCompressionFlagBitsEXT |
|
pattern IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT :: ImageCompressionFlagBitsEXT |
|
pattern IMAGE_COMPRESSION_DISABLED_EXT :: ImageCompressionFlagBitsEXT |
|
Instances
newtype ImageCompressionFixedRateFlagBitsEXT Source #
VkImageCompressionFixedRateFlagBitsEXT - Bitmask specifying fixed rate image compression rates
Description
If the format has a different bit rate for different components,
ImageCompressionControlEXT
::pFixedRateFlags
describes the rate of
the component with the largest number of bits assigned to it, scaled pro
rata. For example, to request that a
FORMAT_A2R10G10B10_UNORM_PACK32
format be
stored at a rate of 8 bits per pixel, use
IMAGE_COMPRESSION_FIXED_RATE_2BPC_BIT_EXT
(10 bits for the largest
component, stored at quarter the original size, 2.5 bits, rounded down).
If flags
includes IMAGE_COMPRESSION_FIXED_RATE_EXPLICIT_EXT
, and
multiple bits are set in ImageCompressionControlEXT
::pFixedRateFlags
for a plane, implementations should apply the lowest allowed bitrate
that is supported.
Note
The choice of “bits per component” terminology was chosen so that the
same compression rate describes the same degree of compression applied
to formats that differ only in the number of components. For example,
FORMAT_R8G8_UNORM
compressed to half its
original size is a rate of 4 bits per component, 8 bits per pixel.
FORMAT_R8G8B8A8_UNORM
compressed to half
its original size is 4 bits per component, 16 bits per pixel. Both of
these cases can be requested with
IMAGE_COMPRESSION_FIXED_RATE_4BPC_BIT_EXT
.
See Also
VK_EXT_image_compression_control,
ImageCompressionFixedRateFlagsEXT
Instances
pattern EXT_IMAGE_COMPRESSION_CONTROL_SPEC_VERSION :: forall a. Integral a => a Source #
type EXT_IMAGE_COMPRESSION_CONTROL_EXTENSION_NAME = "VK_EXT_image_compression_control" Source #
pattern EXT_IMAGE_COMPRESSION_CONTROL_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #
data ImageSubresource2KHR Source #
VkImageSubresource2KHR - Structure specifying an image subresource
Valid Usage (Implicit)
See Also
VK_EXT_host_image_copy,
VK_EXT_image_compression_control,
VK_KHR_maintenance5,
DeviceImageSubresourceInfoKHR
,
ImageSubresource
,
StructureType
,
getImageSubresourceLayout2EXT
,
getImageSubresourceLayout2KHR
ImageSubresource2KHR | |
|
Instances
data SubresourceLayout2KHR (es :: [Type]) Source #
VkSubresourceLayout2KHR - Structure specifying subresource layout
Valid Usage (Implicit)
-
sType
must beSTRUCTURE_TYPE_SUBRESOURCE_LAYOUT_2_KHR
- Each
pNext
member of any structure (including this one) in thepNext
chain must be eitherNULL
or a pointer to a valid instance ofImageCompressionPropertiesEXT
orSubresourceHostMemcpySizeEXT
- The
sType
value of each struct in thepNext
chain must be unique
See Also
VK_EXT_host_image_copy,
VK_EXT_image_compression_control,
VK_KHR_maintenance5,
StructureType
,
SubresourceLayout
,
getDeviceImageSubresourceLayoutKHR
,
getImageSubresourceLayout2EXT
,
getImageSubresourceLayout2KHR
SubresourceLayout2KHR | |
|
Instances
getImageSubresourceLayout2KHR Source #
:: forall a io. (Extendss SubresourceLayout2KHR a, PokeChain a, PeekChain a, MonadIO io) | |
=> Device |
|
-> Image |
|
-> ImageSubresource2KHR |
|
-> io (SubresourceLayout2KHR a) |
vkGetImageSubresourceLayout2KHR - Retrieve information about an image subresource
Description
getImageSubresourceLayout2KHR
behaves similarly to
getImageSubresourceLayout
, with the ability to
specify extended inputs via chained input structures, and to return
extended information via chained output structures.
It is legal to call getImageSubresourceLayout2KHR
with a image
created with tiling
equal to
IMAGE_TILING_OPTIMAL
, but the members
of SubresourceLayout2KHR
::subresourceLayout
will have undefined
values in this case.
Note
Structures chained from ImageSubresource2KHR
::pNext
will also be
updated when tiling
is equal to
IMAGE_TILING_OPTIMAL
.
Valid Usage
- The
mipLevel
member ofpSubresource
must be less than themipLevels
specified inImageCreateInfo
whenimage
was created - The
arrayLayer
member ofpSubresource
must be less than thearrayLayers
specified inImageCreateInfo
whenimage
was created - If
format
of theimage
is a color format,tiling
of theimage
isIMAGE_TILING_LINEAR
orIMAGE_TILING_OPTIMAL
, and does not have a multi-planar image format, theaspectMask
member ofpSubresource
must beIMAGE_ASPECT_COLOR_BIT
- If
format
of theimage
has a depth component, theaspectMask
member ofpSubresource
must containIMAGE_ASPECT_DEPTH_BIT
- If
format
of theimage
has a stencil component, theaspectMask
member ofpSubresource
must containIMAGE_ASPECT_STENCIL_BIT
- If
format
of theimage
does not contain a stencil or depth component, theaspectMask
member ofpSubresource
must not containIMAGE_ASPECT_DEPTH_BIT
orIMAGE_ASPECT_STENCIL_BIT
- If the
tiling
of theimage
isIMAGE_TILING_LINEAR
and has a multi-planar image format, then theaspectMask
member ofpSubresource
must be a single valid multi-planar aspect mask bit - If
image
was created with theEXTERNAL_MEMORY_HANDLE_TYPE_ANDROID_HARDWARE_BUFFER_BIT_ANDROID
external memory handle type, thenimage
must be bound to memory - If the
tiling
of theimage
isIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
, then theaspectMask
member ofpSubresource
must beVK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT
and the index i must be less than theDrmFormatModifierPropertiesEXT
::drmFormatModifierPlaneCount
associated with the image’sformat
andImageDrmFormatModifierPropertiesEXT
::drmFormatModifier
Valid Usage (Implicit)
-
device
must be a validDevice
handle
-
image
must be a validImage
handle -
pSubresource
must be a valid pointer to a validImageSubresource2KHR
structure -
pLayout
must be a valid pointer to aSubresourceLayout2KHR
structure -
image
must have been created, allocated, or retrieved fromdevice
See Also
VK_KHR_maintenance5,
Device
, Image
,
ImageSubresource2KHR
, SubresourceLayout2KHR
getImageSubresourceLayout2EXT :: forall {a :: [Type]} {io}. (Extendss SubresourceLayout2KHR a, PokeChain a, PeekChain a, MonadIO io) => Device -> Image -> ImageSubresource2KHR -> io (SubresourceLayout2KHR a) Source #