vulkan
Safe HaskellSafe-Inferred
LanguageHaskell2010

Vulkan.Extensions.VK_EXT_host_image_copy

Description

Name

VK_EXT_host_image_copy - device extension

VK_EXT_host_image_copy

Name String
VK_EXT_host_image_copy
Extension Type
Device extension
Registered Extension Number
271
Revision
1
Ratification Status
Ratified
Extension and Version Dependencies

VK_KHR_get_physical_device_properties2          or

Vulkan Version 1.1      and

VK_KHR_copy_commands2      and

VK_KHR_format_feature_flags2 or Vulkan Version 1.3

Contact
Extension Proposal
VK_EXT_host_image_copy

Other Extension Metadata

Last Modified Date
2023-04-26
Contributors
  • Shahbaz Youssefi, Google
  • Faith Ekstrand, Collabora
  • Hans-Kristian Arntzen, Valve
  • Piers Daniell, NVIDIA
  • Jan-Harald Fredriksen, Arm
  • James Fitzpatrick, Imagination
  • Daniel Story, Nintendo

Description

This extension allows applications to copy data between host memory and images on the host processor, without staging the data through a GPU-accessible buffer. This removes the need to allocate and manage the buffer and its associated memory. On some architectures it may also eliminate an extra copy operation. This extension additionally allows applications to copy data between images on the host.

To support initializing a new image in preparation for a host copy, it is now possible to transition a new image to IMAGE_LAYOUT_GENERAL or other host-copyable layouts via transitionImageLayoutEXT. Additionally, it is possible to perform copies that preserve the swizzling layout of the image by using the HOST_IMAGE_COPY_MEMCPY_EXT flag. In that case, the memory size needed for copies to or from a buffer can be retrieved by chaining SubresourceHostMemcpySizeEXT to pLayout in getImageSubresourceLayout2EXT.

New Commands

New Structures

New Enums

New Bitmasks

New Enum Constants

Issues

1) When uploading data to an image, the data is usually loaded from disk. Why not have the application load the data directly into a DeviceMemory bound to a buffer (instead of host memory), and use cmdCopyBufferToImage? The same could be done when downloading data from an image.

RESOLVED: This may not always be possible. Complicated Vulkan applications such as game engines often have decoupled subsystems for streaming data and rendering. It may be unreasonable to require the streaming subsystem to coordinate with the rendering subsystem to allocate memory on its behalf, especially as Vulkan may not be the only API supported by the engine. In emulation layers, the image data is necessarily provided by the application in host memory, so an optimization as suggested is not possible. Most importantly, the device memory may not be mappable by an application, but still accessible to the driver.

2) Are optimalBufferCopyOffsetAlignment and optimalBufferCopyRowPitchAlignment applicable to host memory as well with the functions introduced by this extension? Or should there be new limits?

RESOLVED: No alignment requirements for the host memory pointer.

3) Should there be granularity requirements for image offsets and extents?

RESOLVED: No granularity requirements, i.e. a granularity of 1 pixel (for non-compressed formats) and 1 texel block (for compressed formats) is assumed.

4) How should the application deal with layout transitions before or after copying to or from images?

RESOLVED: An existing issue with linear images is that when emulating other APIs, it is impossible to know when to transition them as they are written to by the host and then used bindlessly. The copy operations in this extension are affected by the same limitation. A new command is thus introduced by this extension to address this problem by allowing the host to perform an image layout transition between a handful of layouts.

Version History

  • Revision 0, 2021-01-20 (Faith Ekstrand)

    • Initial idea and xml
  • Revision 1, 2023-04-26 (Shahbaz Youssefi)

    • Initial revision

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

copyMemoryToImageEXT Source #

Arguments

:: forall io. MonadIO io 
=> Device

device is the device which owns pCopyMemoryToImageInfo->dstImage.

device must be a valid Device handle

-> CopyMemoryToImageInfoEXT

pCopyMemoryToImageInfo is a pointer to a CopyMemoryToImageInfoEXT structure describing the copy parameters.

pCopyMemoryToImageInfo must be a valid pointer to a valid CopyMemoryToImageInfoEXT structure

-> io () 

