Class VkDrmFormatModifierPropertiesEXT
- All Implemented Interfaces:
org.lwjgl.system.Pointer
Description
The returned drmFormatModifierTilingFeatures must contain at least one bit.
The implementation must not return DRM_FORMAT_MOD_INVALID in drmFormatModifier.
An image’s memory planecount (as returned by drmFormatModifierPlaneCount) is distinct from its format planecount (in the sense of multi-planar Y′CBCR formats). In VkImageAspectFlags, each VK_IMAGE_ASPECT_MEMORY_PLANE_i_BIT_EXT represents a memory plane and each VK_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 components. 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 component and the second plane contains the blue component and red component. If the format name does not contain PLANE, then the format contains a single plane; for example, FORMAT_R8G8B8A8_UNORM. Some commands, such as CmdCopyBufferToImage, do not operate on all format components 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 is DRM_FORMAT_MOD_LINEAR, then drmFormatModifierPlaneCount must equal the format planecount, and drmFormatModifierTilingFeatures must be identical to the VkFormatProperties2::linearTilingFeatures returned in the same pNext 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 is FORMAT_G8_B8_R8_3PLANE_420_UNORM, tiling is IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, whose drmFormatModifier is not DRM_FORMAT_MOD_LINEAR, and flags lacks IMAGE_CREATE_DISJOINT_BIT. The image has 3 format planes, and commands such CmdCopyBufferToImage 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 components 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
Layout
struct VkDrmFormatModifierPropertiesEXT {
uint64_t drmFormatModifier();
uint32_t drmFormatModifierPlaneCount();
VkFormatFeatureFlags drmFormatModifierTilingFeatures();
}-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn array ofVkDrmFormatModifierPropertiesEXTstructs.Nested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionVkDrmFormatModifierPropertiesEXT(ByteBuffer container) Creates aVkDrmFormatModifierPropertiesEXTinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptioncreate(long address) Returns a newVkDrmFormatModifierPropertiesEXTinstance for the specified memory address.create(long address, int capacity) Create aVkDrmFormatModifierPropertiesEXT.Bufferinstance at the specified memory.static @Nullable VkDrmFormatModifierPropertiesEXTcreateSafe(long address) static @Nullable VkDrmFormatModifierPropertiesEXT.BuffercreateSafe(long address, int capacity) longa Linux DRM format modifier.intthe number of memory planes in any image created withformatanddrmFormatModifier.inta bitmask ofVkFormatFeatureFlagBitsthat are supported by any image created withformatanddrmFormatModifier.static longndrmFormatModifier(long struct) Unsafe version ofdrmFormatModifier().static intndrmFormatModifierPlaneCount(long struct) Unsafe version ofdrmFormatModifierPlaneCount().static intndrmFormatModifierTilingFeatures(long struct) Unsafe version ofdrmFormatModifierTilingFeatures().intsizeof()Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
DRMFORMATMODIFIER
public static final int DRMFORMATMODIFIERThe struct member offsets. -
DRMFORMATMODIFIERPLANECOUNT
public static final int DRMFORMATMODIFIERPLANECOUNTThe struct member offsets. -
DRMFORMATMODIFIERTILINGFEATURES
public static final int DRMFORMATMODIFIERTILINGFEATURESThe struct member offsets.
-
-
Constructor Details
-
VkDrmFormatModifierPropertiesEXT
Creates aVkDrmFormatModifierPropertiesEXTinstance 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 Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<VkDrmFormatModifierPropertiesEXT>
-
drmFormatModifier
public long drmFormatModifier()a Linux DRM format modifier. -
drmFormatModifierPlaneCount
public int drmFormatModifierPlaneCount()the number of memory planes in any image created withformatanddrmFormatModifier. An image’s memory planecount is distinct from its format planecount, as explained below. -
drmFormatModifierTilingFeatures
public int drmFormatModifierTilingFeatures()a bitmask ofVkFormatFeatureFlagBitsthat are supported by any image created withformatanddrmFormatModifier. -
create
Returns a newVkDrmFormatModifierPropertiesEXTinstance for the specified memory address. -
createSafe
-
create
Create aVkDrmFormatModifierPropertiesEXT.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
public static @Nullable 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().
-