Class VkSampleLocationsInfoEXT
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkSampleLocationsInfoEXT
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkSampleLocationsInfoEXT extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure specifying a set of sample locations.Description
This structure can be used either to specify the sample locations to be used for rendering or to specify the set of sample locations an image subresource has been last rendered with for the purposes of layout transitions of depth/stencil images created with
IMAGE_CREATE_SAMPLE_LOCATIONS_COMPATIBLE_DEPTH_BIT_EXT.The sample locations in
pSampleLocationsspecifysampleLocationsPerPixelnumber of sample locations for each pixel in the grid of the size specified insampleLocationGridSize. The sample location for sampleiat the pixel grid location(x,y)is taken frompSampleLocations[(x + y sampleLocationGridSize.width) sampleLocationsPerPixel + i].If the render pass has a fragment density map, the implementation will choose the sample locations for the fragment and the contents of
pSampleLocationsmay be ignored.Valid Usage
sampleLocationsPerPixelmust be a bit value that is set inVkPhysicalDeviceSampleLocationsPropertiesEXT::sampleLocationSampleCountssampleLocationsCountmust equalsampleLocationsPerPixel × sampleLocationGridSize.width × sampleLocationGridSize.height
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT- If
sampleLocationsPerPixelis not 0,sampleLocationsPerPixelmust be a validVkSampleCountFlagBitsvalue - If
sampleLocationsCountis not 0,pSampleLocationsmust be a valid pointer to an array ofsampleLocationsCountVkSampleLocationEXTstructures
See Also
VkAttachmentSampleLocationsEXT,VkExtent2D,VkPipelineSampleLocationsStateCreateInfoEXT,VkSampleLocationEXT,VkSubpassSampleLocationsEXT,CmdSetSampleLocationsEXTMember documentation
sType– the type of this structure.pNext–NULLor a pointer to an extension-specific structure.sampleLocationsPerPixel– aVkSampleCountFlagBitsspecifying the number of sample locations per pixel.sampleLocationGridSize– the size of the sample location grid to select custom sample locations for.sampleLocationsCount– the number of sample locations inpSampleLocations.pSampleLocations– an array ofsampleLocationsCountVkSampleLocationEXTstructures.
Layout
struct VkSampleLocationsInfoEXT { VkStructureType sType; void const * pNext; VkSampleCountFlagBits sampleLocationsPerPixel;VkExtent2DsampleLocationGridSize; uint32_t sampleLocationsCount;VkSampleLocationEXTconst * pSampleLocations; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkSampleLocationsInfoEXT.BufferAn array ofVkSampleLocationsInfoEXTstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intPNEXT
PSAMPLELOCATIONS
SAMPLELOCATIONGRIDSIZE
SAMPLELOCATIONSCOUNT
SAMPLELOCATIONSPERPIXELThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSTYPEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkSampleLocationsInfoEXT(java.nio.ByteBuffer container)Creates aVkSampleLocationsInfoEXTinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkSampleLocationsInfoEXTcalloc()Returns a newVkSampleLocationsInfoEXTinstance allocated withmemCalloc.static VkSampleLocationsInfoEXT.Buffercalloc(int capacity)Returns a newVkSampleLocationsInfoEXT.Bufferinstance allocated withmemCalloc.static VkSampleLocationsInfoEXTcallocStack()Returns a newVkSampleLocationsInfoEXTinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkSampleLocationsInfoEXT.BuffercallocStack(int capacity)Returns a newVkSampleLocationsInfoEXT.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkSampleLocationsInfoEXT.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkSampleLocationsInfoEXT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkSampleLocationsInfoEXTcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkSampleLocationsInfoEXTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkSampleLocationsInfoEXTcreate()Returns a newVkSampleLocationsInfoEXTinstance allocated withBufferUtils.static VkSampleLocationsInfoEXT.Buffercreate(int capacity)Returns a newVkSampleLocationsInfoEXT.Bufferinstance allocated withBufferUtils.static VkSampleLocationsInfoEXTcreate(long address)Returns a newVkSampleLocationsInfoEXTinstance for the specified memory address.static VkSampleLocationsInfoEXT.Buffercreate(long address, int capacity)Create aVkSampleLocationsInfoEXT.Bufferinstance at the specified memory.static VkSampleLocationsInfoEXTcreateSafe(long address)static VkSampleLocationsInfoEXT.BuffercreateSafe(long address, int capacity)static VkSampleLocationsInfoEXTmalloc()Returns a newVkSampleLocationsInfoEXTinstance allocated withmemAlloc.static VkSampleLocationsInfoEXT.Buffermalloc(int capacity)Returns a newVkSampleLocationsInfoEXT.Bufferinstance allocated withmemAlloc.static VkSampleLocationsInfoEXTmallocStack()Returns a newVkSampleLocationsInfoEXTinstance allocated on the thread-localMemoryStack.static VkSampleLocationsInfoEXT.BuffermallocStack(int capacity)Returns a newVkSampleLocationsInfoEXT.Bufferinstance allocated on the thread-localMemoryStack.static VkSampleLocationsInfoEXT.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkSampleLocationsInfoEXT.Bufferinstance allocated on the specifiedMemoryStack.static VkSampleLocationsInfoEXTmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkSampleLocationsInfoEXTinstance allocated on the specifiedMemoryStack.static longnpNext(long struct)Unsafe version ofpNext().static voidnpNext(long struct, long value)Unsafe version ofpNext.static VkSampleLocationEXT.BuffernpSampleLocations(long struct)Unsafe version ofpSampleLocations().static voidnpSampleLocations(long struct, VkSampleLocationEXT.Buffer value)Unsafe version ofpSampleLocations.static VkExtent2DnsampleLocationGridSize(long struct)Unsafe version ofsampleLocationGridSize().static voidnsampleLocationGridSize(long struct, VkExtent2D value)Unsafe version ofsampleLocationGridSize.static intnsampleLocationsCount(long struct)Unsafe version ofsampleLocationsCount().static voidnsampleLocationsCount(long struct, int value)Sets the specified value to thesampleLocationsCountfield of the specifiedstruct.static intnsampleLocationsPerPixel(long struct)Unsafe version ofsampleLocationsPerPixel().static voidnsampleLocationsPerPixel(long struct, int value)Unsafe version ofsampleLocationsPerPixel.static intnsType(long struct)Unsafe version ofsType().static voidnsType(long struct, int value)Unsafe version ofsType.longpNext()Returns the value of thepNextfield.VkSampleLocationsInfoEXTpNext(long value)Sets the specified value to thepNextfield.VkSampleLocationEXT.BufferpSampleLocations()Returns aVkSampleLocationEXT.Bufferview of the struct array pointed to by thepSampleLocationsfield.VkSampleLocationsInfoEXTpSampleLocations(VkSampleLocationEXT.Buffer value)Sets the address of the specifiedVkSampleLocationEXT.Bufferto thepSampleLocationsfield.VkExtent2DsampleLocationGridSize()Returns aVkExtent2Dview of thesampleLocationGridSizefield.VkSampleLocationsInfoEXTsampleLocationGridSize(java.util.function.Consumer<VkExtent2D> consumer)Passes thesampleLocationGridSizefield to the specifiedConsumer.VkSampleLocationsInfoEXTsampleLocationGridSize(VkExtent2D value)Copies the specifiedVkExtent2Dto thesampleLocationGridSizefield.intsampleLocationsCount()Returns the value of thesampleLocationsCountfield.intsampleLocationsPerPixel()Returns the value of thesampleLocationsPerPixelfield.VkSampleLocationsInfoEXTsampleLocationsPerPixel(int value)Sets the specified value to thesampleLocationsPerPixelfield.VkSampleLocationsInfoEXTset(int sType, long pNext, int sampleLocationsPerPixel, VkExtent2D sampleLocationGridSize, VkSampleLocationEXT.Buffer pSampleLocations)Initializes this struct with the specified values.VkSampleLocationsInfoEXTset(VkSampleLocationsInfoEXT src)Copies the specified struct data to this struct.intsizeof()intsType()Returns the value of thesTypefield.VkSampleLocationsInfoEXTsType(int value)Sets the specified value to thesTypefield.static voidvalidate(long struct)Validates pointer members that should not beNULL.static voidvalidate(long array, int count)Callsvalidate(long)for each struct contained in the specified struct array.
-
-
-
Constructor Detail
-
VkSampleLocationsInfoEXT
public VkSampleLocationsInfoEXT(java.nio.ByteBuffer container)
Creates aVkSampleLocationsInfoEXTinstance 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()
Returns the value of thesTypefield.
-
pNext
public long pNext()
Returns the value of thepNextfield.
-
sampleLocationsPerPixel
public int sampleLocationsPerPixel()
Returns the value of thesampleLocationsPerPixelfield.
-
sampleLocationGridSize
public VkExtent2D sampleLocationGridSize()
Returns aVkExtent2Dview of thesampleLocationGridSizefield.
-
sampleLocationsCount
public int sampleLocationsCount()
Returns the value of thesampleLocationsCountfield.
-
pSampleLocations
@Nullable public VkSampleLocationEXT.Buffer pSampleLocations()
Returns aVkSampleLocationEXT.Bufferview of the struct array pointed to by thepSampleLocationsfield.
-
sType
public VkSampleLocationsInfoEXT sType(int value)
Sets the specified value to thesTypefield.
-
pNext
public VkSampleLocationsInfoEXT pNext(long value)
Sets the specified value to thepNextfield.
-
sampleLocationsPerPixel
public VkSampleLocationsInfoEXT sampleLocationsPerPixel(int value)
Sets the specified value to thesampleLocationsPerPixelfield.
-
sampleLocationGridSize
public VkSampleLocationsInfoEXT sampleLocationGridSize(VkExtent2D value)
Copies the specifiedVkExtent2Dto thesampleLocationGridSizefield.
-
sampleLocationGridSize
public VkSampleLocationsInfoEXT sampleLocationGridSize(java.util.function.Consumer<VkExtent2D> consumer)
Passes thesampleLocationGridSizefield to the specifiedConsumer.
-
pSampleLocations
public VkSampleLocationsInfoEXT pSampleLocations(@Nullable VkSampleLocationEXT.Buffer value)
Sets the address of the specifiedVkSampleLocationEXT.Bufferto thepSampleLocationsfield.
-
set
public VkSampleLocationsInfoEXT set(int sType, long pNext, int sampleLocationsPerPixel, VkExtent2D sampleLocationGridSize, @Nullable VkSampleLocationEXT.Buffer pSampleLocations)
Initializes this struct with the specified values.
-
set
public VkSampleLocationsInfoEXT set(VkSampleLocationsInfoEXT src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkSampleLocationsInfoEXT malloc()
Returns a newVkSampleLocationsInfoEXTinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkSampleLocationsInfoEXT calloc()
Returns a newVkSampleLocationsInfoEXTinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkSampleLocationsInfoEXT create()
Returns a newVkSampleLocationsInfoEXTinstance allocated withBufferUtils.
-
create
public static VkSampleLocationsInfoEXT create(long address)
Returns a newVkSampleLocationsInfoEXTinstance for the specified memory address.
-
createSafe
@Nullable public static VkSampleLocationsInfoEXT createSafe(long address)
-
malloc
public static VkSampleLocationsInfoEXT.Buffer malloc(int capacity)
Returns a newVkSampleLocationsInfoEXT.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkSampleLocationsInfoEXT.Buffer calloc(int capacity)
Returns a newVkSampleLocationsInfoEXT.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkSampleLocationsInfoEXT.Buffer create(int capacity)
Returns a newVkSampleLocationsInfoEXT.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkSampleLocationsInfoEXT.Buffer create(long address, int capacity)
Create aVkSampleLocationsInfoEXT.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkSampleLocationsInfoEXT.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkSampleLocationsInfoEXT mallocStack()
Returns a newVkSampleLocationsInfoEXTinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkSampleLocationsInfoEXT callocStack()
Returns a newVkSampleLocationsInfoEXTinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkSampleLocationsInfoEXT mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkSampleLocationsInfoEXTinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkSampleLocationsInfoEXT callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkSampleLocationsInfoEXTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static VkSampleLocationsInfoEXT.Buffer mallocStack(int capacity)
Returns a newVkSampleLocationsInfoEXT.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkSampleLocationsInfoEXT.Buffer callocStack(int capacity)
Returns a newVkSampleLocationsInfoEXT.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static VkSampleLocationsInfoEXT.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkSampleLocationsInfoEXT.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static VkSampleLocationsInfoEXT.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkSampleLocationsInfoEXT.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().
-
nsampleLocationsPerPixel
public static int nsampleLocationsPerPixel(long struct)
Unsafe version ofsampleLocationsPerPixel().
-
nsampleLocationGridSize
public static VkExtent2D nsampleLocationGridSize(long struct)
Unsafe version ofsampleLocationGridSize().
-
nsampleLocationsCount
public static int nsampleLocationsCount(long struct)
Unsafe version ofsampleLocationsCount().
-
npSampleLocations
@Nullable public static VkSampleLocationEXT.Buffer npSampleLocations(long struct)
Unsafe version ofpSampleLocations().
-
nsType
public static void nsType(long struct, int value)Unsafe version ofsType.
-
npNext
public static void npNext(long struct, long value)Unsafe version ofpNext.
-
nsampleLocationsPerPixel
public static void nsampleLocationsPerPixel(long struct, int value)Unsafe version ofsampleLocationsPerPixel.
-
nsampleLocationGridSize
public static void nsampleLocationGridSize(long struct, VkExtent2D value)Unsafe version ofsampleLocationGridSize.
-
nsampleLocationsCount
public static void nsampleLocationsCount(long struct, int value)Sets the specified value to thesampleLocationsCountfield of the specifiedstruct.
-
npSampleLocations
public static void npSampleLocations(long struct, @Nullable VkSampleLocationEXT.Buffer value)Unsafe version ofpSampleLocations.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-
validate
public static void validate(long array, int count)Callsvalidate(long)for each struct contained in the specified struct array.- Parameters:
array- the struct array to validatecount- the number of structs inarray
-
-