Refactor kms_vaapi and kms_cuda

Also fixes color metadata, color range and hdr on nvidia wayland.
This commit is contained in:
dec05eba
2024-03-03 03:47:30 +01:00
parent 4d8a9e2e1d
commit d0c221a233
24 changed files with 894 additions and 1350 deletions

View File

@@ -3,28 +3,11 @@
#include "vec2.h"
#include "../include/egl.h"
#include "../include/defs.h"
#include <stdbool.h>
#include <stdint.h>
#include <X11/extensions/Xrandr.h>
typedef enum {
GSR_GPU_VENDOR_AMD,
GSR_GPU_VENDOR_INTEL,
GSR_GPU_VENDOR_NVIDIA
} gsr_gpu_vendor;
typedef struct {
gsr_gpu_vendor vendor;
int gpu_version; /* 0 if unknown */
} gsr_gpu_info;
typedef enum {
GSR_MONITOR_ROT_0,
GSR_MONITOR_ROT_90,
GSR_MONITOR_ROT_180,
GSR_MONITOR_ROT_270
} gsr_monitor_rotation;
typedef struct {
const char *name;
int name_len;
@@ -36,12 +19,6 @@ typedef struct {
uint32_t monitor_identifier; /* Only on drm and wayland */
} gsr_monitor;
typedef enum {
GSR_CONNECTION_X11,
GSR_CONNECTION_WAYLAND,
GSR_CONNECTION_DRM
} gsr_connection_type;
typedef struct {
const char *name;
int name_len;