From f6107a0c5d41aa9fbaa41d64e2f6a5681f9237cc Mon Sep 17 00:00:00 2001 From: dec05eba Date: Fri, 14 Apr 2023 09:36:24 +0200 Subject: Fix AMD single monitor rotated display being rotated in recording If there is only one monitor connected and it's rotated then the drm buf will also be rotated. This only the case with AMD and only when using one monitor! To fix this, we perform color conversion with an opengl shader which allows us to also rotate the texture. VAAPI supports rotation but it's not implemented by AMD at least. Performance seems to be the same as when using VAAPI, even when GPU usage is 100%. --- include/capture/kms_vaapi.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/capture/kms_vaapi.h') diff --git a/include/capture/kms_vaapi.h b/include/capture/kms_vaapi.h index ba5763b..a4aa3ed 100644 --- a/include/capture/kms_vaapi.h +++ b/include/capture/kms_vaapi.h @@ -1,8 +1,9 @@ #ifndef GSR_CAPTURE_KMS_VAAPI_H #define GSR_CAPTURE_KMS_VAAPI_H -#include "capture.h" #include "../vec2.h" +#include "../utils.h" +#include "capture.h" #include typedef struct _XDisplay Display; @@ -10,6 +11,7 @@ typedef struct _XDisplay Display; typedef struct { Display *dpy; const char *display_to_capture; /* if this is "screen", then the entire x11 screen is captured (all displays). A copy is made of this */ + gsr_gpu_info gpu_inf; } gsr_capture_kms_vaapi_params; gsr_capture* gsr_capture_kms_vaapi_create(const gsr_capture_kms_vaapi_params *params); -- cgit v1.2.3