Class VkBlitImageInfo2

java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkBlitImageInfo2>
org.lwjgl.vulkan.VkBlitImageInfo2
All Implemented Interfaces:
AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer
Direct Known Subclasses:
VkBlitImageInfo2KHR

public class VkBlitImageInfo2 extends org.lwjgl.system.Struct<VkBlitImageInfo2> implements org.lwjgl.system.NativeResource
Structure specifying parameters of blit image command.
Valid Usage
  • The source region specified by each element of pRegions must be a region that is contained within srcImage
  • The destination region specified by each element of pRegions must be a region that is contained within dstImage
  • The union of all destination regions, specified by the elements of pRegions, must not overlap in memory with any texel that may be sampled during the blit operation
  • The format features of srcImage must contain FORMAT_FEATURE_BLIT_SRC_BIT
  • srcImage must not use a format that requires a sampler Y′CBCR conversion
  • srcImage must have been created with IMAGE_USAGE_TRANSFER_SRC_BIT usage flag
  • If srcImage is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object
  • srcImageLayout must specify the layout of the image subresources of srcImage specified in pRegions at the time this command is executed on a VkDevice
  • srcImageLayout must be IMAGE_LAYOUT_SHARED_PRESENT_KHR, IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL or IMAGE_LAYOUT_GENERAL
  • The format features of dstImage must contain FORMAT_FEATURE_BLIT_DST_BIT
  • dstImage must not use a format that requires a sampler Y′CBCR conversion
  • dstImage must have been created with IMAGE_USAGE_TRANSFER_DST_BIT usage flag
  • If dstImage is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory object
  • dstImageLayout must specify the layout of the image subresources of dstImage specified in pRegions at the time this command is executed on a VkDevice
  • dstImageLayout must be IMAGE_LAYOUT_SHARED_PRESENT_KHR, IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL or IMAGE_LAYOUT_GENERAL
  • If either of srcImage or dstImage was created with a signed integer VkFormat, the other must also have been created with a signed integer VkFormat
  • If either of srcImage or dstImage was created with an unsigned integer VkFormat, the other must also have been created with an unsigned integer VkFormat
  • If either of srcImage or dstImage was created with a depth/stencil format, the other must have exactly the same format
  • If srcImage was created with a depth/stencil format, filter must be FILTER_NEAREST
  • srcImage must have been created with a samples value of SAMPLE_COUNT_1_BIT
  • dstImage must have been created with a samples value of SAMPLE_COUNT_1_BIT
  • If filter is FILTER_LINEAR, then the format features of srcImage must contain FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_LINEAR_BIT
  • If filter is FILTER_CUBIC_EXT, then the format features of srcImage must contain FORMAT_FEATURE_SAMPLED_IMAGE_FILTER_CUBIC_BIT_EXT
  • If filter is FILTER_CUBIC_EXT, srcImage must be of type IMAGE_TYPE_2D
  • The srcSubresource.mipLevel member of each element of pRegions must be less than the mipLevels specified in VkImageCreateInfo when srcImage was created
  • The dstSubresource.mipLevel member of each element of pRegions must be less than the mipLevels specified in VkImageCreateInfo when dstImage was created
  • The srcSubresource.baseArrayLayer + srcSubresource.layerCount of each element of pRegions , if srcSubresource.layerCount is not REMAINING_ARRAY_LAYERS and maintenance5 is not enabled, must be less than or equal to the arrayLayers specified in VkImageCreateInfo when srcImage was created
  • The dstSubresource.baseArrayLayer + dstSubresource.layerCount of each element of pRegions , if srcSubresource.layerCount is not REMAINING_ARRAY_LAYERS and maintenance5 is not enabled, must be less than or equal to the arrayLayers specified in VkImageCreateInfo when dstImage was created
  • dstImage and srcImage must not have been created with flags containing IMAGE_CREATE_SUBSAMPLED_BIT_EXT
  • If either srcImage or dstImage is of type IMAGE_TYPE_3D, then for each element of pRegions, srcSubresource.baseArrayLayer and dstSubresource.baseArrayLayer must each be 0, and srcSubresource.layerCount and dstSubresource.layerCount must each be 1
  • For each element of pRegions, srcSubresource.aspectMask must specify aspects present in srcImage
  • For each element of pRegions, dstSubresource.aspectMask must specify aspects present in dstImage
  • For each element of pRegions, srcOffsets[0].x and srcOffsets[1].x must both be greater than or equal to 0 and less than or equal to the width of the specified srcSubresource of srcImage
  • For each element of pRegions, srcOffsets[0].y and srcOffsets[1].y must both be greater than or equal to 0 and less than or equal to the height of the specified srcSubresource of srcImage
  • If srcImage is of type IMAGE_TYPE_1D, then for each element of pRegions, srcOffsets[0].y must be 0 and srcOffsets[1].y must be 1
  • For each element of pRegions, srcOffsets[0].z and srcOffsets[1].z must both be greater than or equal to 0 and less than or equal to the depth of the specified srcSubresource of srcImage
  • If srcImage is of type IMAGE_TYPE_1D or IMAGE_TYPE_2D, then for each element of pRegions, srcOffsets[0].z must be 0 and srcOffsets[1].z must be 1
  • For each element of pRegions, dstOffsets[0].x and dstOffsets[1].x must both be greater than or equal to 0 and less than or equal to the width of the specified dstSubresource of dstImage
  • For each element of pRegions, dstOffsets[0].y and dstOffsets[1].y must both be greater than or equal to 0 and less than or equal to the height of the specified dstSubresource of dstImage
  • If dstImage is of type IMAGE_TYPE_1D, then for each element of pRegions, dstOffsets[0].y must be 0 and dstOffsets[1].y must be 1
  • For each element of pRegions, dstOffsets[0].z and dstOffsets[1].z must both be greater than or equal to 0 and less than or equal to the depth of the specified dstSubresource of dstImage
  • If dstImage is of type IMAGE_TYPE_1D or IMAGE_TYPE_2D, then for each element of pRegions, dstOffsets[0].z must be 0 and dstOffsets[1].z must be 1
  • If any element of pRegions contains VkCopyCommandTransformInfoQCOM in its pNext chain, then srcImage and dstImage must not be block-compressed images
  • If any element of pRegions contains VkCopyCommandTransformInfoQCOM in its pNext chain, then srcImage must be of type IMAGE_TYPE_2D
  • If any element of pRegions contains VkCopyCommandTransformInfoQCOM in its pNext chain, then srcImage must not have a multi-planar format
  • If filter is FILTER_CUBIC_EXT and if the selectableCubicWeights feature is not enabled then the cubic weights must be CUBIC_FILTER_WEIGHTS_CATMULL_ROM_QCOM
