aboutsummaryrefslogtreecommitdiff
path: root/include/capture
diff options
context:
space:
mode:
authordec05eba <dec05eba®protonmail.com>2023-04-14 09:36:24 +0200
committerdec05eba <dec05eba@protonmail.com>2023-04-15 19:06:08 +0200
commitf6107a0c5d41aa9fbaa41d64e2f6a5681f9237cc (patch)
tree8fae2bf69dd325d1da0ab1e475a58f32435768cf /include/capture
parent5c714ea7142272b7b95b95019501df1d49691db1 (diff)
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%.
Diffstat (limited to 'include/capture')
-rw-r--r--include/capture/kms_vaapi.h4
1 files changed, 3 insertions, 1 deletions
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 <X11/X.h>
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);