Package org.lwjgl.vulkan
Class VkFragmentShadingRateAttachmentInfoKHR
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkFragmentShadingRateAttachmentInfoKHR
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkFragmentShadingRateAttachmentInfoKHR extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure specifying a fragment shading rate attachment for a subpass.Description
If no shading rate attachment is specified, or if this structure is not specified, the implementation behaves as if a valid shading rate attachment was specified with all texels specifying a single pixel per fragment.
Valid Usage
- If
pFragmentShadingRateAttachmentis notNULLand itsattachmentmember is notATTACHMENT_UNUSED, itslayoutmember must be equal toIMAGE_LAYOUT_GENERALorIMAGE_LAYOUT_FRAGMENT_SHADING_RATE_ATTACHMENT_OPTIMAL_KHR - If
pFragmentShadingRateAttachmentis notNULLand itsattachmentmember is notATTACHMENT_UNUSED,shadingRateAttachmentTexelSize.widthmust be a power of two value - If
pFragmentShadingRateAttachmentis notNULLand itsattachmentmember is notATTACHMENT_UNUSED,shadingRateAttachmentTexelSize.widthmust be less than or equal tomaxFragmentShadingRateAttachmentTexelSize.width - If
pFragmentShadingRateAttachmentis notNULLand itsattachmentmember is notATTACHMENT_UNUSED,shadingRateAttachmentTexelSize.widthmust be greater than or equal tominFragmentShadingRateAttachmentTexelSize.width - If
pFragmentShadingRateAttachmentis notNULLand itsattachmentmember is notATTACHMENT_UNUSED,shadingRateAttachmentTexelSize.heightmust be a power of two value - If
pFragmentShadingRateAttachmentis notNULLand itsattachmentmember is notATTACHMENT_UNUSED,shadingRateAttachmentTexelSize.heightmust be less than or equal tomaxFragmentShadingRateAttachmentTexelSize.height - If
pFragmentShadingRateAttachmentis notNULLand itsattachmentmember is notATTACHMENT_UNUSED,shadingRateAttachmentTexelSize.heightmust be greater than or equal tominFragmentShadingRateAttachmentTexelSize.height - If
pFragmentShadingRateAttachmentis notNULLand itsattachmentmember is notATTACHMENT_UNUSED, the quotient ofshadingRateAttachmentTexelSize.widthandshadingRateAttachmentTexelSize.heightmust be less than or equal tomaxFragmentShadingRateAttachmentTexelSizeAspectRatio - If
pFragmentShadingRateAttachmentis notNULLand itsattachmentmember is notATTACHMENT_UNUSED, the quotient ofshadingRateAttachmentTexelSize.heightandshadingRateAttachmentTexelSize.widthmust be less than or equal tomaxFragmentShadingRateAttachmentTexelSizeAspectRatio
Valid Usage (Implicit)
sTypemust beSTRUCTURE_TYPE_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHR- If
pFragmentShadingRateAttachmentis notNULL,pFragmentShadingRateAttachmentmust be a valid pointer to a validVkAttachmentReference2structure
See Also
VkAttachmentReference2,VkExtent2DLayout
struct VkFragmentShadingRateAttachmentInfoKHR { VkStructureTypesType(); void const *pNext();VkAttachmentReference2const *pFragmentShadingRateAttachment();VkExtent2DshadingRateAttachmentTexelSize(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkFragmentShadingRateAttachmentInfoKHR.BufferAn array ofVkFragmentShadingRateAttachmentInfoKHRstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intPFRAGMENTSHADINGRATEATTACHMENT
PNEXT
SHADINGRATEATTACHMENTTEXELSIZEThe struct member offsets.static intSIZEOFThe struct size in bytes.static intSTYPEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkFragmentShadingRateAttachmentInfoKHR(java.nio.ByteBuffer container)Creates aVkFragmentShadingRateAttachmentInfoKHRinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkFragmentShadingRateAttachmentInfoKHRcalloc()Returns a newVkFragmentShadingRateAttachmentInfoKHRinstance allocated withmemCalloc.static VkFragmentShadingRateAttachmentInfoKHR.Buffercalloc(int capacity)Returns a newVkFragmentShadingRateAttachmentInfoKHR.Bufferinstance allocated withmemCalloc.static VkFragmentShadingRateAttachmentInfoKHR.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkFragmentShadingRateAttachmentInfoKHR.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkFragmentShadingRateAttachmentInfoKHRcalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkFragmentShadingRateAttachmentInfoKHRinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkFragmentShadingRateAttachmentInfoKHRcreate()Returns a newVkFragmentShadingRateAttachmentInfoKHRinstance allocated withBufferUtils.static VkFragmentShadingRateAttachmentInfoKHR.Buffercreate(int capacity)Returns a newVkFragmentShadingRateAttachmentInfoKHR.Bufferinstance allocated withBufferUtils.static VkFragmentShadingRateAttachmentInfoKHRcreate(long address)Returns a newVkFragmentShadingRateAttachmentInfoKHRinstance for the specified memory address.static VkFragmentShadingRateAttachmentInfoKHR.Buffercreate(long address, int capacity)Create aVkFragmentShadingRateAttachmentInfoKHR.Bufferinstance at the specified memory.static VkFragmentShadingRateAttachmentInfoKHRcreateSafe(long address)static VkFragmentShadingRateAttachmentInfoKHR.BuffercreateSafe(long address, int capacity)static VkFragmentShadingRateAttachmentInfoKHRmalloc()Returns a newVkFragmentShadingRateAttachmentInfoKHRinstance allocated withmemAlloc.static VkFragmentShadingRateAttachmentInfoKHR.Buffermalloc(int capacity)Returns a newVkFragmentShadingRateAttachmentInfoKHR.Bufferinstance allocated withmemAlloc.static VkFragmentShadingRateAttachmentInfoKHR.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkFragmentShadingRateAttachmentInfoKHR.Bufferinstance allocated on the specifiedMemoryStack.static VkFragmentShadingRateAttachmentInfoKHRmalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkFragmentShadingRateAttachmentInfoKHRinstance allocated on the specifiedMemoryStack.static VkAttachmentReference2npFragmentShadingRateAttachment(long struct)Unsafe version ofpFragmentShadingRateAttachment().static voidnpFragmentShadingRateAttachment(long struct, VkAttachmentReference2 value)Unsafe version ofpFragmentShadingRateAttachment.static longnpNext(long struct)Unsafe version ofpNext().static voidnpNext(long struct, long value)Unsafe version ofpNext.static VkExtent2DnshadingRateAttachmentTexelSize(long struct)Unsafe version ofshadingRateAttachmentTexelSize().static voidnshadingRateAttachmentTexelSize(long struct, VkExtent2D value)Unsafe version ofshadingRateAttachmentTexelSize.static intnsType(long struct)Unsafe version ofsType().static voidnsType(long struct, int value)Unsafe version ofsType.VkAttachmentReference2pFragmentShadingRateAttachment()NULLor a pointer to aVkAttachmentReference2structure defining the fragment shading rate attachment for this subpass.VkFragmentShadingRateAttachmentInfoKHRpFragmentShadingRateAttachment(VkAttachmentReference2 value)Sets the address of the specifiedVkAttachmentReference2to thepFragmentShadingRateAttachment()field.longpNext()NULLor a pointer to a structure extending this structure.VkFragmentShadingRateAttachmentInfoKHRpNext(long value)Sets the specified value to thepNext()field.VkFragmentShadingRateAttachmentInfoKHRset(int sType, long pNext, VkAttachmentReference2 pFragmentShadingRateAttachment, VkExtent2D shadingRateAttachmentTexelSize)Initializes this struct with the specified values.VkFragmentShadingRateAttachmentInfoKHRset(VkFragmentShadingRateAttachmentInfoKHR src)Copies the specified struct data to this struct.VkExtent2DshadingRateAttachmentTexelSize()specifies the size of the portion of the framebuffer corresponding to each texel inpFragmentShadingRateAttachment.VkFragmentShadingRateAttachmentInfoKHRshadingRateAttachmentTexelSize(java.util.function.Consumer<VkExtent2D> consumer)Passes theshadingRateAttachmentTexelSize()field to the specifiedConsumer.VkFragmentShadingRateAttachmentInfoKHRshadingRateAttachmentTexelSize(VkExtent2D value)Copies the specifiedVkExtent2Dto theshadingRateAttachmentTexelSize()field.intsizeof()intsType()the type of this structure.VkFragmentShadingRateAttachmentInfoKHRsType(int value)Sets the specified value to thesType()field.VkFragmentShadingRateAttachmentInfoKHRsType$Default()Sets theSTRUCTURE_TYPE_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHRvalue to thesType()field.
-
-
-
Constructor Detail
-
VkFragmentShadingRateAttachmentInfoKHR
public VkFragmentShadingRateAttachmentInfoKHR(java.nio.ByteBuffer container)
Creates aVkFragmentShadingRateAttachmentInfoKHRinstance 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.
-
pFragmentShadingRateAttachment
@Nullable public VkAttachmentReference2 pFragmentShadingRateAttachment()
NULLor a pointer to aVkAttachmentReference2structure defining the fragment shading rate attachment for this subpass.
-
shadingRateAttachmentTexelSize
public VkExtent2D shadingRateAttachmentTexelSize()
specifies the size of the portion of the framebuffer corresponding to each texel inpFragmentShadingRateAttachment.
-
sType
public VkFragmentShadingRateAttachmentInfoKHR sType(int value)
Sets the specified value to thesType()field.
-
sType$Default
public VkFragmentShadingRateAttachmentInfoKHR sType$Default()
Sets theSTRUCTURE_TYPE_FRAGMENT_SHADING_RATE_ATTACHMENT_INFO_KHRvalue to thesType()field.
-
pNext
public VkFragmentShadingRateAttachmentInfoKHR pNext(long value)
Sets the specified value to thepNext()field.
-
pFragmentShadingRateAttachment
public VkFragmentShadingRateAttachmentInfoKHR pFragmentShadingRateAttachment(@Nullable VkAttachmentReference2 value)
Sets the address of the specifiedVkAttachmentReference2to thepFragmentShadingRateAttachment()field.
-
shadingRateAttachmentTexelSize
public VkFragmentShadingRateAttachmentInfoKHR shadingRateAttachmentTexelSize(VkExtent2D value)
Copies the specifiedVkExtent2Dto theshadingRateAttachmentTexelSize()field.
-
shadingRateAttachmentTexelSize
public VkFragmentShadingRateAttachmentInfoKHR shadingRateAttachmentTexelSize(java.util.function.Consumer<VkExtent2D> consumer)
Passes theshadingRateAttachmentTexelSize()field to the specifiedConsumer.
-
set
public VkFragmentShadingRateAttachmentInfoKHR set(int sType, long pNext, @Nullable VkAttachmentReference2 pFragmentShadingRateAttachment, VkExtent2D shadingRateAttachmentTexelSize)
Initializes this struct with the specified values.
-
set
public VkFragmentShadingRateAttachmentInfoKHR set(VkFragmentShadingRateAttachmentInfoKHR src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkFragmentShadingRateAttachmentInfoKHR malloc()
Returns a newVkFragmentShadingRateAttachmentInfoKHRinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkFragmentShadingRateAttachmentInfoKHR calloc()
Returns a newVkFragmentShadingRateAttachmentInfoKHRinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkFragmentShadingRateAttachmentInfoKHR create()
Returns a newVkFragmentShadingRateAttachmentInfoKHRinstance allocated withBufferUtils.
-
create
public static VkFragmentShadingRateAttachmentInfoKHR create(long address)
Returns a newVkFragmentShadingRateAttachmentInfoKHRinstance for the specified memory address.
-
createSafe
@Nullable public static VkFragmentShadingRateAttachmentInfoKHR createSafe(long address)
-
malloc
public static VkFragmentShadingRateAttachmentInfoKHR.Buffer malloc(int capacity)
Returns a newVkFragmentShadingRateAttachmentInfoKHR.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkFragmentShadingRateAttachmentInfoKHR.Buffer calloc(int capacity)
Returns a newVkFragmentShadingRateAttachmentInfoKHR.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkFragmentShadingRateAttachmentInfoKHR.Buffer create(int capacity)
Returns a newVkFragmentShadingRateAttachmentInfoKHR.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkFragmentShadingRateAttachmentInfoKHR.Buffer create(long address, int capacity)
Create aVkFragmentShadingRateAttachmentInfoKHR.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkFragmentShadingRateAttachmentInfoKHR.Buffer createSafe(long address, int capacity)
-
malloc
public static VkFragmentShadingRateAttachmentInfoKHR malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkFragmentShadingRateAttachmentInfoKHRinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkFragmentShadingRateAttachmentInfoKHR calloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkFragmentShadingRateAttachmentInfoKHRinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkFragmentShadingRateAttachmentInfoKHR.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkFragmentShadingRateAttachmentInfoKHR.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static VkFragmentShadingRateAttachmentInfoKHR.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkFragmentShadingRateAttachmentInfoKHR.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().
-
npFragmentShadingRateAttachment
@Nullable public static VkAttachmentReference2 npFragmentShadingRateAttachment(long struct)
Unsafe version ofpFragmentShadingRateAttachment().
-
nshadingRateAttachmentTexelSize
public static VkExtent2D nshadingRateAttachmentTexelSize(long struct)
Unsafe version ofshadingRateAttachmentTexelSize().
-
nsType
public static void nsType(long struct, int value)Unsafe version ofsType.
-
npNext
public static void npNext(long struct, long value)Unsafe version ofpNext.
-
npFragmentShadingRateAttachment
public static void npFragmentShadingRateAttachment(long struct, @Nullable VkAttachmentReference2 value)Unsafe version ofpFragmentShadingRateAttachment.
-
nshadingRateAttachmentTexelSize
public static void nshadingRateAttachmentTexelSize(long struct, VkExtent2D value)Unsafe version ofshadingRateAttachmentTexelSize.
-
-