vkCopyMemoryToImageEXT - Copy data from host memory into an image

Description

This command is functionally similar to cmdCopyBufferToImage2, except it is executed on the host and reads from host memory instead of a buffer. The memory of pCopyMemoryToImageInfo->dstImage is accessed by the host as if coherent.

Because queue submissions automatically make host memory visible to the device, there would not be a need for a memory barrier before using the results of this copy operation on the device.

Return Codes

Success
Failure

See Also

VK_EXT_host_image_copy, CopyMemoryToImageInfoEXT, Device

copyImageToMemoryEXT Source #

Arguments

:: forall io. MonadIO io 
=> Device

device is the device which owns pCopyImageToMemoryInfo->srcImage.

device must be a valid Device handle

-> CopyImageToMemoryInfoEXT

pCopyImageToMemoryInfo is a pointer to a CopyImageToMemoryInfoEXT structure describing the copy parameters.

pCopyImageToMemoryInfo must be a valid pointer to a valid CopyImageToMemoryInfoEXT structure

-> io () 

vkCopyImageToMemoryEXT - Copy image data into host memory

Description

This command is functionally similar to cmdCopyImageToBuffer2, except it is executed on the host and writes to host memory instead of a buffer. The memory of pCopyImageToMemoryInfo->srcImage is accessed by the host as if coherent.

If the device has written to the image memory, it is not automatically made available to the host. Before this copy command can be called, a memory barrier for this image must have been issued on the device with the second synchronization scope including PIPELINE_STAGE_HOST_BIT and ACCESS_HOST_READ_BIT.

Return Codes

Success
Failure

See Also

VK_EXT_host_image_copy, CopyImageToMemoryInfoEXT, Device

copyImageToImageEXT Source #

Arguments

:: forall io. MonadIO io 
=> Device

device is the device which owns pCopyImageToImageInfo->srcImage and pCopyImageToImageInfo->dstImage.

device must be a valid Device handle

-> CopyImageToImageInfoEXT

pCopyImageToImageInfo is a pointer to a CopyImageToImageInfoEXT structure describing the copy parameters.

pCopyImageToImageInfo must be a valid pointer to a valid CopyImageToImageInfoEXT structure

-> io () 

vkCopyImageToImageEXT - Copy image data using the host

Description

This command is functionally similar to cmdCopyImage2, except it is executed on the host. The memory of pCopyImageToImageInfo->srcImage and pCopyImageToImageInfo->dstImage is accessed by the host as if coherent.

If the device has written to the memory of pCopyImageToImageInfo->srcImage, it is not automatically made available to the host. Before this copy command can be called, a memory barrier for this image must have been issued on the device with the second synchronization scope including PIPELINE_STAGE_HOST_BIT and ACCESS_HOST_READ_BIT.

Because queue submissions automatically make host memory visible to the device, there would not be a need for a memory barrier before using the results of this copy operation in pCopyMemoryToImageInfo->dstImage on the device.

Return Codes

Success
Failure

See Also

VK_EXT_host_image_copy, CopyImageToImageInfoEXT, Device

transitionImageLayoutEXT Source #

Arguments

:: forall io. MonadIO io 
=> Device

device is the device which owns pTransitions[i].image.

device must be a valid Device handle

-> ("transitions" ::: Vector HostImageLayoutTransitionInfoEXT)

pTransitions is a pointer to an array of HostImageLayoutTransitionInfoEXT structures specifying the image and subresource ranges within them to transition.

pTransitions must be a valid pointer to an array of transitionCount valid HostImageLayoutTransitionInfoEXT structures

-> io () 

data PhysicalDeviceHostImageCopyFeaturesEXT Source #

VkPhysicalDeviceHostImageCopyFeaturesEXT - Structure indicating support for copies to or from images from host memory

Members

This structure describes the following feature:

Description

If the PhysicalDeviceHostImageCopyFeaturesEXT 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. PhysicalDeviceHostImageCopyFeaturesEXT can also be used in the pNext chain of DeviceCreateInfo to selectively enable these features.

Valid Usage (Implicit)

See Also

VK_EXT_host_image_copy, Bool32, StructureType

