Monado OpenXR Runtime
comp_window_direct_randr.c File Reference

Direct mode window code. More...

#include <xcb/xcb.h>
#include <xcb/randr.h>
#include <X11/Xlib-xcb.h>
#include <X11/extensions/Xrandr.h>
#include "util/u_misc.h"
#include "main/comp_window_direct.h"
Include dependency graph for comp_window_direct_randr.c:

Data Structures

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

Functions

static void comp_window_direct_randr_destroy (struct comp_target *ct)
 
static XRT_MAYBE_UNUSED void comp_window_direct_randr_list_screens (struct comp_window_direct_randr *w)
 
static bool comp_window_direct_randr_init (struct comp_target *ct)
 
static struct comp_window_direct_randr_displaycomp_window_direct_randr_current_display (struct comp_window_direct_randr *w)
 
static bool comp_window_direct_randr_init_swapchain (struct comp_target *ct, uint32_t width, uint32_t height)
 
static VkDisplayKHR comp_window_direct_randr_get_output (struct comp_window_direct_randr *w, RROutput output)
 
static void comp_window_direct_randr_get_outputs (struct comp_window_direct_randr *w)
 
static struct vk_bundleget_vk (struct comp_window_direct_randr *cwdr)
 
static void _flush (struct comp_target *ct)
 
static void _update_window_title (struct comp_target *ct, const char *title)
 
struct comp_targetcomp_window_direct_randr_create (struct comp_compositor *c)
 
static void append_randr_display (struct comp_window_direct_randr *w, xcb_randr_get_output_info_reply_t *output_reply, xcb_randr_get_screen_resources_reply_t *resources_reply, xcb_randr_output_t xcb_output)
 
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_randr
 

Detailed Description

Variable Documentation

◆ comp_target_factory_direct_randr

const struct comp_target_factory comp_target_factory_direct_randr
Initial value:
= {
.name = "X11(RandR) Direct-Mode",
.identifier = "x11_direct",
.requires_vulkan_for_create = false,
.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,
}