All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.lwjgl.vulkan.VkCopyBufferToImageInfo2KHR Maven / Gradle / Ivy

Go to download

A new generation graphics and compute API that provides high-efficiency, cross-platform access to modern GPUs used in a wide variety of devices from PCs and consoles to mobile phones and embedded platforms.

There is a newer version: 3.3.4
Show newest version
/*
 * Copyright LWJGL. All rights reserved.
 * License terms: https://www.lwjgl.org/license
 * MACHINE GENERATED FILE, DO NOT EDIT
 */
package org.lwjgl.vulkan;

import javax.annotation.*;

import java.nio.*;

import org.lwjgl.*;
import org.lwjgl.system.*;

import static org.lwjgl.system.Checks.*;
import static org.lwjgl.system.MemoryUtil.*;
import static org.lwjgl.system.MemoryStack.*;

/**
 * Structure specifying parameters of a buffer to image copy command.
 * 
 * 
Valid Usage
* *
    *
  • If the image region specified by each element of {@code pRegions} does not contain {@link VkCopyCommandTransformInfoQCOM} in its {@code pNext} chain, it must be a region that is contained within the specified {@code imageSubresource} of {@code dstImage}
  • *
  • If the image region specified by each element of {@code pRegions} contains {@link VkCopyCommandTransformInfoQCOM} in its {@code pNext} chain, the rotated destination region as described in Buffer and Image Addressing with Rotation must be contained within {@code dstImage}
  • *
  • If any element of {@code pRegions} contains {@link VkCopyCommandTransformInfoQCOM} in its {@code pNext} chain, then {@code dstImage} must not be a blocked image
  • *
  • If any element of {@code pRegions} contains {@link VkCopyCommandTransformInfoQCOM} in its {@code pNext} chain, then {@code dstImage} must be of type {@link VK10#VK_IMAGE_TYPE_2D IMAGE_TYPE_2D}
  • *
  • If any element of {@code pRegions} contains {@link VkCopyCommandTransformInfoQCOM} in its {@code pNext} chain, then {@code dstImage} must not have a multi-planar format
  • *
* *
    *
  • {@code srcBuffer} must be large enough to contain all buffer locations that are accessed according to Buffer and Image Addressing, for each element of {@code pRegions}
  • *
  • The union of all source regions, and the union of all destination regions, specified by the elements of {@code pRegions}, must not overlap in memory
  • *
  • {@code srcBuffer} must have been created with {@link VK10#VK_BUFFER_USAGE_TRANSFER_SRC_BIT BUFFER_USAGE_TRANSFER_SRC_BIT} usage flag
  • *
  • The format features of {@code dstImage} must contain {@link VK11#VK_FORMAT_FEATURE_TRANSFER_DST_BIT FORMAT_FEATURE_TRANSFER_DST_BIT}
  • *
  • If {@code srcBuffer} is non-sparse then it must be bound completely and contiguously to a single {@code VkDeviceMemory} object
  • *
  • {@code dstImage} must have been created with {@link VK10#VK_IMAGE_USAGE_TRANSFER_DST_BIT IMAGE_USAGE_TRANSFER_DST_BIT} usage flag
  • *
  • If {@code dstImage} is non-sparse then it must be bound completely and contiguously to a single {@code VkDeviceMemory} object
  • *
  • {@code dstImage} must have a sample count equal to {@link VK10#VK_SAMPLE_COUNT_1_BIT SAMPLE_COUNT_1_BIT}
  • *
  • {@code dstImageLayout} must specify the layout of the image subresources of {@code dstImage} specified in {@code pRegions} at the time this command is executed on a {@code VkDevice}
  • *
  • {@code dstImageLayout} must be {@link VK10#VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL}, {@link VK10#VK_IMAGE_LAYOUT_GENERAL IMAGE_LAYOUT_GENERAL}, or {@link KHRSharedPresentableImage#VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR IMAGE_LAYOUT_SHARED_PRESENT_KHR}
  • *
  • The {@code imageSubresource.mipLevel} member of each element of {@code pRegions} must be less than the {@code mipLevels} specified in {@link VkImageCreateInfo} when {@code dstImage} was created
  • *
  • The imageSubresource.baseArrayLayer + imageSubresource.layerCount of each element of {@code pRegions} must be less than or equal to the {@code arrayLayers} specified in {@link VkImageCreateInfo} when {@code dstImage} was created
  • *
  • The {@code imageOffset} and {@code imageExtent} members of each element of {@code pRegions} must respect the image transfer granularity requirements of {@code commandBuffer}’s command pool’s queue family, as described in {@link VkQueueFamilyProperties}
  • *
  • {@code dstImage} must not have been created with {@code flags} containing {@link EXTFragmentDensityMap#VK_IMAGE_CREATE_SUBSAMPLED_BIT_EXT IMAGE_CREATE_SUBSAMPLED_BIT_EXT}
  • *
  • If the queue family used to create the {@code VkCommandPool} which {@code commandBuffer} was allocated from does not support {@link VK10#VK_QUEUE_GRAPHICS_BIT QUEUE_GRAPHICS_BIT}, for each element of {@code pRegions}, the {@code aspectMask} member of {@code imageSubresource} must not be {@link VK10#VK_IMAGE_ASPECT_DEPTH_BIT IMAGE_ASPECT_DEPTH_BIT} or {@link VK10#VK_IMAGE_ASPECT_STENCIL_BIT IMAGE_ASPECT_STENCIL_BIT}
  • *
  • For each element of {@code pRegions} not containing {@link VkCopyCommandTransformInfoQCOM} in its {@code pNext} chain, {@code imageOffset.x} and (imageExtent.width + imageOffset.x) must both be greater than or equal to 0 and less than or equal to the width of the specified {@code imageSubresource} of {@code dstImage}
  • *
  • For each element of {@code pRegions} not containing {@link VkCopyCommandTransformInfoQCOM} in its {@code pNext} chain, {@code imageOffset.y} and (imageExtent.height + imageOffset.y) must both be greater than or equal to 0 and less than or equal to the height of the specified {@code imageSubresource} of {@code dstImage}
  • *
* *
    *
  • If {@code srcImage} does not have either a depth/stencil or a multi-planar format, then for each element of {@code pRegions}, {@code bufferOffset} must be a multiple of the format’s texel block size
  • *
  • If {@code srcImage} has a multi-planar format, then for each element of {@code pRegions}, {@code bufferOffset} must be a multiple of the element size of the compatible format for the format and the {@code aspectMask} of the {@code imageSubresource} as defined in Compatible formats of planes of multi-planar formats
  • *
  • If {@code srcImage} is of type {@link VK10#VK_IMAGE_TYPE_1D IMAGE_TYPE_1D}, then for each element of {@code pRegions}, {@code imageOffset.y} must be 0 and {@code imageExtent.height} must be 1
  • *
  • For each element of {@code pRegions}, {@code imageOffset.z} and (imageExtent.depth + imageOffset.z) must both be greater than or equal to 0 and less than or equal to the depth of the specified {@code imageSubresource} of {@code srcImage}
  • *
  • If {@code srcImage} is of type {@link VK10#VK_IMAGE_TYPE_1D IMAGE_TYPE_1D} or {@link VK10#VK_IMAGE_TYPE_2D IMAGE_TYPE_2D}, then for each element of {@code pRegions}, {@code imageOffset.z} must be 0 and {@code imageExtent.depth} must be 1
  • *
  • If {@code srcImage} is a blocked image, for each element of {@code pRegions}, {@code bufferRowLength} must be a multiple of the compressed texel block width
  • *
  • If {@code srcImage} is a blocked image, for each element of {@code pRegions}, {@code bufferImageHeight} must be a multiple of the compressed texel block height
  • *
  • If {@code srcImage} is a blocked image, for each element of {@code pRegions}, all members of {@code imageOffset} must be a multiple of the corresponding dimensions of the compressed texel block
  • *
  • If {@code srcImage} is a blocked image, for each element of {@code pRegions}, {@code bufferOffset} must be a multiple of the compressed texel block size in bytes
  • *
  • If {@code srcImage} is a blocked image, for each element of {@code pRegions}, {@code imageExtent.width} must be a multiple of the compressed texel block width or (imageExtent.width + imageOffset.x) must equal the width of the specified {@code imageSubresource} of {@code srcImage}
  • *
  • If {@code srcImage} is a blocked image, for each element of {@code pRegions}, {@code imageExtent.height} must be a multiple of the compressed texel block height or (imageExtent.height + imageOffset.y) must equal the height of the specified {@code imageSubresource} of {@code srcImage}
  • *
  • If {@code srcImage} is a blocked image, for each element of {@code pRegions}, {@code imageExtent.depth} must be a multiple of the compressed texel block depth or (imageExtent.depth + imageOffset.z) must equal the depth of the specified {@code imageSubresource} of {@code srcImage}
  • *
  • For each element of {@code pRegions}, {@code imageSubresource.aspectMask} must specify aspects present in {@code srcImage}
  • *
  • If {@code srcImage} has a multi-planar format, then for each element of {@code pRegions}, {@code imageSubresource.aspectMask} must be {@link VK11#VK_IMAGE_ASPECT_PLANE_0_BIT IMAGE_ASPECT_PLANE_0_BIT}, {@link VK11#VK_IMAGE_ASPECT_PLANE_1_BIT IMAGE_ASPECT_PLANE_1_BIT}, or {@link VK11#VK_IMAGE_ASPECT_PLANE_2_BIT IMAGE_ASPECT_PLANE_2_BIT} (with {@link VK11#VK_IMAGE_ASPECT_PLANE_2_BIT IMAGE_ASPECT_PLANE_2_BIT} valid only for image formats with three planes)
  • *
  • If {@code srcImage} is of type {@link VK10#VK_IMAGE_TYPE_3D IMAGE_TYPE_3D}, for each element of {@code pRegions}, {@code imageSubresource.baseArrayLayer} must be 0 and {@code imageSubresource.layerCount} must be 1
  • *
  • If {@code srcImage} is not a blocked image, for each element of {@code pRegions}, {@code bufferRowLength} multiplied by the texel block size of {@code srcImage} must be less than or equal to 231-1
  • *
  • If {@code srcImage} is a blocked image, for each element of {@code pRegions}, {@code bufferRowLength} divided by the compressed texel block width and then multiplied by the texel block size of {@code srcImage} must be less than or equal to 231-1
  • *
  • If the queue family used to create the {@code VkCommandPool} which {@code commandBuffer} was allocated from does not support {@link VK10#VK_QUEUE_GRAPHICS_BIT QUEUE_GRAPHICS_BIT} or {@link VK10#VK_QUEUE_COMPUTE_BIT QUEUE_COMPUTE_BIT}, the {@code bufferOffset} member of any element of {@code pRegions} must be a multiple of 4
  • *
  • If {@code srcImage} has a depth/stencil format, the {@code bufferOffset} member of any element of {@code pRegions} must be a multiple of 4
  • *
* *
Valid Usage (Implicit)
* *
    *
  • {@code sType} must be {@link KHRCopyCommands2#VK_STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2_KHR STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2_KHR}
  • *
  • {@code pNext} must be {@code NULL}
  • *
  • {@code srcBuffer} must be a valid {@code VkBuffer} handle
  • *
  • {@code dstImage} must be a valid {@code VkImage} handle
  • *
  • {@code dstImageLayout} must be a valid {@code VkImageLayout} value
  • *
  • {@code pRegions} must be a valid pointer to an array of {@code regionCount} valid {@link VkBufferImageCopy2KHR} structures
  • *
  • {@code regionCount} must be greater than 0
  • *
  • Both of {@code dstImage}, and {@code srcBuffer} must have been created, allocated, or retrieved from the same {@code VkDevice}
  • *
* *
See Also
* *

{@link VkBufferImageCopy2KHR}, {@link KHRCopyCommands2#vkCmdCopyBufferToImage2KHR CmdCopyBufferToImage2KHR}

* *

Layout

* *

 * struct VkCopyBufferToImageInfo2KHR {
 *     VkStructureType {@link #sType};
 *     void const * {@link #pNext};
 *     VkBuffer {@link #srcBuffer};
 *     VkImage {@link #dstImage};
 *     VkImageLayout {@link #dstImageLayout};
 *     uint32_t {@link #regionCount};
 *     {@link VkBufferImageCopy2KHR VkBufferImageCopy2KHR} const * {@link #pRegions};
 * }
*/ public class VkCopyBufferToImageInfo2KHR extends Struct implements NativeResource { /** The struct size in bytes. */ public static final int SIZEOF; /** The struct alignment in bytes. */ public static final int ALIGNOF; /** The struct member offsets. */ public static final int STYPE, PNEXT, SRCBUFFER, DSTIMAGE, DSTIMAGELAYOUT, REGIONCOUNT, PREGIONS; static { Layout layout = __struct( __member(4), __member(POINTER_SIZE), __member(8), __member(8), __member(4), __member(4), __member(POINTER_SIZE) ); SIZEOF = layout.getSize(); ALIGNOF = layout.getAlignment(); STYPE = layout.offsetof(0); PNEXT = layout.offsetof(1); SRCBUFFER = layout.offsetof(2); DSTIMAGE = layout.offsetof(3); DSTIMAGELAYOUT = layout.offsetof(4); REGIONCOUNT = layout.offsetof(5); PREGIONS = layout.offsetof(6); } /** * Creates a {@code VkCopyBufferToImageInfo2KHR} instance at the current position of the specified {@link 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.

*/ public VkCopyBufferToImageInfo2KHR(ByteBuffer container) { super(memAddress(container), __checkContainer(container, SIZEOF)); } @Override public int sizeof() { return SIZEOF; } /** the type of this structure. */ @NativeType("VkStructureType") public int sType() { return nsType(address()); } /** {@code NULL} or a pointer to a structure extending this structure. */ @NativeType("void const *") public long pNext() { return npNext(address()); } /** the source buffer. */ @NativeType("VkBuffer") public long srcBuffer() { return nsrcBuffer(address()); } /** the destination image. */ @NativeType("VkImage") public long dstImage() { return ndstImage(address()); } /** the layout of the destination image subresources for the copy. */ @NativeType("VkImageLayout") public int dstImageLayout() { return ndstImageLayout(address()); } /** the number of regions to copy. */ @NativeType("uint32_t") public int regionCount() { return nregionCount(address()); } /** a pointer to an array of {@link VkBufferImageCopy2KHR} structures specifying the regions to copy. */ @NativeType("VkBufferImageCopy2KHR const *") public VkBufferImageCopy2KHR.Buffer pRegions() { return npRegions(address()); } /** Sets the specified value to the {@link #sType} field. */ public VkCopyBufferToImageInfo2KHR sType(@NativeType("VkStructureType") int value) { nsType(address(), value); return this; } /** Sets the {@link KHRCopyCommands2#VK_STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2_KHR STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2_KHR} value to the {@link #sType} field. */ public VkCopyBufferToImageInfo2KHR sType$Default() { return sType(KHRCopyCommands2.VK_STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2_KHR); } /** Sets the specified value to the {@link #pNext} field. */ public VkCopyBufferToImageInfo2KHR pNext(@NativeType("void const *") long value) { npNext(address(), value); return this; } /** Sets the specified value to the {@link #srcBuffer} field. */ public VkCopyBufferToImageInfo2KHR srcBuffer(@NativeType("VkBuffer") long value) { nsrcBuffer(address(), value); return this; } /** Sets the specified value to the {@link #dstImage} field. */ public VkCopyBufferToImageInfo2KHR dstImage(@NativeType("VkImage") long value) { ndstImage(address(), value); return this; } /** Sets the specified value to the {@link #dstImageLayout} field. */ public VkCopyBufferToImageInfo2KHR dstImageLayout(@NativeType("VkImageLayout") int value) { ndstImageLayout(address(), value); return this; } /** Sets the address of the specified {@link VkBufferImageCopy2KHR.Buffer} to the {@link #pRegions} field. */ public VkCopyBufferToImageInfo2KHR pRegions(@NativeType("VkBufferImageCopy2KHR const *") VkBufferImageCopy2KHR.Buffer value) { npRegions(address(), value); return this; } /** Initializes this struct with the specified values. */ public VkCopyBufferToImageInfo2KHR set( int sType, long pNext, long srcBuffer, long dstImage, int dstImageLayout, VkBufferImageCopy2KHR.Buffer pRegions ) { sType(sType); pNext(pNext); srcBuffer(srcBuffer); dstImage(dstImage); dstImageLayout(dstImageLayout); pRegions(pRegions); return this; } /** * Copies the specified struct data to this struct. * * @param src the source struct * * @return this struct */ public VkCopyBufferToImageInfo2KHR set(VkCopyBufferToImageInfo2KHR src) { memCopy(src.address(), address(), SIZEOF); return this; } // ----------------------------------- /** Returns a new {@code VkCopyBufferToImageInfo2KHR} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. */ public static VkCopyBufferToImageInfo2KHR malloc() { return wrap(VkCopyBufferToImageInfo2KHR.class, nmemAllocChecked(SIZEOF)); } /** Returns a new {@code VkCopyBufferToImageInfo2KHR} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. */ public static VkCopyBufferToImageInfo2KHR calloc() { return wrap(VkCopyBufferToImageInfo2KHR.class, nmemCallocChecked(1, SIZEOF)); } /** Returns a new {@code VkCopyBufferToImageInfo2KHR} instance allocated with {@link BufferUtils}. */ public static VkCopyBufferToImageInfo2KHR create() { ByteBuffer container = BufferUtils.createByteBuffer(SIZEOF); return wrap(VkCopyBufferToImageInfo2KHR.class, memAddress(container), container); } /** Returns a new {@code VkCopyBufferToImageInfo2KHR} instance for the specified memory address. */ public static VkCopyBufferToImageInfo2KHR create(long address) { return wrap(VkCopyBufferToImageInfo2KHR.class, address); } /** Like {@link #create(long) create}, but returns {@code null} if {@code address} is {@code NULL}. */ @Nullable public static VkCopyBufferToImageInfo2KHR createSafe(long address) { return address == NULL ? null : wrap(VkCopyBufferToImageInfo2KHR.class, address); } /** * Returns a new {@link VkCopyBufferToImageInfo2KHR.Buffer} instance allocated with {@link MemoryUtil#memAlloc memAlloc}. The instance must be explicitly freed. * * @param capacity the buffer capacity */ public static VkCopyBufferToImageInfo2KHR.Buffer malloc(int capacity) { return wrap(Buffer.class, nmemAllocChecked(__checkMalloc(capacity, SIZEOF)), capacity); } /** * Returns a new {@link VkCopyBufferToImageInfo2KHR.Buffer} instance allocated with {@link MemoryUtil#memCalloc memCalloc}. The instance must be explicitly freed. * * @param capacity the buffer capacity */ public static VkCopyBufferToImageInfo2KHR.Buffer calloc(int capacity) { return wrap(Buffer.class, nmemCallocChecked(capacity, SIZEOF), capacity); } /** * Returns a new {@link VkCopyBufferToImageInfo2KHR.Buffer} instance allocated with {@link BufferUtils}. * * @param capacity the buffer capacity */ public static VkCopyBufferToImageInfo2KHR.Buffer create(int capacity) { ByteBuffer container = __create(capacity, SIZEOF); return wrap(Buffer.class, memAddress(container), capacity, container); } /** * Create a {@link VkCopyBufferToImageInfo2KHR.Buffer} instance at the specified memory. * * @param address the memory address * @param capacity the buffer capacity */ public static VkCopyBufferToImageInfo2KHR.Buffer create(long address, int capacity) { return wrap(Buffer.class, address, capacity); } /** Like {@link #create(long, int) create}, but returns {@code null} if {@code address} is {@code NULL}. */ @Nullable public static VkCopyBufferToImageInfo2KHR.Buffer createSafe(long address, int capacity) { return address == NULL ? null : wrap(Buffer.class, address, capacity); } /** * Returns a new {@code VkCopyBufferToImageInfo2KHR} instance allocated on the specified {@link MemoryStack}. * * @param stack the stack from which to allocate */ public static VkCopyBufferToImageInfo2KHR malloc(MemoryStack stack) { return wrap(VkCopyBufferToImageInfo2KHR.class, stack.nmalloc(ALIGNOF, SIZEOF)); } /** * Returns a new {@code VkCopyBufferToImageInfo2KHR} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. * * @param stack the stack from which to allocate */ public static VkCopyBufferToImageInfo2KHR calloc(MemoryStack stack) { return wrap(VkCopyBufferToImageInfo2KHR.class, stack.ncalloc(ALIGNOF, 1, SIZEOF)); } /** * Returns a new {@link VkCopyBufferToImageInfo2KHR.Buffer} instance allocated on the specified {@link MemoryStack}. * * @param stack the stack from which to allocate * @param capacity the buffer capacity */ public static VkCopyBufferToImageInfo2KHR.Buffer malloc(int capacity, MemoryStack stack) { return wrap(Buffer.class, stack.nmalloc(ALIGNOF, capacity * SIZEOF), capacity); } /** * Returns a new {@link VkCopyBufferToImageInfo2KHR.Buffer} instance allocated on the specified {@link MemoryStack} and initializes all its bits to zero. * * @param stack the stack from which to allocate * @param capacity the buffer capacity */ public static VkCopyBufferToImageInfo2KHR.Buffer calloc(int capacity, MemoryStack stack) { return wrap(Buffer.class, stack.ncalloc(ALIGNOF, capacity, SIZEOF), capacity); } // ----------------------------------- /** Unsafe version of {@link #sType}. */ public static int nsType(long struct) { return UNSAFE.getInt(null, struct + VkCopyBufferToImageInfo2KHR.STYPE); } /** Unsafe version of {@link #pNext}. */ public static long npNext(long struct) { return memGetAddress(struct + VkCopyBufferToImageInfo2KHR.PNEXT); } /** Unsafe version of {@link #srcBuffer}. */ public static long nsrcBuffer(long struct) { return UNSAFE.getLong(null, struct + VkCopyBufferToImageInfo2KHR.SRCBUFFER); } /** Unsafe version of {@link #dstImage}. */ public static long ndstImage(long struct) { return UNSAFE.getLong(null, struct + VkCopyBufferToImageInfo2KHR.DSTIMAGE); } /** Unsafe version of {@link #dstImageLayout}. */ public static int ndstImageLayout(long struct) { return UNSAFE.getInt(null, struct + VkCopyBufferToImageInfo2KHR.DSTIMAGELAYOUT); } /** Unsafe version of {@link #regionCount}. */ public static int nregionCount(long struct) { return UNSAFE.getInt(null, struct + VkCopyBufferToImageInfo2KHR.REGIONCOUNT); } /** Unsafe version of {@link #pRegions}. */ public static VkBufferImageCopy2KHR.Buffer npRegions(long struct) { return VkBufferImageCopy2KHR.create(memGetAddress(struct + VkCopyBufferToImageInfo2KHR.PREGIONS), nregionCount(struct)); } /** Unsafe version of {@link #sType(int) sType}. */ public static void nsType(long struct, int value) { UNSAFE.putInt(null, struct + VkCopyBufferToImageInfo2KHR.STYPE, value); } /** Unsafe version of {@link #pNext(long) pNext}. */ public static void npNext(long struct, long value) { memPutAddress(struct + VkCopyBufferToImageInfo2KHR.PNEXT, value); } /** Unsafe version of {@link #srcBuffer(long) srcBuffer}. */ public static void nsrcBuffer(long struct, long value) { UNSAFE.putLong(null, struct + VkCopyBufferToImageInfo2KHR.SRCBUFFER, value); } /** Unsafe version of {@link #dstImage(long) dstImage}. */ public static void ndstImage(long struct, long value) { UNSAFE.putLong(null, struct + VkCopyBufferToImageInfo2KHR.DSTIMAGE, value); } /** Unsafe version of {@link #dstImageLayout(int) dstImageLayout}. */ public static void ndstImageLayout(long struct, int value) { UNSAFE.putInt(null, struct + VkCopyBufferToImageInfo2KHR.DSTIMAGELAYOUT, value); } /** Sets the specified value to the {@code regionCount} field of the specified {@code struct}. */ public static void nregionCount(long struct, int value) { UNSAFE.putInt(null, struct + VkCopyBufferToImageInfo2KHR.REGIONCOUNT, value); } /** Unsafe version of {@link #pRegions(VkBufferImageCopy2KHR.Buffer) pRegions}. */ public static void npRegions(long struct, VkBufferImageCopy2KHR.Buffer value) { memPutAddress(struct + VkCopyBufferToImageInfo2KHR.PREGIONS, value.address()); nregionCount(struct, value.remaining()); } /** * Validates pointer members that should not be {@code NULL}. * * @param struct the struct to validate */ public static void validate(long struct) { check(memGetAddress(struct + VkCopyBufferToImageInfo2KHR.PREGIONS)); } // ----------------------------------- /** An array of {@link VkCopyBufferToImageInfo2KHR} structs. */ public static class Buffer extends StructBuffer implements NativeResource { private static final VkCopyBufferToImageInfo2KHR ELEMENT_FACTORY = VkCopyBufferToImageInfo2KHR.create(-1L); /** * Creates a new {@code VkCopyBufferToImageInfo2KHR.Buffer} instance backed by the specified container. * * Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values * will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided * by {@link VkCopyBufferToImageInfo2KHR#SIZEOF}, and its mark will be undefined. * *

The created buffer instance holds a strong reference to the container object.

*/ public Buffer(ByteBuffer container) { super(container, container.remaining() / SIZEOF); } public Buffer(long address, int cap) { super(address, null, -1, 0, cap, cap); } Buffer(long address, @Nullable ByteBuffer container, int mark, int pos, int lim, int cap) { super(address, container, mark, pos, lim, cap); } @Override protected Buffer self() { return this; } @Override protected VkCopyBufferToImageInfo2KHR getElementFactory() { return ELEMENT_FACTORY; } /** @return the value of the {@link VkCopyBufferToImageInfo2KHR#sType} field. */ @NativeType("VkStructureType") public int sType() { return VkCopyBufferToImageInfo2KHR.nsType(address()); } /** @return the value of the {@link VkCopyBufferToImageInfo2KHR#pNext} field. */ @NativeType("void const *") public long pNext() { return VkCopyBufferToImageInfo2KHR.npNext(address()); } /** @return the value of the {@link VkCopyBufferToImageInfo2KHR#srcBuffer} field. */ @NativeType("VkBuffer") public long srcBuffer() { return VkCopyBufferToImageInfo2KHR.nsrcBuffer(address()); } /** @return the value of the {@link VkCopyBufferToImageInfo2KHR#dstImage} field. */ @NativeType("VkImage") public long dstImage() { return VkCopyBufferToImageInfo2KHR.ndstImage(address()); } /** @return the value of the {@link VkCopyBufferToImageInfo2KHR#dstImageLayout} field. */ @NativeType("VkImageLayout") public int dstImageLayout() { return VkCopyBufferToImageInfo2KHR.ndstImageLayout(address()); } /** @return the value of the {@link VkCopyBufferToImageInfo2KHR#regionCount} field. */ @NativeType("uint32_t") public int regionCount() { return VkCopyBufferToImageInfo2KHR.nregionCount(address()); } /** @return a {@link VkBufferImageCopy2KHR.Buffer} view of the struct array pointed to by the {@link VkCopyBufferToImageInfo2KHR#pRegions} field. */ @NativeType("VkBufferImageCopy2KHR const *") public VkBufferImageCopy2KHR.Buffer pRegions() { return VkCopyBufferToImageInfo2KHR.npRegions(address()); } /** Sets the specified value to the {@link VkCopyBufferToImageInfo2KHR#sType} field. */ public VkCopyBufferToImageInfo2KHR.Buffer sType(@NativeType("VkStructureType") int value) { VkCopyBufferToImageInfo2KHR.nsType(address(), value); return this; } /** Sets the {@link KHRCopyCommands2#VK_STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2_KHR STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2_KHR} value to the {@link VkCopyBufferToImageInfo2KHR#sType} field. */ public VkCopyBufferToImageInfo2KHR.Buffer sType$Default() { return sType(KHRCopyCommands2.VK_STRUCTURE_TYPE_COPY_BUFFER_TO_IMAGE_INFO_2_KHR); } /** Sets the specified value to the {@link VkCopyBufferToImageInfo2KHR#pNext} field. */ public VkCopyBufferToImageInfo2KHR.Buffer pNext(@NativeType("void const *") long value) { VkCopyBufferToImageInfo2KHR.npNext(address(), value); return this; } /** Sets the specified value to the {@link VkCopyBufferToImageInfo2KHR#srcBuffer} field. */ public VkCopyBufferToImageInfo2KHR.Buffer srcBuffer(@NativeType("VkBuffer") long value) { VkCopyBufferToImageInfo2KHR.nsrcBuffer(address(), value); return this; } /** Sets the specified value to the {@link VkCopyBufferToImageInfo2KHR#dstImage} field. */ public VkCopyBufferToImageInfo2KHR.Buffer dstImage(@NativeType("VkImage") long value) { VkCopyBufferToImageInfo2KHR.ndstImage(address(), value); return this; } /** Sets the specified value to the {@link VkCopyBufferToImageInfo2KHR#dstImageLayout} field. */ public VkCopyBufferToImageInfo2KHR.Buffer dstImageLayout(@NativeType("VkImageLayout") int value) { VkCopyBufferToImageInfo2KHR.ndstImageLayout(address(), value); return this; } /** Sets the address of the specified {@link VkBufferImageCopy2KHR.Buffer} to the {@link VkCopyBufferToImageInfo2KHR#pRegions} field. */ public VkCopyBufferToImageInfo2KHR.Buffer pRegions(@NativeType("VkBufferImageCopy2KHR const *") VkBufferImageCopy2KHR.Buffer value) { VkCopyBufferToImageInfo2KHR.npRegions(address(), value); return this; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy