Class KHRDisplay



  • public class KHRDisplay
    extends java.lang.Object
    This extension provides the API to enumerate displays and available modes on a given device.
    • Field Detail

      • VK_KHR_DISPLAY_SPEC_VERSION

        public static final int VK_KHR_DISPLAY_SPEC_VERSION
        The extension specification version.
        See Also:
        Constant Field Values
      • VK_KHR_DISPLAY_EXTENSION_NAME

        public static final java.lang.String VK_KHR_DISPLAY_EXTENSION_NAME
        The extension name.
        See Also:
        Constant Field Values
      • VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR

        public static final int VK_STRUCTURE_TYPE_DISPLAY_MODE_CREATE_INFO_KHR
        VkStructureType
        See Also:
        Constant Field Values
      • VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR

        public static final int VK_STRUCTURE_TYPE_DISPLAY_SURFACE_CREATE_INFO_KHR
        VkStructureType
        See Also:
        Constant Field Values
      • VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR

        public static final int VK_DISPLAY_PLANE_ALPHA_OPAQUE_BIT_KHR
        The source image will be treated as opaque.
        See Also:
        Constant Field Values
      • VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR

        public static final int VK_DISPLAY_PLANE_ALPHA_GLOBAL_BIT_KHR
        A global alpha value must be specified that will be applied to all pixels in the source image.
        See Also:
        Constant Field Values
      • VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR

        public static final int VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR
        The alpha value will be determined by the alpha channel of the source image’s pixels. If the source format contains no alpha values, no blending will be applied. The source alpha values are not premultiplied into the source image’s other color channels.
        See Also:
        Constant Field Values
      • VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR

        public static final int VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR
        This is equivalent to DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR except the source alpha values are assumed to be premultiplied into the source image’s other color channels.
        See Also:
        Constant Field Values
    • Method Detail

      • vkGetPhysicalDeviceDisplayPropertiesKHR

        public static int vkGetPhysicalDeviceDisplayPropertiesKHR(VkPhysicalDevice physicalDevice,
                                                                  java.nio.IntBuffer pPropertyCount,
                                                                  VkDisplayPropertiesKHR.Buffer pProperties)
        Queries information about the available displays.

        If pProperties is NULL, then the number of display devices available for physicalDevice is returned in pPropertyCount. Otherwise, pPropertyCount must point to a variable set by the user to the number of elements in the pProperties array, and on return the variable is overwritten with the number of structures actually written to pProperties. If the value of pPropertyCount is less than the number of display devices for physicalDevice, at most pPropertyCount structures will be written. If pPropertyCount is smaller than the number of display devices available for physicalDevice, INCOMPLETE will be returned instead of SUCCESS to indicate that not all the available values were returned.

        Valid Usage
        • physicalDevice must be a valid VkPhysicalDevice handle
        • pPropertyCount must be a pointer to a uint32_t value
        • If the value referenced by pPropertyCount is not 0, and pProperties is not NULL, pProperties must be a pointer to an array of pPropertyCount VkDisplayPropertiesKHR structures
        Parameters:
        physicalDevice - a physical device
        pPropertyCount - a pointer to an integer related to the number of display devices available or queried
        pProperties - either NULL or a pointer to an array of VkDisplayPropertiesKHR structures
      • vkGetPhysicalDeviceDisplayPlanePropertiesKHR

        public static int vkGetPhysicalDeviceDisplayPlanePropertiesKHR(VkPhysicalDevice physicalDevice,
                                                                       java.nio.IntBuffer pPropertyCount,
                                                                       VkDisplayPlanePropertiesKHR.Buffer pProperties)
        Queries the plane properties.

        Images are presented to individual planes on a display. Devices must support at least one plane on each display. Planes can be stacked and blended to composite multiple images on one display. Devices may support only a fixed stacking order and fixed mapping between planes and displays, or they may allow arbitrary application specified stacking orders and mappings between planes and displays.

        If pProperties is NULL, then the number of display planes available for physicalDevice is returned in pPropertyCount. Otherwise, pPropertyCount must point to a variable set by the user to the number of elements in the pProperties array, and on return the variable is overwritten with the number of structures actually written to pProperties. If the value of pPropertyCount is less than the number of display planes for physicalDevice, at most pPropertyCount structures will be written.

        Valid Usage
        • physicalDevice must be a valid VkPhysicalDevice handle
        • pPropertyCount must be a pointer to a uint32_t value
        • If the value referenced by pPropertyCount is not 0, and pProperties is not NULL, pProperties must be a pointer to an array of pPropertyCount VkDisplayPlanePropertiesKHR structures
        Parameters:
        physicalDevice - a valid physical device
        pPropertyCount - a pointer to an integer related to the number of display planes available or queried
        pProperties - either NULL or a pointer to an array of VkDisplayPlanePropertiesKHR structures
      • vkGetDisplayPlaneSupportedDisplaysKHR

        public static int vkGetDisplayPlaneSupportedDisplaysKHR(VkPhysicalDevice physicalDevice,
                                                                int planeIndex,
                                                                java.nio.IntBuffer pDisplayCount,
                                                                java.nio.LongBuffer pDisplays)
        Determines which displays a plane is usable with.

        If pDisplays is NULL, then the number of displays usable with the specified planeIndex for physicalDevice is returned in pDisplayCount. Otherwise, pDisplayCount must point to a variable set by the user to the number of elements in the pDisplays array, and on return the variable is overwritten with the number of structures actually written to pDisplays. If the value of pDisplayCount is less than the number of display planes for physicalDevice, at most pDisplayCount structures will be written. If pDisplayCount is smaller than the number of displays usable with the specified planeIndex for physicalDevice, INCOMPLETE will be returned instead of SUCCESS to indicate that not all the available values were returned.

        Valid Usage
        • physicalDevice must be a valid VkPhysicalDevice handle
        • pDisplayCount must be a pointer to a uint32_t value
        • If the value referenced by pDisplayCount is not 0, and pDisplays is not NULL, pDisplays must be a pointer to an array of pDisplayCount VkDisplayKHR handles
        • planeIndex must be less than the number of display planes supported by the device as determined by calling GetPhysicalDeviceDisplayPlanePropertiesKHR
        Parameters:
        physicalDevice - a physical device
        planeIndex - the plane which the application wishes to use, and must be in the range [0, physicaldeviceplanecount − 1]
        pDisplayCount - a pointer to an integer related to the number of display planes available or queried
        pDisplays - either NULL or a pointer to an array of VkDisplayKHR structures
      • vkGetDisplayModePropertiesKHR

        public static int vkGetDisplayModePropertiesKHR(VkPhysicalDevice physicalDevice,
                                                        long display,
                                                        java.nio.IntBuffer pPropertyCount,
                                                        VkDisplayModePropertiesKHR.Buffer pProperties)
        Gets the set of mode properties supported by the display.

        If pProperties is NULL, then the number of display modes available on the specified display for physicalDevice is returned in pPropertyCount. Otherwise, pPropertyCount must point to a variable set by the user to the number of elements in the pProperties array, and on return the variable is overwritten with the number of structures actually written to pProperties. If the value of pPropertyCount is less than the number of display modes for physicalDevice, at most pPropertyCount structures will be written. If pPropertyCount is smaller than the number of display modes available on the specified display for physicalDevice, INCOMPLETE will be returned instead of SUCCESS to indicate that not all the available values were returned.

        Valid Usage
        • physicalDevice must be a valid VkPhysicalDevice handle
        • display must be a valid VkDisplayKHR handle
        • pPropertyCount must be a pointer to a uint32_t value
        • If the value referenced by pPropertyCount is not 0, and pProperties is not NULL, pProperties must be a pointer to an array of pPropertyCount VkDisplayModePropertiesKHR structures
        Parameters:
        physicalDevice - the physical device associated with the display
        display - a display present on the physical device
        pPropertyCount - the number of entries in the array pointed to by pProperties
        pProperties - a pointer to an array of pPropertyCount VkDisplayModePropertiesKHR structures
      • vkCreateDisplayModeKHR

        public static int vkCreateDisplayModeKHR(VkPhysicalDevice physicalDevice,
                                                 long display,
                                                 VkDisplayModeCreateInfoKHR pCreateInfo,
                                                 VkAllocationCallbacks pAllocator,
                                                 java.nio.LongBuffer pMode)
        Creates a display mode.
        Valid Usage
        • physicalDevice must be a valid VkPhysicalDevice handle
        • display must be a valid VkDisplayKHR handle
        • pCreateInfo must be a pointer to a valid VkDisplayModeCreateInfoKHR structure
        • If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure
        • pMode must be a pointer to a VkDisplayModeKHR handle
        Host Synchronization
        • Host access to display must be externally synchronized
        Parameters:
        physicalDevice - the physical device associated with display
        display - the display to create an additional mode
        pCreateInfo - a VkDisplayModeCreateInfoKHR structure describing the new mode to create
        pAllocator - controls host memory allocation
        pMode - returns the handle of the mode created
      • vkGetDisplayPlaneCapabilitiesKHR

        public static int vkGetDisplayPlaneCapabilitiesKHR(VkPhysicalDevice physicalDevice,
                                                           long mode,
                                                           int planeIndex,
                                                           VkDisplayPlaneCapabilitiesKHR pCapabilities)
        Gets the capabilities of a mode and plane combination.

        Applications that wish to present directly to a display must select which layer, or "plane" of the display they wish to target, and a mode to use with the display. Each display supports at least one plane. The capabilities of a given mode and plane combination are determined by calling this command.

        Valid Usage
        • physicalDevice must be a valid VkPhysicalDevice handle
        • mode must be a valid VkDisplayModeKHR handle
        • pCapabilities must be a pointer to a VkDisplayPlaneCapabilitiesKHR structure
        Host Synchronization
        • Host access to mode must be externally synchronized
        Parameters:
        physicalDevice - the physical device associated with the display
        mode - the display mode the application intends to program when using the specified plane. Note this parameter also implicitly specifies a display.
        planeIndex - the plane which the application intends to use with the display, and is less than the number of display planes supported by the device
        pCapabilities - a pointer to a VkDisplayPlaneCapabilitiesKHR struct
      • vkCreateDisplayPlaneSurfaceKHR

        public static int vkCreateDisplayPlaneSurfaceKHR(VkInstance instance,
                                                         VkDisplaySurfaceCreateInfoKHR pCreateInfo,
                                                         VkAllocationCallbacks pAllocator,
                                                         java.nio.LongBuffer pSurface)
        Creates a VkSurfaceKHR structure representing a display plane and mode.
        Valid Usage
        • instance must be a valid VkInstance handle
        • pCreateInfo must be a pointer to a valid VkDisplaySurfaceCreateInfoKHR structure
        • If pAllocator is not NULL, pAllocator must be a pointer to a valid VkAllocationCallbacks structure
        • pSurface must be a pointer to a VkSurfaceKHR handle
        Parameters:
        instance - the instance corresponding to the physical device the targeted display is on
        pCreateInfo - a pointer to an instance of the VkDisplaySurfaceCreateInfoKHR structure containing the parameters affecting the creation of the surface object
        pAllocator - controls host memory allocation
        pSurface - points to a VkSurfaceKHR handle in which the created surface is returned