summaryrefslogtreecommitdiff
path: root/src/helpers/MiscFunctions.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2023-12-01 17:20:56 +0000
committerVaxry <vaxry@vaxry.net>2023-12-01 17:20:56 +0000
commit9c09f2a847a1372c73cf67dc9e7e9ebe309b142e (patch)
tree5f8b5ed8b1bd9c1cf23155ffbfded231983cd21e /src/helpers/MiscFunctions.cpp
parent8440a30231ea41a6b1dacc60a28837b265a6efec (diff)
screencopy: fix shm exports with 10-bit
fixes #4019
Diffstat (limited to 'src/helpers/MiscFunctions.cpp')
-rw-r--r--src/helpers/MiscFunctions.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp
index 71263748..16650e1b 100644
--- a/src/helpers/MiscFunctions.cpp
+++ b/src/helpers/MiscFunctions.cpp
@@ -781,4 +781,14 @@ uint32_t drmFormatToGL(uint32_t drm) {
}
UNREACHABLE();
return GL_RGBA;
+}
+
+uint32_t glFormatToType(uint32_t gl) {
+ return gl != GL_RGBA ?
+#ifdef GLES2
+ GL_UNSIGNED_INT_2_10_10_10_REV_EXT :
+#else
+ GL_UNSIGNED_INT_2_10_10_10_REV :
+#endif
+ GL_UNSIGNED_BYTE;
} \ No newline at end of file