Valid Usage (Implicit)
  • sType must be STRUCTURE_TYPE_BLIT_IMAGE_INFO_2
  • pNext must be NULL or a pointer to a valid instance of VkBlitImageCubicWeightsInfoQCOM
  • The sType value of each struct in the pNext chain must be unique
  • srcImage must be a valid VkImage handle
  • srcImageLayout must be a valid VkImageLayout value
  • dstImage must be a valid VkImage handle
  • dstImageLayout must be a valid VkImageLayout value
  • pRegions must be a valid pointer to an array of regionCount valid VkImageBlit2 structures
  • filter must be a valid VkFilter value
  • regionCount must be greater than 0
  • Both of dstImage, and srcImage must have been created, allocated, or retrieved from the same VkDevice
See Also

VkImageBlit2, CmdBlitImage2, CmdBlitImage2KHR

Layout


 struct VkBlitImageInfo2 {
     VkStructureType sType();
     void const * pNext();
     VkImage srcImage();
     VkImageLayout srcImageLayout();
     VkImage dstImage();
     VkImageLayout dstImageLayout();
     uint32_t regionCount();
     VkImageBlit2 const * pRegions();
     VkFilter filter();
 }
  • Field Details

    • SIZEOF

      public static final int SIZEOF
      The struct size in bytes.
    • ALIGNOF

      public static final int ALIGNOF
      The struct alignment in bytes.
    • STYPE

      public static final int STYPE
      The struct member offsets.
    • PNEXT

      public static final int PNEXT
      The struct member offsets.
    • SRCIMAGE

      public static final int SRCIMAGE
      The struct member offsets.
    • SRCIMAGELAYOUT

      public static final int SRCIMAGELAYOUT
      The struct member offsets.
    • DSTIMAGE

      public static final int DSTIMAGE
      The struct member offsets.
    • DSTIMAGELAYOUT

      public static final int DSTIMAGELAYOUT
      The struct member offsets.
    • REGIONCOUNT

      public static final int REGIONCOUNT
      The struct member offsets.
    • PREGIONS

      public static final int PREGIONS
      The struct member offsets.
    • FILTER

      public static final int FILTER
      The struct member offsets.
  • Constructor Details

    • VkBlitImageInfo2

      public VkBlitImageInfo2(ByteBuffer container)
      Creates a VkBlitImageInfo2 instance at the current position of the specified ByteBuffer container. 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 Details

    • sizeof

      public int sizeof()
      Specified by:
      sizeof in class org.lwjgl.system.Struct<VkBlitImageInfo2>
    • sType

      public int sType()
      a VkStructureType value identifying this structure.
    • pNext

      public long pNext()
      NULL or a pointer to a structure extending this structure.
    • srcImage

      public long srcImage()
      the source image.
    • srcImageLayout

      public int srcImageLayout()
      the layout of the source image subresources for the blit.
    • dstImage

      public long dstImage()
      the destination image.
    • dstImageLayout

      public int dstImageLayout()
      the layout of the destination image subresources for the blit.
    • regionCount

      public int regionCount()
      the number of regions to blit.
    • pRegions

      public VkImageBlit2.Buffer pRegions()
      a pointer to an array of VkImageBlit2 structures specifying the regions to blit.
    • filter

      public int filter()
      a VkFilter specifying the filter to apply if the blits require scaling.
    • sType

      public VkBlitImageInfo2 sType(int value)
      Sets the specified value to the sType() field.
    • sType$Default

      public VkBlitImageInfo2 sType$Default()
      Sets the STRUCTURE_TYPE_BLIT_IMAGE_INFO_2 value to the sType() field.
    • pNext

      public VkBlitImageInfo2 pNext(long value)
      Sets the specified value to the pNext() field.
    • pNext

      Prepends the specified VkBlitImageCubicWeightsInfoQCOM value to the pNext chain.
    • srcImage

      public VkBlitImageInfo2 srcImage(long value)
      Sets the specified value to the srcImage() field.
    • srcImageLayout

      public VkBlitImageInfo2 srcImageLayout(int value)
      Sets the specified value to the srcImageLayout() field.
    • dstImage

      public VkBlitImageInfo2 dstImage(long value)
      Sets the specified value to the dstImage() field.
    • dstImageLayout

      public VkBlitImageInfo2 dstImageLayout(int value)
      Sets the specified value to the dstImageLayout() field.
    • pRegions

      public VkBlitImageInfo2 pRegions(VkImageBlit2.Buffer value)
      Sets the address of the specified VkImageBlit2.Buffer to the pRegions() field.
    • filter

      public VkBlitImageInfo2 filter(int value)
      Sets the specified value to the filter() field.
    • set

      public VkBlitImageInfo2 set(int sType, long pNext, long srcImage, int srcImageLayout, long dstImage, int dstImageLayout, VkImageBlit2.Buffer pRegions, int filter)
      Initializes this struct with the specified values.
    • set

      Copies the specified struct data to this struct.
      Parameters:
      src - the source struct
      Returns:
      this struct
    • malloc

      public static VkBlitImageInfo2 malloc()
      Returns a new VkBlitImageInfo2 instance allocated with memAlloc. The instance must be explicitly freed.
    • calloc

      public static VkBlitImageInfo2 calloc()
      Returns a new VkBlitImageInfo2 instance allocated with memCalloc. The instance must be explicitly freed.
    • create

      public static VkBlitImageInfo2 create()
      Returns a new VkBlitImageInfo2 instance allocated with BufferUtils.
    • create

      public static VkBlitImageInfo2 create(long address)
      Returns a new VkBlitImageInfo2 instance for the specified memory address.
    • createSafe

      @Nullable public static VkBlitImageInfo2 createSafe(long address)
      Like create, but returns null if address is NULL.
    • malloc

      public static VkBlitImageInfo2.Buffer malloc(int capacity)
      Returns a new VkBlitImageInfo2.Buffer instance allocated with memAlloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • calloc

      public static VkBlitImageInfo2.Buffer calloc(int capacity)
      Returns a new VkBlitImageInfo2.Buffer instance allocated with memCalloc. The instance must be explicitly freed.
      Parameters:
      capacity - the buffer capacity
    • create

      public static VkBlitImageInfo2.Buffer create(int capacity)
      Returns a new VkBlitImageInfo2.Buffer instance allocated with BufferUtils.
      Parameters:
      capacity - the buffer capacity
    • create

      public static VkBlitImageInfo2.Buffer create(long address, int capacity)
      Create a VkBlitImageInfo2.Buffer instance at the specified memory.
      Parameters:
      address - the memory address
      capacity - the buffer capacity
    • createSafe

      @Nullable public static VkBlitImageInfo2.Buffer createSafe(long address, int capacity)
      Like create, but returns null if address is NULL.
    • malloc

      public static VkBlitImageInfo2 malloc(org.lwjgl.system.MemoryStack stack)
      Returns a new VkBlitImageInfo2 instance allocated on the specified MemoryStack.
      Parameters:
      stack - the stack from which to allocate
    • calloc

      public static VkBlitImageInfo2 calloc(org.lwjgl.system.MemoryStack stack)
      Returns a new VkBlitImageInfo2 instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      stack - the stack from which to allocate
    • malloc

      public static VkBlitImageInfo2.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new VkBlitImageInfo2.Buffer instance allocated on the specified MemoryStack.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • calloc

      public static VkBlitImageInfo2.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
      Returns a new VkBlitImageInfo2.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
      Parameters:
      capacity - the buffer capacity
      stack - the stack from which to allocate
    • nsType

      public static int nsType(long struct)
      Unsafe version of sType().
    • npNext

      public static long npNext(long struct)
      Unsafe version of pNext().
    • nsrcImage

      public static long nsrcImage(long struct)
      Unsafe version of srcImage().
    • nsrcImageLayout

      public static int nsrcImageLayout(long struct)
      Unsafe version of srcImageLayout().
    • ndstImage

      public static long ndstImage(long struct)
      Unsafe version of dstImage().
    • ndstImageLayout

      public static int ndstImageLayout(long struct)
      Unsafe version of dstImageLayout().
    • nregionCount

      public static int nregionCount(long struct)
      Unsafe version of regionCount().
    • npRegions

      public static VkImageBlit2.Buffer npRegions(long struct)
      Unsafe version of pRegions().
    • nfilter

      public static int nfilter(long struct)
      Unsafe version of filter().
    • nsType

      public static void nsType(long struct, int value)
      Unsafe version of sType.
    • npNext

      public static void npNext(long struct, long value)
      Unsafe version of pNext.
    • nsrcImage

      public static void nsrcImage(long struct, long value)
      Unsafe version of srcImage.
    • nsrcImageLayout

      public static void nsrcImageLayout(long struct, int value)
      Unsafe version of srcImageLayout.
    • ndstImage

      public static void ndstImage(long struct, long value)
      Unsafe version of dstImage.
    • ndstImageLayout

      public static void ndstImageLayout(long struct, int value)
      Unsafe version of dstImageLayout.
    • nregionCount

      public static void nregionCount(long struct, int value)
      Sets the specified value to the regionCount field of the specified struct.
    • npRegions

      public static void npRegions(long struct, VkImageBlit2.Buffer value)
      Unsafe version of pRegions.
    • nfilter

      public static void nfilter(long struct, int value)
      Unsafe version of filter.
    • validate

      public static void validate(long struct)
      Validates pointer members that should not be NULL.
      Parameters:
      struct - the struct to validate