Constructors

PhysicalDeviceHostImageCopyFeaturesEXT 

Fields

Instances

Instances details
Storable PhysicalDeviceHostImageCopyFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

Show PhysicalDeviceHostImageCopyFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

Eq PhysicalDeviceHostImageCopyFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

FromCStruct PhysicalDeviceHostImageCopyFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

ToCStruct PhysicalDeviceHostImageCopyFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

Zero PhysicalDeviceHostImageCopyFeaturesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

data PhysicalDeviceHostImageCopyPropertiesEXT Source #

VkPhysicalDeviceHostImageCopyPropertiesEXT - Structure enumerating image layouts supported by an implementation for host memory copies

Description

If the PhysicalDeviceHostImageCopyPropertiesEXT structure is included in the pNext chain of the PhysicalDeviceProperties2 structure passed to getPhysicalDeviceProperties2, it is filled in with each corresponding implementation-dependent property.

If pCopyDstLayouts is NULL, then the number of image layouts that are supported in CopyMemoryToImageInfoEXT::dstImageLayout and CopyImageToImageInfoEXT::dstImageLayout is returned in copyDstLayoutCount. Otherwise, copyDstLayoutCount must be set by the application to the number of elements in the pCopyDstLayouts array, and on return the variable is overwritten with the number of values actually written to pCopyDstLayouts. If the value of copyDstLayoutCount is less than the number of image layouts that are supported, at most copyDstLayoutCount values will be written to pCopyDstLayouts. The implementation must include the IMAGE_LAYOUT_GENERAL image layout in pCopyDstLayouts.

If pCopySrcLayouts is NULL, then the number of image layouts that are supported in CopyImageToMemoryInfoEXT::srcImageLayout and CopyImageToImageInfoEXT::srcImageLayout is returned in copySrcLayoutCount. Otherwise, copySrcLayoutCount must be set by the application to the number of elements in the pCopySrcLayouts array, and on return the variable is overwritten with the number of values actually written to pCopySrcLayouts. If the value of copySrcLayoutCount is less than the number of image layouts that are supported, at most copySrcLayoutCount values will be written to pCopySrcLayouts. The implementation must include the IMAGE_LAYOUT_GENERAL image layout in pCopySrcLayouts.

The optimalTilingLayoutUUID value can be used to ensure compatible data layouts when using the HOST_IMAGE_COPY_MEMCPY_EXT flag in copyMemoryToImageEXT and copyImageToMemoryEXT.

Valid Usage (Implicit)

  • If copySrcLayoutCount is not 0, and pCopySrcLayouts is not NULL, pCopySrcLayouts must be a valid pointer to an array of copySrcLayoutCount ImageLayout values
  • If copyDstLayoutCount is not 0, and pCopyDstLayouts is not NULL, pCopyDstLayouts must be a valid pointer to an array of copyDstLayoutCount ImageLayout values

See Also

VK_EXT_host_image_copy, Bool32, ImageLayout, StructureType

Constructors

PhysicalDeviceHostImageCopyPropertiesEXT 

Fields

Instances

Instances details
Storable PhysicalDeviceHostImageCopyPropertiesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

Show PhysicalDeviceHostImageCopyPropertiesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

FromCStruct PhysicalDeviceHostImageCopyPropertiesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

ToCStruct PhysicalDeviceHostImageCopyPropertiesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

Zero PhysicalDeviceHostImageCopyPropertiesEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

data MemoryToImageCopyEXT Source #

VkMemoryToImageCopyEXT - Structure specifying a host memory to image copy operation

Description

This structure is functionally similar to BufferImageCopy2, except it defines host memory as the source of copy instead of a buffer. In particular, the same data packing rules and restrictions as that structure apply here as well.

Valid Usage

  • pHostPointer must point to memory that is large enough to contain all memory locations that are accessed according to Buffer and Image Addressing, for each element of pRegions
  • The union of all source regions, and the union of all destination regions, specified by the elements of pRegions, must not overlap in memory
  • memoryRowLength must be 0, or greater than or equal to the width member of imageExtent
  • memoryImageHeight must be 0, or greater than or equal to the height member of imageExtent
  • The aspectMask member of imageSubresource must only have a single bit set
  • imageExtent.width must not be 0
  • imageExtent.height must not be 0
  • imageExtent.depth must not be 0

