Class VkDrmFormatModifierPropertiesEXT
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkDrmFormatModifierPropertiesEXT
-
- All Implemented Interfaces:
org.lwjgl.system.Pointer
public class VkDrmFormatModifierPropertiesEXT extends org.lwjgl.system.Struct
Structure specifying properties of a format when combined with a DRM format modifier.Description
The returned
drmFormatModifierTilingFeatures
must contain at least one bit.The implementation must not return
DRM_FORMAT_MOD_INVALID
indrmFormatModifier
.An image's memory planecount (as returned by
drmFormatModifierPlaneCount
) is distinct from its format planecount (in the sense of multi-planar Y'CBCR formats). InVkImageAspectFlags
, eachVK_IMAGE_ASPECT_MEMORY_PLANE___i___BIT_EXT
represents a memory plane and eachVK_IMAGE_ASPECT_PLANE___i___BIT
a format plane.An image's set of format planes is an ordered partition of the image's content into separable groups of format channels. The ordered partition is encoded in the name of each
VkFormat
. For example,FORMAT_G8_B8R8_2PLANE_420_UNORM
contains two format planes; the first plane contains the green channel and the second plane contains the blue channel and red channel. If the format name does not containPLANE
, then the format contains a single plane; for example,FORMAT_R8G8B8A8_UNORM
. Some commands, such asCmdCopyBufferToImage
, do not operate on all format channels in the image, but instead operate only on the format planes explicitly chosen by the application and operate on each format plane independently.An image's set of memory planes is an ordered partition of the image's memory rather than the image's content. Each memory plane is a contiguous range of memory. The union of an image's memory planes is not necessarily contiguous.
If an image is linear, then the partition is the same for memory planes and for format planes. Therefore, if the returned
drmFormatModifier
isDRM_FORMAT_MOD_LINEAR
, thendrmFormatModifierPlaneCount
must equal the format planecount, anddrmFormatModifierTilingFeatures
must be identical to theVkFormatProperties2
::linearTilingFeatures
returned in the samepNext
chain.If an image is non-linear, then the partition of the image's memory into memory planes is implementation-specific and may be unrelated to the partition of the image's content into format planes. For example, consider an image whose
format
isFORMAT_G8_B8_R8_3PLANE_420_UNORM
,tiling
isIMAGE_TILING_DRM_FORMAT_MODIFIER_EXT
, whosedrmFormatModifier
is notDRM_FORMAT_MOD_LINEAR
, andflags
lacksIMAGE_CREATE_DISJOINT_BIT
. The image has 3 format planes, and commands suchCmdCopyBufferToImage
act on each format plane independently as if the data of each format plane were separable from the data of the other planes. In a straightforward implementation, the implementation may store the image's content in 3 adjacent memory planes where each memory plane corresponds exactly to a format plane. However, the implementation may also store the image's content in a single memory plane where all format channels are combined using an implementation-private block-compressed format; or the implementation may store the image's content in a collection of 7 adjacent memory planes using an implementation-private sharding technique. Because the image is non-linear and non-disjoint, the implementation has much freedom when choosing the image's placement in memory.The memory planecount applies to function parameters and structures only when the API specifies an explicit requirement on
drmFormatModifierPlaneCount
. In all other cases, the memory planecount is ignored.See Also
VkDrmFormatModifierPropertiesListEXT
Member documentation
drmFormatModifier
– a Linux DRM format modifier.drmFormatModifierPlaneCount
– the number of memory planes in any image created withformat
anddrmFormatModifier
. An image’s memory planecount is distinct from its format planecount, as explained below.drmFormatModifierTilingFeatures
– a bitmask ofVkFormatFeatureFlagBits
that are supported by any image created withformat
anddrmFormatModifier
.
Layout
struct VkDrmFormatModifierPropertiesEXT { uint64_t drmFormatModifier; uint32_t drmFormatModifierPlaneCount; VkFormatFeatureFlags drmFormatModifierTilingFeatures; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
VkDrmFormatModifierPropertiesEXT.Buffer
An array ofVkDrmFormatModifierPropertiesEXT
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
DRMFORMATMODIFIER
DRMFORMATMODIFIERPLANECOUNT
DRMFORMATMODIFIERTILINGFEATURESThe struct member offsets.static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor Description VkDrmFormatModifierPropertiesEXT(java.nio.ByteBuffer container)
Creates aVkDrmFormatModifierPropertiesEXT
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 VkDrmFormatModifierPropertiesEXT
create(long address)
Returns a newVkDrmFormatModifierPropertiesEXT
instance for the specified memory address.static VkDrmFormatModifierPropertiesEXT.Buffer
create(long address, int capacity)
Create aVkDrmFormatModifierPropertiesEXT.Buffer
instance at the specified memory.static VkDrmFormatModifierPropertiesEXT
createSafe(long address)
static VkDrmFormatModifierPropertiesEXT.Buffer
createSafe(long address, int capacity)
long
drmFormatModifier()
Returns the value of thedrmFormatModifier
field.int
drmFormatModifierPlaneCount()
Returns the value of thedrmFormatModifierPlaneCount
field.int
drmFormatModifierTilingFeatures()
Returns the value of thedrmFormatModifierTilingFeatures
field.static long
ndrmFormatModifier(long struct)
Unsafe version ofdrmFormatModifier()
.static int
ndrmFormatModifierPlaneCount(long struct)
Unsafe version ofdrmFormatModifierPlaneCount()
.static int
ndrmFormatModifierTilingFeatures(long struct)
Unsafe version ofdrmFormatModifierTilingFeatures()
.int
sizeof()
-
-
-
Constructor Detail
-
VkDrmFormatModifierPropertiesEXT
public VkDrmFormatModifierPropertiesEXT(java.nio.ByteBuffer container)
Creates aVkDrmFormatModifierPropertiesEXT
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
-
drmFormatModifier
public long drmFormatModifier()
Returns the value of thedrmFormatModifier
field.
-
drmFormatModifierPlaneCount
public int drmFormatModifierPlaneCount()
Returns the value of thedrmFormatModifierPlaneCount
field.
-
drmFormatModifierTilingFeatures
public int drmFormatModifierTilingFeatures()
Returns the value of thedrmFormatModifierTilingFeatures
field.
-
create
public static VkDrmFormatModifierPropertiesEXT create(long address)
Returns a newVkDrmFormatModifierPropertiesEXT
instance for the specified memory address.
-
createSafe
@Nullable public static VkDrmFormatModifierPropertiesEXT createSafe(long address)
-
create
public static VkDrmFormatModifierPropertiesEXT.Buffer create(long address, int capacity)
Create aVkDrmFormatModifierPropertiesEXT.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static VkDrmFormatModifierPropertiesEXT.Buffer createSafe(long address, int capacity)
-
ndrmFormatModifier
public static long ndrmFormatModifier(long struct)
Unsafe version ofdrmFormatModifier()
.
-
ndrmFormatModifierPlaneCount
public static int ndrmFormatModifierPlaneCount(long struct)
Unsafe version ofdrmFormatModifierPlaneCount()
.
-
ndrmFormatModifierTilingFeatures
public static int ndrmFormatModifierTilingFeatures(long struct)
Unsafe version ofdrmFormatModifierTilingFeatures()
.
-
-