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.NativeResource
Structure 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
pSampleLocations
specifysampleLocationsPerPixel
number of sample locations for each pixel in the grid of the size specified insampleLocationGridSize
. The sample location for samplei
at 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
pSampleLocations
may be ignored.Valid Usage
sampleLocationsPerPixel
must be a bit value that is set inVkPhysicalDeviceSampleLocationsPropertiesEXT
::sampleLocationSampleCounts
sampleLocationsCount
must equalsampleLocationsPerPixel × sampleLocationGridSize.width × sampleLocationGridSize.height
Valid Usage (Implicit)
sType
must beSTRUCTURE_TYPE_SAMPLE_LOCATIONS_INFO_EXT
- If
sampleLocationsPerPixel
is not 0,sampleLocationsPerPixel
must be a validVkSampleCountFlagBits
value - If
sampleLocationsCount
is not 0,pSampleLocations
must be a valid pointer to an array ofsampleLocationsCount
VkSampleLocationEXT
structures
See Also
VkAttachmentSampleLocationsEXT
,VkExtent2D
,VkPipelineSampleLocationsStateCreateInfoEXT
,VkSampleLocationEXT
,VkSubpassSampleLocationsEXT
,CmdSetSampleLocationsEXT
Member documentation
sType
– the type of this structure.pNext
–NULL
or a pointer to an extension-specific structure.sampleLocationsPerPixel
– aVkSampleCountFlagBits
specifying 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 ofsampleLocationsCount
VkSampleLocationEXT
structures.
Layout
struct VkSampleLocationsInfoEXT { VkStructureType sType; void const * pNext; VkSampleCountFlagBits sampleLocationsPerPixel;
VkExtent2D
sampleLocationGridSize; uint32_t sampleLocationsCount;VkSampleLocationEXT
const * pSampleLocations; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkSampleLocationsInfoEXT.Buffer
An array ofVkSampleLocationsInfoEXT
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
PNEXT
PSAMPLELOCATIONS
SAMPLELOCATIONGRIDSIZE
SAMPLELOCATIONSCOUNT
SAMPLELOCATIONSPERPIXELThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
STYPE
The struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkSampleLocationsInfoEXT(java.nio.ByteBuffer container)
Creates aVkSampleLocationsInfoEXT
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkSampleLocationsInfoEXT
calloc()
Returns a newVkSampleLocationsInfoEXT
instance allocated withmemCalloc
.static VkSampleLocationsInfoEXT.Buffer
calloc(int capacity)
Returns a newVkSampleLocationsInfoEXT.Buffer
instance allocated withmemCalloc
.static VkSampleLocationsInfoEXT
callocStack()
Returns a newVkSampleLocationsInfoEXT
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkSampleLocationsInfoEXT.Buffer
callocStack(int capacity)
Returns a newVkSampleLocationsInfoEXT.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkSampleLocationsInfoEXT.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkSampleLocationsInfoEXT.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkSampleLocationsInfoEXT
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkSampleLocationsInfoEXT
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkSampleLocationsInfoEXT
create()
Returns a newVkSampleLocationsInfoEXT
instance allocated withBufferUtils
.static VkSampleLocationsInfoEXT.Buffer
create(int capacity)
Returns a newVkSampleLocationsInfoEXT.Buffer
instance allocated withBufferUtils
.static VkSampleLocationsInfoEXT
create(long address)
Returns a newVkSampleLocationsInfoEXT
instance for the specified memory address.static VkSampleLocationsInfoEXT.Buffer
create(long address, int capacity)
Create aVkSampleLocationsInfoEXT.Buffer
instance at the specified memory.static VkSampleLocationsInfoEXT
createSafe(long address)
static VkSampleLocationsInfoEXT.Buffer
createSafe(long address, int capacity)
static VkSampleLocationsInfoEXT
malloc()
Returns a newVkSampleLocationsInfoEXT
instance allocated withmemAlloc
.static VkSampleLocationsInfoEXT.Buffer
malloc(int capacity)
Returns a newVkSampleLocationsInfoEXT.Buffer
instance allocated withmemAlloc
.static VkSampleLocationsInfoEXT
mallocStack()
Returns a newVkSampleLocationsInfoEXT
instance allocated on the thread-localMemoryStack
.static VkSampleLocationsInfoEXT.Buffer
mallocStack(int capacity)
Returns a newVkSampleLocationsInfoEXT.Buffer
instance allocated on the thread-localMemoryStack
.static VkSampleLocationsInfoEXT.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkSampleLocationsInfoEXT.Buffer
instance allocated on the specifiedMemoryStack
.static VkSampleLocationsInfoEXT
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkSampleLocationsInfoEXT
instance allocated on the specifiedMemoryStack
.static long
npNext(long struct)
Unsafe version ofpNext()
.static void
npNext(long struct, long value)
Unsafe version ofpNext
.static VkSampleLocationEXT.Buffer
npSampleLocations(long struct)
Unsafe version ofpSampleLocations()
.static void
npSampleLocations(long struct, VkSampleLocationEXT.Buffer value)
Unsafe version ofpSampleLocations
.static VkExtent2D
nsampleLocationGridSize(long struct)
Unsafe version ofsampleLocationGridSize()
.static void
nsampleLocationGridSize(long struct, VkExtent2D value)
Unsafe version ofsampleLocationGridSize
.static int
nsampleLocationsCount(long struct)
Unsafe version ofsampleLocationsCount()
.static void
nsampleLocationsCount(long struct, int value)
Sets the specified value to thesampleLocationsCount
field of the specifiedstruct
.static int
nsampleLocationsPerPixel(long struct)
Unsafe version ofsampleLocationsPerPixel()
.static void
nsampleLocationsPerPixel(long struct, int value)
Unsafe version ofsampleLocationsPerPixel
.static int
nsType(long struct)
Unsafe version ofsType()
.static void
nsType(long struct, int value)
Unsafe version ofsType
.long
pNext()
Returns the value of thepNext
field.VkSampleLocationsInfoEXT
pNext(long value)
Sets the specified value to thepNext
field.VkSampleLocationEXT.Buffer
pSampleLocations()
Returns aVkSampleLocationEXT.Buffer
view of the struct array pointed to by thepSampleLocations
field.VkSampleLocationsInfoEXT
pSampleLocations(VkSampleLocationEXT.Buffer value)
Sets the address of the specifiedVkSampleLocationEXT.Buffer
to thepSampleLocations
field.VkExtent2D
sampleLocationGridSize()
Returns aVkExtent2D
view of thesampleLocationGridSize
field.VkSampleLocationsInfoEXT
sampleLocationGridSize(java.util.function.Consumer<VkExtent2D> consumer)
Passes thesampleLocationGridSize
field to the specifiedConsumer
.VkSampleLocationsInfoEXT
sampleLocationGridSize(VkExtent2D value)
Copies the specifiedVkExtent2D
to thesampleLocationGridSize
field.int
sampleLocationsCount()
Returns the value of thesampleLocationsCount
field.int
sampleLocationsPerPixel()
Returns the value of thesampleLocationsPerPixel
field.VkSampleLocationsInfoEXT
sampleLocationsPerPixel(int value)
Sets the specified value to thesampleLocationsPerPixel
field.VkSampleLocationsInfoEXT
set(int sType, long pNext, int sampleLocationsPerPixel, VkExtent2D sampleLocationGridSize, VkSampleLocationEXT.Buffer pSampleLocations)
Initializes this struct with the specified values.VkSampleLocationsInfoEXT
set(VkSampleLocationsInfoEXT src)
Copies the specified struct data to this struct.int
sizeof()
int
sType()
Returns the value of thesType
field.VkSampleLocationsInfoEXT
sType(int value)
Sets the specified value to thesType
field.static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(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 aVkSampleLocationsInfoEXT
instance at the current position of the specifiedByteBuffer
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
sType
public int sType()
Returns the value of thesType
field.
-
pNext
public long pNext()
Returns the value of thepNext
field.
-
sampleLocationsPerPixel
public int sampleLocationsPerPixel()
Returns the value of thesampleLocationsPerPixel
field.
-
sampleLocationGridSize
public VkExtent2D sampleLocationGridSize()
Returns aVkExtent2D
view of thesampleLocationGridSize
field.
-
sampleLocationsCount
public int sampleLocationsCount()
Returns the value of thesampleLocationsCount
field.
-
pSampleLocations
@Nullable public VkSampleLocationEXT.Buffer pSampleLocations()
Returns aVkSampleLocationEXT.Buffer
view of the struct array pointed to by thepSampleLocations
field.
-
sType
public VkSampleLocationsInfoEXT sType(int value)
Sets the specified value 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 specifiedVkExtent2D
to 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.Buffer
to 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 newVkSampleLocationsInfoEXT
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkSampleLocationsInfoEXT calloc()
Returns a newVkSampleLocationsInfoEXT
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkSampleLocationsInfoEXT create()
Returns a newVkSampleLocationsInfoEXT
instance allocated withBufferUtils
.
-
create
public static VkSampleLocationsInfoEXT create(long address)
Returns a newVkSampleLocationsInfoEXT
instance for the specified memory address.
-
createSafe
@Nullable public static VkSampleLocationsInfoEXT createSafe(long address)
-
malloc
public static VkSampleLocationsInfoEXT.Buffer malloc(int capacity)
Returns a newVkSampleLocationsInfoEXT.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkSampleLocationsInfoEXT.Buffer calloc(int capacity)
Returns a newVkSampleLocationsInfoEXT.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkSampleLocationsInfoEXT.Buffer create(int capacity)
Returns a newVkSampleLocationsInfoEXT.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkSampleLocationsInfoEXT.Buffer create(long address, int capacity)
Create aVkSampleLocationsInfoEXT.Buffer
instance 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 newVkSampleLocationsInfoEXT
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkSampleLocationsInfoEXT callocStack()
Returns a newVkSampleLocationsInfoEXT
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkSampleLocationsInfoEXT mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkSampleLocationsInfoEXT
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkSampleLocationsInfoEXT callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkSampleLocationsInfoEXT
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkSampleLocationsInfoEXT.Buffer callocStack(int capacity)
Returns a newVkSampleLocationsInfoEXT.Buffer
instance allocated on the thread-localMemoryStack
and 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.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and 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 thesampleLocationsCount
field 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
-
-