Valid Usage (Implicit)

  • pNext must be NULL
  • pHostPointer must be a pointer value
  • imageSubresource must be a valid ImageSubresourceLayers structure

See Also

VK_EXT_host_image_copy, CopyMemoryToImageInfoEXT, Extent3D, ImageSubresourceLayers, Offset3D, StructureType

Constructors

MemoryToImageCopyEXT 

Fields

  • hostPointer :: Ptr ()

    pHostPointer is the host memory address which is the source of the copy.

  • memoryRowLength :: Word32

    memoryRowLength and memoryImageHeight specify in texels a subregion of a larger two- or three-dimensional image in host memory, and control the addressing calculations. If either of these values is zero, that aspect of the host memory is considered to be tightly packed according to the imageExtent.

  • memoryImageHeight :: Word32
     
  • imageSubresource :: ImageSubresourceLayers

    imageSubresource is a ImageSubresourceLayers used to specify the specific image subresources of the image used for the source or destination image data.

  • imageOffset :: Offset3D

    imageOffset selects the initial x, y, z offsets in texels of the sub-region of the destination image data.

  • imageExtent :: Extent3D

    imageExtent is the size in texels of the image to copy in width, height and depth.

Instances

Instances details
Storable MemoryToImageCopyEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

Show MemoryToImageCopyEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

FromCStruct MemoryToImageCopyEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

ToCStruct MemoryToImageCopyEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

Zero MemoryToImageCopyEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

data ImageToMemoryCopyEXT Source #

VkImageToMemoryCopyEXT - Structure specifying an image to host memory copy operation

Description

This structure is functionally similar to BufferImageCopy2, except it defines host memory as the target of copy instead of a buffer. In particular, the same data packing rules and restrictions as that structure apply here as well.

Valid Usage

  • pHostPointer must point to memory that is large enough to contain all memory locations that are accessed according to Buffer and Image Addressing, for each element of pRegions
  • The union of all source regions, and the union of all destination regions, specified by the elements of pRegions, must not overlap in memory
  • memoryRowLength must be 0, or greater than or equal to the width member of imageExtent
  • memoryImageHeight must be 0, or greater than or equal to the height member of imageExtent
  • The aspectMask member of imageSubresource must only have a single bit set
  • imageExtent.width must not be 0
  • imageExtent.height must not be 0
  • imageExtent.depth must not be 0

Valid Usage (Implicit)

  • pNext must be NULL
  • pHostPointer must be a pointer value
  • imageSubresource must be a valid ImageSubresourceLayers structure

See Also

VK_EXT_host_image_copy, CopyImageToMemoryInfoEXT, Extent3D, ImageSubresourceLayers, Offset3D, StructureType

Constructors

ImageToMemoryCopyEXT 

Fields

  • hostPointer :: Ptr ()

    pHostPointer is the host memory address which is the destination of the copy.

  • memoryRowLength :: Word32

    memoryRowLength and memoryImageHeight specify in texels a subregion of a larger two- or three-dimensional image in host memory, and control the addressing calculations. If either of these values is zero, that aspect of the host memory is considered to be tightly packed according to the imageExtent.

  • memoryImageHeight :: Word32
     
  • imageSubresource :: ImageSubresourceLayers

    imageSubresource is a ImageSubresourceLayers used to specify the specific image subresources of the image used for the source or destination image data.

  • imageOffset :: Offset3D

    imageOffset selects the initial x, y, z offsets in texels of the sub-region of the source image data.

  • imageExtent :: Extent3D

    imageExtent is the size in texels of the image to copy in width, height and depth.

Instances

Instances details
Storable ImageToMemoryCopyEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

Show ImageToMemoryCopyEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

FromCStruct ImageToMemoryCopyEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

ToCStruct ImageToMemoryCopyEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

Zero ImageToMemoryCopyEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

data CopyMemoryToImageInfoEXT Source #

VkCopyMemoryToImageInfoEXT - Structure specifying parameters of host memory to image copy command

Description

