Package org.lwjgl.vulkan
Class VkCopyImageInfo2
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkCopyImageInfo2
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
- Direct Known Subclasses:
VkCopyImageInfo2KHR
public class VkCopyImageInfo2 extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure specifying parameters of an image copy command.Valid Usage
- The union of all source regions, and the union of all destination regions, specified by the elements of
pRegions, must not overlap in memory - The format features of
srcImagemust containFORMAT_FEATURE_TRANSFER_SRC_BIT srcImagemust have been created withIMAGE_USAGE_TRANSFER_SRC_BITusage flag- If
srcImageis non-sparse then the image or disjoint plane to be copied must be bound completely and contiguously to a singleVkDeviceMemoryobject srcImageLayoutmust specify the layout of the image subresources ofsrcImagespecified inpRegionsat the time this command is executed on aVkDevicesrcImageLayoutmust beIMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,IMAGE_LAYOUT_GENERAL, orIMAGE_LAYOUT_SHARED_PRESENT_KHR- The format features of
dstImagemust containFORMAT_FEATURE_TRANSFER_DST_BIT dstImagemust have been created withIMAGE_USAGE_TRANSFER_DST_BITusage flag- If
dstImageis non-sparse then the image or disjoint plane that is the destination of the copy must be bound completely and contiguously to a singleVkDeviceMemoryobject dstImageLayoutmust specify the layout of the image subresources ofdstImagespecified inpRegionsat the time this command is executed on aVkDevicedstImageLayoutmust beIMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,IMAGE_LAYOUT_GENERAL, orIMAGE_LAYOUT_SHARED_PRESENT_KHR- If the
VkFormatof each ofsrcImageanddstImageis not a multi-planar format, theVkFormatof each ofsrcImageanddstImagemust be compatible, as defined above - In a copy to or from a plane of a multi-planar image, the
VkFormatof the image and plane must be compatible according to the description of compatible planes for the plane being copied - The sample count of
srcImageanddstImagemust match - The
srcSubresource.mipLevelmember of each element ofpRegionsmust be less than themipLevelsspecified inVkImageCreateInfowhensrcImagewas created - The
dstSubresource.mipLevelmember of each element ofpRegionsmust be less than themipLevelsspecified inVkImageCreateInfowhendstImagewas created - The
srcSubresource.baseArrayLayer + srcSubresource.layerCountof each element ofpRegionsmust be less than or equal to thearrayLayersspecified inVkImageCreateInfowhensrcImagewas created - The
dstSubresource.baseArrayLayer + dstSubresource.layerCountof each element ofpRegionsmust be less than or equal to thearrayLayersspecified inVkImageCreateInfowhendstImagewas created - The
srcOffsetandextentmembers of each element ofpRegionsmust respect the image transfer granularity requirements ofcommandBuffer’s command pool’s queue family, as described inVkQueueFamilyProperties - The
dstOffsetandextentmembers of each element ofpRegionsmust respect the image transfer granularity requirements ofcommandBuffer’s command pool’s queue family, as described inVkQueueFamilyProperties dstImageandsrcImagemust not have been created withflagscontainingIMAGE_CREATE_SUBSAMPLED_BIT_EXT- If neither
srcImagenordstImagehas a multi-planar image format then for each element ofpRegions,srcSubresource.aspectMaskanddstSubresource.aspectMaskmust match - If
srcImagehas aVkFormatwith two planes then for each element ofpRegions,srcSubresource.aspectMaskmust beIMAGE_ASPECT_PLANE_0_BITorIMAGE_ASPECT_PLANE_1_BIT - If
srcImagehas aVkFormatwith three planes then for each element ofpRegions,srcSubresource.aspectMaskmust beIMAGE_ASPECT_PLANE_0_BIT,IMAGE_ASPECT_PLANE_1_BIT, orIMAGE_ASPECT_PLANE_2_BIT - If
dstImagehas aVkFormatwith two planes then for each element ofpRegions,dstSubresource.aspectMaskmust beIMAGE_ASPECT_PLANE_0_BITorIMAGE_ASPECT_PLANE_1_BIT - If
dstImagehas aVkFormatwith three planes then for each element ofpRegions,dstSubresource.aspectMaskmust beIMAGE_ASPECT_PLANE_0_BIT,IMAGE_ASPECT_PLANE_1_BIT, orIMAGE_ASPECT_PLANE_2_BIT - If
srcImagehas a multi-planar image format and thedstImagedoes not have a multi-planar image format, then for each element ofpRegions,dstSubresource.aspectMaskmust beIMAGE_ASPECT_COLOR_BIT - If
dstImagehas a multi-planar image format and thesrcImagedoes not have a multi-planar image format, then for each element ofpRegions,srcSubresource.aspectMaskmust beIMAGE_ASPECT_COLOR_BIT - If
srcImageis of typeIMAGE_TYPE_3D, then for each element ofpRegions,srcSubresource.baseArrayLayermust be 0 andsrcSubresource.layerCountmust be 1 - If
dstImageis of typeIMAGE_TYPE_3D, then for each element ofpRegions,dstSubresource.baseArrayLayermust be 0 anddstSubresource.layerCountmust be 1 - For each element of
pRegions,srcSubresource.aspectMaskmust specify aspects present insrcImage - For each element of
pRegions,dstSubresource.aspectMaskmust specify aspects present indstImage - For each element of
pRegions,srcOffset.xand(extent.width + srcOffset.x)must both be greater than or equal to 0 and less than or equal to the width of the specifiedsrcSubresourceofsrcImage - For each element of
pRegions,srcOffset.yand(extent.height + srcOffset.y)must both be greater than or equal to 0 and less than or equal to the height of the specifiedsrcSubresourceofsrcImage - If
srcImageis of typeIMAGE_TYPE_1D, then for each element ofpRegions,srcOffset.ymust be 0 andextent.heightmust be 1 - For each element of
pRegions,srcOffset.zand(extent.depth + srcOffset.z)must both be greater than or equal to 0 and less than or equal to the depth of the specifiedsrcSubresourceofsrcImage - If
srcImageis of typeIMAGE_TYPE_1D, then for each element ofpRegions,srcOffset.zmust be 0 andextent.depthmust be 1 - If
dstImageis of typeIMAGE_TYPE_1D, then for each element ofpRegions,dstOffset.zmust be 0 andextent.depthmust be 1 - If
srcImageis of typeIMAGE_TYPE_2D, then for each element ofpRegions,srcOffset.zmust be 0 - If
dstImageis of typeIMAGE_TYPE_2D, then for each element ofpRegions,dstOffset.zmust be 0 - If
srcImageanddstImageare both of typeIMAGE_TYPE_2D, then for each element ofpRegions,extent.depthmust be 1 - If
srcImageis of typeIMAGE_TYPE_2D, anddstImageis of typeIMAGE_TYPE_3D, then for each element ofpRegions,extent.depthmust equalsrcSubresource.layerCount - If
dstImageis of typeIMAGE_TYPE_2D, andsrcImageis of typeIMAGE_TYPE_3D, then for each element ofpRegions,extent.depthmust equaldstSubresource.layerCount - For each element of
pRegions,dstOffset.xand(extent.width + dstOffset.x)must both be greater than or equal to 0 and less than or equal to the width of the specifieddstSubresourceofdstImage - For each element of
pRegions,dstOffset.yand(extent.height + dstOffset.y)must both be greater than or equal to 0 and less than or equal to the height of the specifieddstSubresourceofdstImage - If
dstImageis of typeIMAGE_TYPE_1D, then for each element ofpRegions,dstOffset.ymust be 0 andextent.heightmust be 1 - For each element of
pRegions,dstOffset.zand(extent.depth + dstOffset.z)must both be greater than or equal to 0 and less than or equal to the depth of the specifieddstSubresourceofdstImage - If
srcImageis a blocked image, then for each element ofpRegions, all members ofsrcOffsetmust be a multiple of the corresponding dimensions of the compressed texel block - If
srcImageis a blocked image, then for each element ofpRegions,extent.widthmust be a multiple of the compressed texel block width or(extent.width + srcOffset.x)must equal the width of the specifiedsrcSubresourceofsrcImage - If
srcImageis a blocked image, then for each element ofpRegions,extent.heightmust be a multiple of the compressed texel block height or(extent.height + srcOffset.y)must equal the height of the specifiedsrcSubresourceofsrcImage - If
srcImageis a blocked image, then for each element ofpRegions,extent.depthmust be a multiple of the compressed texel block depth or(extent.depth + srcOffset.z)must equal the depth of the specifiedsrcSubresourceofsrcImage - If
dstImageis a blocked image, then for each element ofpRegions, all members ofdstOffsetmust be a multiple of the corresponding dimensions of the compressed texel block - If
dstImageis a blocked image, then for each element ofpRegions,extent.widthmust be a multiple of the compressed texel block width or(extent.width + dstOffset.x)must equal the width of the specifieddstSubresourceofdstImage - If
dstImageis a blocked image, then for each element ofpRegions,extent.heightmust be a multiple of the compressed texel block height or(extent.height + dstOffset.y)must equal the height of the specifieddstSubresourceofdstImage - If
dstImageis a blocked image, then for each element ofpRegions,extent.depthmust be a multiple of the compressed texel block depth or(extent.depth + dstOffset.z)must equal the depth of the specifieddstSubresourceofdstImage
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_COPY_IMAGE_INFO_2pNextmust beNULLsrcImagemust be a validVkImagehandlesrcImageLayoutmust be a validVkImageLayoutvaluedstImagemust be a validVkImagehandledstImageLayoutmust be a validVkImageLayoutvaluepRegionsmust be a valid pointer to an array ofregionCountvalidVkImageCopy2structuresregionCountmust be greater than 0- Both of
dstImage, andsrcImagemust have been created, allocated, or retrieved from the sameVkDevice
See Also
VkImageCopy2,CmdCopyImage2,CmdCopyImage2KHRLayout
struct VkCopyImageInfo2 { VkStructureTypesType(); void const *pNext(); VkImagesrcImage(); VkImageLayoutsrcImageLayout(); VkImagedstImage(); VkImageLayoutdstImageLayout(); uint32_tregionCount();VkImageCopy2const *pRegions(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkCopyImageInfo2.BufferAn array ofVkCopyImageInfo2structs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intDSTIMAGE
DSTIMAGELAYOUT
PNEXT
PREGIONS
REGIONCOUNTThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSRCIMAGE
SRCIMAGELAYOUT
STYPEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkCopyImageInfo2(java.nio.ByteBuffer container)Creates aVkCopyImageInfo2instance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkCopyImageInfo2calloc()Returns a newVkCopyImageInfo2instance allocated withmemCalloc.static VkCopyImageInfo2.Buffercalloc(int capacity)Returns a newVkCopyImageInfo2.Bufferinstance allocated withmemCalloc.static VkCopyImageInfo2.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkCopyImageInfo2.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkCopyImageInfo2calloc(org.lwjgl.system.MemoryStack stack)Returns a newVkCopyImageInfo2instance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkCopyImageInfo2create()Returns a newVkCopyImageInfo2instance allocated withBufferUtils.static VkCopyImageInfo2.Buffercreate(int capacity)Returns a newVkCopyImageInfo2.Bufferinstance allocated withBufferUtils.static VkCopyImageInfo2create(long address)Returns a newVkCopyImageInfo2instance for the specified memory address.static VkCopyImageInfo2.Buffercreate(long address, int capacity)Create aVkCopyImageInfo2.Bufferinstance at the specified memory.static VkCopyImageInfo2createSafe(long address)static VkCopyImageInfo2.BuffercreateSafe(long address, int capacity)longdstImage()the destination image.VkCopyImageInfo2dstImage(long value)Sets the specified value to thedstImage()field.intdstImageLayout()the current layout of the destination image subresource.VkCopyImageInfo2dstImageLayout(int value)Sets the specified value to thedstImageLayout()field.static VkCopyImageInfo2malloc()Returns a newVkCopyImageInfo2instance allocated withmemAlloc.static VkCopyImageInfo2.Buffermalloc(int capacity)Returns a newVkCopyImageInfo2.Bufferinstance allocated withmemAlloc.static VkCopyImageInfo2.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkCopyImageInfo2.Bufferinstance allocated on the specifiedMemoryStack.static VkCopyImageInfo2malloc(org.lwjgl.system.MemoryStack stack)Returns a newVkCopyImageInfo2instance allocated on the specifiedMemoryStack.static longndstImage(long struct)Unsafe version ofdstImage().static voidndstImage(long struct, long value)Unsafe version ofdstImage.static intndstImageLayout(long struct)Unsafe version ofdstImageLayout().static voidndstImageLayout(long struct, int value)Unsafe version ofdstImageLayout.static longnpNext(long struct)Unsafe version ofpNext().static voidnpNext(long struct, long value)Unsafe version ofpNext.static VkImageCopy2.BuffernpRegions(long struct)Unsafe version ofpRegions().static voidnpRegions(long struct, VkImageCopy2.Buffer value)Unsafe version ofpRegions.static intnregionCount(long struct)Unsafe version ofregionCount().static voidnregionCount(long struct, int value)Sets the specified value to theregionCountfield of the specifiedstruct.static longnsrcImage(long struct)Unsafe version ofsrcImage().static voidnsrcImage(long struct, long value)Unsafe version ofsrcImage.static intnsrcImageLayout(long struct)Unsafe version ofsrcImageLayout().static voidnsrcImageLayout(long struct, int value)Unsafe version ofsrcImageLayout.static intnsType(long struct)Unsafe version ofsType().static voidnsType(long struct, int value)Unsafe version ofsType.longpNext()NULLor a pointer to a structure extending this structure.VkCopyImageInfo2pNext(long value)Sets the specified value to thepNext()field.VkImageCopy2.BufferpRegions()a pointer to an array ofVkImageCopy2structures specifying the regions to copy.VkCopyImageInfo2pRegions(VkImageCopy2.Buffer value)Sets the address of the specifiedVkImageCopy2.Bufferto thepRegions()field.intregionCount()the number of regions to copy.VkCopyImageInfo2set(int sType, long pNext, long srcImage, int srcImageLayout, long dstImage, int dstImageLayout, VkImageCopy2.Buffer pRegions)Initializes this struct with the specified values.VkCopyImageInfo2set(VkCopyImageInfo2 src)Copies the specified struct data to this struct.intsizeof()longsrcImage()the source image.VkCopyImageInfo2srcImage(long value)Sets the specified value to thesrcImage()field.intsrcImageLayout()the current layout of the source image subresource.VkCopyImageInfo2srcImageLayout(int value)Sets the specified value to thesrcImageLayout()field.intsType()the type of this structure.VkCopyImageInfo2sType(int value)Sets the specified value to thesType()field.VkCopyImageInfo2sType$Default()Sets theSTRUCTURE_TYPE_COPY_IMAGE_INFO_2value to thesType()field.static voidvalidate(long struct)Validates pointer members that should not beNULL.
-
-
-
Constructor Detail
-
VkCopyImageInfo2
public VkCopyImageInfo2(java.nio.ByteBuffer container)
Creates aVkCopyImageInfo2instance at the current position of the specifiedByteBuffercontainer. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
sType
public int sType()
the type of this structure.
-
pNext
public long pNext()
NULLor a pointer to a structure extending this structure.
-
srcImage
public long srcImage()
the source image.
-
srcImageLayout
public int srcImageLayout()
the current layout of the source image subresource.
-
dstImage
public long dstImage()
the destination image.
-
dstImageLayout
public int dstImageLayout()
the current layout of the destination image subresource.
-
regionCount
public int regionCount()
the number of regions to copy.
-
pRegions
public VkImageCopy2.Buffer pRegions()
a pointer to an array ofVkImageCopy2structures specifying the regions to copy.
-
sType
public VkCopyImageInfo2 sType(int value)
Sets the specified value to thesType()field.
-
sType$Default
public VkCopyImageInfo2 sType$Default()
Sets theSTRUCTURE_TYPE_COPY_IMAGE_INFO_2value to thesType()field.
-
pNext
public VkCopyImageInfo2 pNext(long value)
Sets the specified value to thepNext()field.
-
srcImage
public VkCopyImageInfo2 srcImage(long value)
Sets the specified value to thesrcImage()field.
-
srcImageLayout
public VkCopyImageInfo2 srcImageLayout(int value)
Sets the specified value to thesrcImageLayout()field.
-
dstImage
public VkCopyImageInfo2 dstImage(long value)
Sets the specified value to thedstImage()field.
-
dstImageLayout
public VkCopyImageInfo2 dstImageLayout(int value)
Sets the specified value to thedstImageLayout()field.
-
pRegions
public VkCopyImageInfo2 pRegions(VkImageCopy2.Buffer value)
Sets the address of the specifiedVkImageCopy2.Bufferto thepRegions()field.
-
set
public VkCopyImageInfo2 set(int sType, long pNext, long srcImage, int srcImageLayout, long dstImage, int dstImageLayout, VkImageCopy2.Buffer pRegions)
Initializes this struct with the specified values.
-
set
public VkCopyImageInfo2 set(VkCopyImageInfo2 src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkCopyImageInfo2 malloc()
Returns a newVkCopyImageInfo2instance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkCopyImageInfo2 calloc()
Returns a newVkCopyImageInfo2instance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkCopyImageInfo2 create()
Returns a newVkCopyImageInfo2instance allocated withBufferUtils.
-
create
public static VkCopyImageInfo2 create(long address)
Returns a newVkCopyImageInfo2instance for the specified memory address.
-
createSafe
@Nullable public static VkCopyImageInfo2 createSafe(long address)
-
malloc
public static VkCopyImageInfo2.Buffer malloc(int capacity)
Returns a newVkCopyImageInfo2.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkCopyImageInfo2.Buffer calloc(int capacity)
Returns a newVkCopyImageInfo2.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkCopyImageInfo2.Buffer create(int capacity)
Returns a newVkCopyImageInfo2.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkCopyImageInfo2.Buffer create(long address, int capacity)
Create aVkCopyImageInfo2.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkCopyImageInfo2.Buffer createSafe(long address, int capacity)
-
malloc
public static VkCopyImageInfo2 malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkCopyImageInfo2instance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkCopyImageInfo2 calloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkCopyImageInfo2instance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkCopyImageInfo2.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkCopyImageInfo2.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static VkCopyImageInfo2.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkCopyImageInfo2.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nsType
public static int nsType(long struct)
Unsafe version ofsType().
-
npNext
public static long npNext(long struct)
Unsafe version ofpNext().
-
nsrcImage
public static long nsrcImage(long struct)
Unsafe version ofsrcImage().
-
nsrcImageLayout
public static int nsrcImageLayout(long struct)
Unsafe version ofsrcImageLayout().
-
ndstImage
public static long ndstImage(long struct)
Unsafe version ofdstImage().
-
ndstImageLayout
public static int ndstImageLayout(long struct)
Unsafe version ofdstImageLayout().
-
nregionCount
public static int nregionCount(long struct)
Unsafe version ofregionCount().
-
npRegions
public static VkImageCopy2.Buffer npRegions(long struct)
Unsafe version ofpRegions().
-
nsType
public static void nsType(long struct, int value)Unsafe version ofsType.
-
npNext
public static void npNext(long struct, long value)Unsafe version ofpNext.
-
nsrcImage
public static void nsrcImage(long struct, long value)Unsafe version ofsrcImage.
-
nsrcImageLayout
public static void nsrcImageLayout(long struct, int value)Unsafe version ofsrcImageLayout.
-
ndstImage
public static void ndstImage(long struct, long value)Unsafe version ofdstImage.
-
ndstImageLayout
public static void ndstImageLayout(long struct, int value)Unsafe version ofdstImageLayout.
-
nregionCount
public static void nregionCount(long struct, int value)Sets the specified value to theregionCountfield of the specifiedstruct.
-
npRegions
public static void npRegions(long struct, VkImageCopy2.Buffer value)Unsafe version ofpRegions.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-
-