Monado OpenXR Runtime
comp_window_direct_nvidia.c File Reference

Direct mode window code. More...

Include dependency graph for comp_window_direct_nvidia.c:

Data Structures

struct  comp_window_direct_nvidia_display
 Probed display. More...
 
struct  comp_window_direct_nvidia
 Direct mode "window" into a device, using Vulkan direct mode extension and xcb. More...
 

Macros

#define NVIDIA_VENDOR_ID   (0x10DE)
 NVIDIA Vendor ID. More...
 

Functions

static void comp_window_direct_nvidia_destroy (struct comp_target *ct)
 
static bool comp_window_direct_nvidia_init (struct comp_target *ct)
 
static struct comp_window_direct_nvidia_displaycomp_window_direct_nvidia_current_display (struct comp_window_direct_nvidia *w)
 
static bool comp_window_direct_nvidia_init_swapchain (struct comp_target *ct, uint32_t width, uint32_t height)
 
static struct vk_bundleget_vk (struct comp_target *ct)
 
static void _flush (struct comp_target *ct)
 
static void _update_window_title (struct comp_target *ct, const char *title)
 
struct comp_targetcomp_window_direct_nvidia_create (struct comp_compositor *c)
 
static bool append_nvidia_entry_on_match (struct comp_window_direct_nvidia *w, const char *wl_entry, struct VkDisplayPropertiesKHR *disp)
 
static bool _match_allowlist_entry (const char *al_entry, VkDisplayPropertiesKHR *disp)
 
static bool _test_for_nvidia (struct comp_compositor *c, struct vk_bundle *vk)
 
static bool check_vulkan_caps (struct comp_compositor *c, bool *out_detected)
 
static bool detect (const struct comp_target_factory *ctf, struct comp_compositor *c)
 
static bool create_target (const struct comp_target_factory *ctf, struct comp_compositor *c, struct comp_target **out_ct)
 

Variables

static const char * instance_extensions []
 
const struct comp_target_factory comp_target_factory_direct_nvidia
 

Detailed Description

Macro Definition Documentation

◆ NVIDIA_VENDOR_ID

#define NVIDIA_VENDOR_ID   (0x10DE)

NVIDIA Vendor ID.

Function Documentation

◆ comp_window_direct_nvidia_init()

static bool comp_window_direct_nvidia_init ( struct comp_target ct)
static
Todo:
what if we have multiple allowlisted HMD displays connected?

Variable Documentation

◆ comp_target_factory_direct_nvidia

const struct comp_target_factory comp_target_factory_direct_nvidia
Initial value:
= {
.name = "NVIDIA Direct-Mode",
.identifier = "x11_direct_nvidia",
.requires_vulkan_for_create = true,
.is_deferred = false,
.required_instance_version = 0,
.required_instance_extensions = instance_extensions,
.required_instance_extension_count = ARRAY_SIZE(instance_extensions),
.optional_device_extensions = NULL,
.optional_device_extension_count = 0,
.detect = detect,
.create_target = create_target,
}
#define ARRAY_SIZE(a)
Array size helper.
Definition: xrt_compiler.h:30

◆ instance_extensions

const char* instance_extensions[]
static
Initial value:
= {
VK_KHR_DISPLAY_EXTENSION_NAME,
VK_EXT_DIRECT_MODE_DISPLAY_EXTENSION_NAME,
VK_EXT_ACQUIRE_XLIB_DISPLAY_EXTENSION_NAME,
}