copyMemoryToImageEXT does not check whether the device memory associated with dstImage is currently in use before performing the copy. The application must guarantee that any previously submitted command that reads from or writes to the copy regions has completed before the host performs the copy.

Copy regions for the image must be aligned to a multiple of the texel block extent in each dimension, except at the edges of the image, where region extents must match the edge of the image.

Valid Usage

  • If dstImage is sparse then all memory ranges accessed by the copy command must be bound as described in Binding Resource Memory

Valid Usage (Implicit)

  • pNext must be NULL
  • flags must be a valid combination of HostImageCopyFlagBitsEXT values
  • dstImage must be a valid Image handle
  • dstImageLayout must be a valid ImageLayout value
  • pRegions must be a valid pointer to an array of regionCount valid MemoryToImageCopyEXT structures
  • regionCount must be greater than 0

See Also

VK_EXT_host_image_copy, HostImageCopyFlagsEXT, Image, ImageLayout, MemoryToImageCopyEXT, StructureType, copyMemoryToImageEXT

Constructors

CopyMemoryToImageInfoEXT 

Fields

data CopyImageToMemoryInfoEXT Source #

VkCopyImageToMemoryInfoEXT - Structure specifying parameters of an image to host memory copy command

Description

copyImageToMemoryEXT does not check whether the device memory associated with srcImage is currently in use before performing the copy. The application must guarantee that any previously submitted command that writes to the copy regions has completed before the host performs the copy.

Copy regions for the image must be aligned to a multiple of the texel block extent in each dimension, except at the edges of the image, where region extents must match the edge of the image.

Valid Usage

  • If srcImage is sparse then all memory ranges accessed by the copy command must be bound as described in Binding Resource Memory

Valid Usage (Implicit)

  • pNext must be NULL
  • flags must be a valid combination of HostImageCopyFlagBitsEXT values
  • srcImage must be a valid Image handle
  • srcImageLayout must be a valid ImageLayout value
  • pRegions must be a valid pointer to an array of regionCount valid ImageToMemoryCopyEXT structures
  • regionCount must be greater than 0

See Also

VK_EXT_host_image_copy, HostImageCopyFlagsEXT, Image, ImageLayout, ImageToMemoryCopyEXT, StructureType, copyImageToMemoryEXT

Constructors

CopyImageToMemoryInfoEXT 

Fields

data CopyImageToImageInfoEXT Source #

VkCopyImageToImageInfoEXT - Structure specifying parameters of an image to image host copy command

Description

copyImageToImageEXT does not check whether the device memory associated with srcImage or dstImage is currently in use before performing the copy. The application must guarantee that any previously submitted command that writes to the copy regions has completed before the host performs the copy.

Valid Usage

  • srcImage and dstImage must have been created with identical image creation parameters

Valid Usage (Implicit)

  • pNext must be NULL
  • flags must be a valid combination of HostImageCopyFlagBitsEXT values
  • srcImage must be a valid Image handle
  • srcImageLayout must be a valid ImageLayout value
  • dstImage must be a valid Image handle
  • dstImageLayout must be a valid ImageLayout value
  • pRegions must be a valid pointer to an array of regionCount valid ImageCopy2 structures
  • regionCount must be greater than 0
  • Both of dstImage, and srcImage must have been created, allocated, or retrieved from the same Device

See Also

VK_EXT_host_image_copy, HostImageCopyFlagsEXT, Image, ImageCopy2, ImageLayout, StructureType, copyImageToImageEXT

Constructors

CopyImageToImageInfoEXT 

Fields

data HostImageLayoutTransitionInfoEXT Source #

VkHostImageLayoutTransitionInfoEXT - Structure specifying the parameters of a host-side image layout transition

Description

transitionImageLayoutEXT does not check whether the device memory associated with an image is currently in use before performing the layout transition. The application must guarantee that any previously submitted command that reads from or writes to this subresource has completed before the host performs the layout transition. The memory of image is accessed by the host as if coherent.

Image layout transitions performed on the host do not require queue family ownership transfers as the physical layout of the image will not vary between queue families for the layouts supported by this function.

