aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/helpers
diff options
context:
space:
mode:
authorpastalian <[email protected]>2023-11-04 00:47:20 +0900
committerGitHub <[email protected]>2023-11-03 15:47:20 +0000
commit49fdffacea92bc99391da0a9347b34c27d1b4525 (patch)
treeb7875e8da2dff1d4bad8983d98ccc7a154f1aac6 /src/helpers
parent0f6e53079864d411aa2de3262ba4c01eeeec4f5b (diff)
downloadHyprland-49fdffacea92bc99391da0a9347b34c27d1b4525.tar.gz
Hyprland-49fdffacea92bc99391da0a9347b34c27d1b4525.zip
renderer: fix legacy_renderer build (#3732)
In GLES2, `GL_RGB10_A2` and `GL_UNSIGNED_INT_2_10_10_10_REV` are defined as `GL_RGB10_A2_EXT` and `GL_UNSIGNED_INT_2_10_10_10_REV_EXT` respectively.
Diffstat (limited to 'src/helpers')
-rw-r--r--src/helpers/MiscFunctions.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp
index acb9cf20..b65f4a87 100644
--- a/src/helpers/MiscFunctions.cpp
+++ b/src/helpers/MiscFunctions.cpp
@@ -757,7 +757,12 @@ uint32_t drmFormatToGL(uint32_t drm) {
case DRM_FORMAT_XRGB8888:
case DRM_FORMAT_XBGR8888: return GL_RGBA; // doesn't matter, opengl is gucci in this case.
case DRM_FORMAT_XRGB2101010:
- case DRM_FORMAT_XBGR2101010: return GL_RGB10_A2;
+ case DRM_FORMAT_XBGR2101010:
+#ifdef GLES2
+ return GL_RGB10_A2_EXT;
+#else
+ return GL_RGB10_A2;
+#endif
default: return GL_RGBA;
}
UNREACHABLE();