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
sampleLocationsCountis not 0,pSampleLocationsmust be a valid pointer to an array ofsampleLocationsCountVkSampleLocationEXTstructures
See Also
VkAttachmentSampleLocationsEXT,VkExtent2D,VkPipelineSampleLocationsStateCreateInfoEXT,VkSampleLocationEXT,VkSubpassSampleLocationsEXT,CmdSetSampleLocationsEXTLayout
struct VkSampleLocationsInfoEXT { VkStructureTypesType(); void const *pNext(); VkSampleCountFlagBitssampleLocationsPerPixel();VkExtent2DsampleLocationGridSize(); uint32_tsampleLocationsCount();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 Deprecated 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 VkSampleLocationsInfoEXT.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkSampleLocationsInfoEXT.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkSampleLocationsInfoEXTcalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkSampleLocationsInfoEXTinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkSampleLocationsInfoEXTcallocStack()Deprecated.static VkSampleLocationsInfoEXT.BuffercallocStack(int capacity)Deprecated.static VkSampleLocationsInfoEXT.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkSampleLocationsInfoEXTcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.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 VkSampleLocationsInfoEXT.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkSampleLocationsInfoEXT.Bufferinstance allocated on the specifiedMemoryStack.static VkSampleLocationsInfoEXTmalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkSampleLocationsInfoEXTinstance allocated on the specifiedMemoryStack.static VkSampleLocationsInfoEXTmallocStack()Deprecated.static VkSampleLocationsInfoEXT.BuffermallocStack(int capacity)Deprecated.static VkSampleLocationsInfoEXT.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkSampleLocationsInfoEXTmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.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()NULLor a pointer to a structure extending this structure.VkSampleLocationsInfoEXTpNext(long value)Sets the specified value to thepNext()field.VkSampleLocationEXT.BufferpSampleLocations()a pointer to an array ofsampleLocationsCountVkSampleLocationEXTstructures.VkSampleLocationsInfoEXTpSampleLocations(VkSampleLocationEXT.Buffer value)Sets the address of the specifiedVkSampleLocationEXT.Bufferto thepSampleLocations()field.VkExtent2DsampleLocationGridSize()the size of the sample location grid to select custom sample locations for.VkSampleLocationsInfoEXTsampleLocationGridSize(java.util.function.Consumer<VkExtent2D> consumer)Passes thesampleLocationGridSize()field to the specifiedConsumer.VkSampleLocationsInfoEXTsampleLocationGridSize(VkExtent2D value)Copies the specifiedVkExtent2Dto thesampleLocationGridSize()field.intsampleLocationsCount()the number of sample locations inpSampleLocations.intsampleLocationsPerPixel()aVkSampleCountFlagBitsvalue specifying the number of sample locations per pixel.VkSampleLocationsInfoEXTsampleLocationsPerPixel(int value)Sets the specified value to thesampleLocationsPerPixel()field.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()the type of this structure.VkSampleLocationsInfoEXTsType(int value)Sets the specified value to thesType()field.VkSampleLocationsInfoEXTsType$Default()Sets theSTRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXTvalue to thesType()field.static voidvalidate(long struct)Validates pointer members that should not beNULL.
-
-
-
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()
the type of this structure.
-
pNext
public long pNext()
NULLor a pointer to a structure extending this structure.
-
sampleLocationsPerPixel
public int sampleLocationsPerPixel()
aVkSampleCountFlagBitsvalue specifying the number of sample locations per pixel.
-
sampleLocationGridSize
public VkExtent2D sampleLocationGridSize()
the size of the sample location grid to select custom sample locations for.
-
sampleLocationsCount
public int sampleLocationsCount()
the number of sample locations inpSampleLocations.
-
pSampleLocations
@Nullable public VkSampleLocationEXT.Buffer pSampleLocations()
a pointer to an array ofsampleLocationsCountVkSampleLocationEXTstructures.
-
sType
public VkSampleLocationsInfoEXT sType(int value)
Sets the specified value to thesType()field.
-
sType$Default
public VkSampleLocationsInfoEXT sType$Default()
Sets theSTRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXTvalue to thesType()field.
-
pNext
public VkSampleLocationsInfoEXT pNext(long value)
Sets the specified value to thepNext()field.
-
sampleLocationsPerPixel
public VkSampleLocationsInfoEXT sampleLocationsPerPixel(int value)
Sets the specified value to thesampleLocationsPerPixel()field.
-
sampleLocationGridSize
public VkSampleLocationsInfoEXT sampleLocationGridSize(VkExtent2D value)
Copies the specifiedVkExtent2Dto thesampleLocationGridSize()field.
-
sampleLocationGridSize
public VkSampleLocationsInfoEXT sampleLocationGridSize(java.util.function.Consumer<VkExtent2D> consumer)
Passes thesampleLocationGridSize()field to the specifiedConsumer.
-
pSampleLocations
public VkSampleLocationsInfoEXT pSampleLocations(@Nullable VkSampleLocationEXT.Buffer value)
Sets the address of the specifiedVkSampleLocationEXT.Bufferto thepSampleLocations()field.
-
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
@Deprecated public static VkSampleLocationsInfoEXT mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkSampleLocationsInfoEXT callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkSampleLocationsInfoEXT mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkSampleLocationsInfoEXT callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkSampleLocationsInfoEXT.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkSampleLocationsInfoEXT.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static VkSampleLocationsInfoEXT.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkSampleLocationsInfoEXT.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static VkSampleLocationsInfoEXT malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkSampleLocationsInfoEXTinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkSampleLocationsInfoEXT calloc(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
-
malloc
public static VkSampleLocationsInfoEXT.Buffer malloc(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
-
calloc
public static VkSampleLocationsInfoEXT.Buffer calloc(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
-
-