If the device has written to the image memory, it is not automatically made available to the host. Before this command can be called, a memory barrier for this image must have been issued on the device with the second synchronization scope including PIPELINE_STAGE_HOST_BIT and ACCESS_HOST_READ_BIT.

Because queue submissions automatically make host memory visible to the device, there would not be a need for a memory barrier before using the results of this layout transition on the device.

Valid Usage

Valid Usage (Implicit)

See Also

VK_EXT_host_image_copy, Image, ImageLayout, ImageSubresourceRange, StructureType, transitionImageLayoutEXT

Constructors

HostImageLayoutTransitionInfoEXT 

Fields

Instances

Instances details
Storable HostImageLayoutTransitionInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

Show HostImageLayoutTransitionInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

FromCStruct HostImageLayoutTransitionInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

ToCStruct HostImageLayoutTransitionInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

Zero HostImageLayoutTransitionInfoEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

data SubresourceHostMemcpySizeEXT Source #

VkSubresourceHostMemcpySizeEXT - Memory size needed to copy to or from an image on the host with VK_HOST_IMAGE_COPY_MEMCPY_EXT

Valid Usage (Implicit)

See Also

VK_EXT_host_image_copy, DeviceSize, StructureType

Constructors

SubresourceHostMemcpySizeEXT 

Fields

Instances

Instances details
Storable SubresourceHostMemcpySizeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

Show SubresourceHostMemcpySizeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

Eq SubresourceHostMemcpySizeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

FromCStruct SubresourceHostMemcpySizeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

ToCStruct SubresourceHostMemcpySizeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

Zero SubresourceHostMemcpySizeEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

data HostImageCopyDevicePerformanceQueryEXT Source #

VkHostImageCopyDevicePerformanceQueryEXT - Struct containing information about optimality of device access

Description

The implementation may return FALSE in optimalDeviceAccess if identicalMemoryLayout is FALSE. If identicalMemoryLayout is TRUE, optimalDeviceAccess must be TRUE.

The implementation may return TRUE in optimalDeviceAccess while identicalMemoryLayout is FALSE. In this situation, any device performance impact should not be measurable.

If PhysicalDeviceImageFormatInfo2::format is a block-compressed format and getPhysicalDeviceImageFormatProperties2 returns SUCCESS, the implementation must return TRUE in optimalDeviceAccess.

Applications can make use of optimalDeviceAccess to determine their resource copying strategy. If a resource is expected to be accessed more on device than on the host, and the implementation considers the resource sub-optimally accessed, it is likely better to use device copies instead.

Layout not being identical yet still considered optimal for device access could happen if the implementation has different memory layout patterns, some of which are easier to access on the host.

The most practical reason for optimalDeviceAccess to be FALSE is that host image access may disable framebuffer compression where it would otherwise have been enabled. This represents far more efficient host image access since no compression algorithm is required to read or write to the image, but it would impact device access performance. Some implementations may only set optimalDeviceAccess to FALSE if certain conditions are met, such as specific image usage flags or creation flags.

Valid Usage (Implicit)

See Also

VK_EXT_host_image_copy, Bool32, StructureType

Constructors

HostImageCopyDevicePerformanceQueryEXT 

Fields

Instances

Instances details
Storable HostImageCopyDevicePerformanceQueryEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

Show HostImageCopyDevicePerformanceQueryEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

Eq HostImageCopyDevicePerformanceQueryEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

FromCStruct HostImageCopyDevicePerformanceQueryEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

ToCStruct HostImageCopyDevicePerformanceQueryEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

Zero HostImageCopyDevicePerformanceQueryEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

newtype HostImageCopyFlagBitsEXT Source #

VkHostImageCopyFlagBitsEXT - Bitmask specifying additional copy parameters

See Also

VK_EXT_host_image_copy, HostImageCopyFlagsEXT

Bundled Patterns

pattern HOST_IMAGE_COPY_MEMCPY_EXT :: HostImageCopyFlagBitsEXT

HOST_IMAGE_COPY_MEMCPY_EXT specifies that no memory layout swizzling is to be applied during data copy. For copies between memory and images, this flag indicates that image data in host memory is swizzled in exactly the same way as the image data on the device. Using this flag indicates that the implementations may use a simple memory copy to transfer the data between the host memory and the device memory. The format of the swizzled data in host memory is platform dependent and is not defined in this specification.

Instances

Instances details
Storable HostImageCopyFlagBitsEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

Bits HostImageCopyFlagBitsEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

FiniteBits HostImageCopyFlagBitsEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

Read HostImageCopyFlagBitsEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

Show HostImageCopyFlagBitsEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

Eq HostImageCopyFlagBitsEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

Ord HostImageCopyFlagBitsEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

Zero HostImageCopyFlagBitsEXT Source # 
Instance details

Defined in Vulkan.Extensions.VK_EXT_host_image_copy

type EXT_HOST_IMAGE_COPY_EXTENSION_NAME = "VK_EXT_host_image_copy" Source #

pattern EXT_HOST_IMAGE_COPY_EXTENSION_NAME :: forall a. (Eq a, IsString a) => a Source #

data ImageSubresource2KHR Source #

Constructors

ImageSubresource2KHR 

Fields

Instances

Instances details
Storable ImageSubresource2KHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_maintenance5

Show ImageSubresource2KHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_maintenance5

FromCStruct ImageSubresource2KHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_maintenance5

ToCStruct ImageSubresource2KHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_maintenance5

Zero ImageSubresource2KHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_maintenance5

data SubresourceLayout2KHR (es :: [Type]) Source #

VkSubresourceLayout2KHR - Structure specifying subresource layout

Valid Usage (Implicit)

See Also

VK_EXT_host_image_copy, VK_EXT_image_compression_control, VK_KHR_maintenance5, StructureType, SubresourceLayout, getDeviceImageSubresourceLayoutKHR, getImageSubresourceLayout2EXT, getImageSubresourceLayout2KHR

Constructors

SubresourceLayout2KHR 

Fields

Instances

Instances details
Extensible SubresourceLayout2KHR Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_maintenance5

Methods

extensibleTypeName :: String Source #

getNext :: forall (es :: [Type]). SubresourceLayout2KHR es -> Chain es Source #

setNext :: forall (ds :: [Type]) (es :: [Type]). SubresourceLayout2KHR ds -> Chain es -> SubresourceLayout2KHR es Source #

extends :: forall e b proxy. Typeable e => proxy e -> (Extends SubresourceLayout2KHR e => b) -> Maybe b Source #

Show (Chain es) => Show (SubresourceLayout2KHR es) Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_maintenance5

(Extendss SubresourceLayout2KHR es, PeekChain es) => FromCStruct (SubresourceLayout2KHR es) Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_maintenance5

(Extendss SubresourceLayout2KHR es, PokeChain es) => ToCStruct (SubresourceLayout2KHR es) Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_maintenance5

es ~ ('[] :: [Type]) => Zero (SubresourceLayout2KHR es) Source # 
Instance details

Defined in Vulkan.Extensions.VK_KHR_maintenance5

getImageSubresourceLayout2KHR Source #

Arguments

:: forall a io. (Extendss SubresourceLayout2KHR a, PokeChain a, PeekChain a, MonadIO io) 
=> Device

device is the logical device that owns the image.

-> Image

image is the image whose layout is being queried.

-> ImageSubresource2KHR

pSubresource is a pointer to a ImageSubresource2KHR structure selecting a specific image for the image subresource.

-> 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 an image created with tiling equal to IMAGE_TILING_OPTIMAL, but the members of SubresourceLayout2KHR::subresourceLayout will have undefined values in this case.

Structures chained from ImageSubresource2KHR::pNext will also be updated when tiling is equal to IMAGE_TILING_OPTIMAL.

Valid Usage

  • The aspectMask member of pSubresource must only have a single bit set

Valid Usage (Implicit)

  • device must be a valid Device handle
  • image must be a valid Image handle
  • pSubresource must be a valid pointer to a valid ImageSubresource2KHR structure
  • pLayout must be a valid pointer to a SubresourceLayout2KHR structure
  • image must have been created, allocated, or retrieved from device

See Also

VK_KHR_maintenance5, Device, Image, ImageSubresource2KHR, SubresourceLayout2KHR