summaryrefslogtreecommitdiff
path: root/src/helpers/Format.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-06-12 23:29:24 +0200
committerVaxry <vaxry@vaxry.net>2024-06-12 23:29:24 +0200
commita9d7befc36f2890f080d02b8c04b678778ded080 (patch)
tree01ecd7d729ad118fd8127338b4a804990f4c2bcf /src/helpers/Format.cpp
parent0e18da8467136806d191f84c88aa7536453869e0 (diff)
formats: fixup for legacy_renderer builds
Diffstat (limited to 'src/helpers/Format.cpp')
-rw-r--r--src/helpers/Format.cpp94
1 files changed, 62 insertions, 32 deletions
diff --git a/src/helpers/Format.cpp b/src/helpers/Format.cpp
index 343440b4..9c94f68b 100644
--- a/src/helpers/Format.cpp
+++ b/src/helpers/Format.cpp
@@ -93,70 +93,100 @@ inline const std::vector<SPixelFormat> GLES3_FORMATS = {
.bytesPerBlock = 2,
},
{
- .drmFormat = DRM_FORMAT_XBGR2101010,
- .glFormat = GL_RGBA,
- .glType = GL_UNSIGNED_INT_2_10_10_10_REV,
+ .drmFormat = DRM_FORMAT_XBGR2101010,
+ .glFormat = GL_RGBA,
+#ifndef GLES2
+ .glType = GL_UNSIGNED_INT_2_10_10_10_REV,
+#else
+ .glType = GL_UNSIGNED_INT_2_10_10_10_REV_EXT,
+#endif
.withAlpha = false,
.alphaStripped = DRM_FORMAT_XBGR2101010,
.bytesPerBlock = 4,
},
{
- .drmFormat = DRM_FORMAT_ABGR2101010,
- .glFormat = GL_RGBA,
- .glType = GL_UNSIGNED_INT_2_10_10_10_REV,
+ .drmFormat = DRM_FORMAT_ABGR2101010,
+ .glFormat = GL_RGBA,
+#ifndef GLES2
+ .glType = GL_UNSIGNED_INT_2_10_10_10_REV,
+#else
+ .glType = GL_UNSIGNED_INT_2_10_10_10_REV_EXT,
+#endif
.withAlpha = true,
.alphaStripped = DRM_FORMAT_XBGR2101010,
.bytesPerBlock = 4,
},
{
- .drmFormat = DRM_FORMAT_XRGB2101010,
- .glFormat = GL_RGBA,
- .glType = GL_UNSIGNED_INT_2_10_10_10_REV,
+ .drmFormat = DRM_FORMAT_XRGB2101010,
+ .glFormat = GL_RGBA,
+#ifndef GLES2
+ .glType = GL_UNSIGNED_INT_2_10_10_10_REV,
+#else
+ .glType = GL_UNSIGNED_INT_2_10_10_10_REV_EXT,
+#endif
.withAlpha = false,
.alphaStripped = DRM_FORMAT_XRGB2101010,
.bytesPerBlock = 4,
},
{
- .drmFormat = DRM_FORMAT_ARGB2101010,
- .glFormat = GL_RGBA,
- .glType = GL_UNSIGNED_INT_2_10_10_10_REV,
+ .drmFormat = DRM_FORMAT_ARGB2101010,
+ .glFormat = GL_RGBA,
+#ifndef GLES2
+ .glType = GL_UNSIGNED_INT_2_10_10_10_REV,
+#else
+ .glType = GL_UNSIGNED_INT_2_10_10_10_REV_EXT,
+#endif
.withAlpha = true,
.alphaStripped = DRM_FORMAT_XRGB2101010,
.bytesPerBlock = 4,
},
{
- .drmFormat = DRM_FORMAT_XBGR16161616F,
- .glFormat = GL_RGBA,
- .glType = GL_HALF_FLOAT,
+ .drmFormat = DRM_FORMAT_XBGR16161616F,
+ .glFormat = GL_RGBA,
+#ifndef GLES2
+ .glType = GL_HALF_FLOAT,
+#else
+ .glType = GL_HALF_FLOAT_OES,
+#endif
.withAlpha = false,
.alphaStripped = DRM_FORMAT_XBGR16161616F,
.bytesPerBlock = 8,
},
{
- .drmFormat = DRM_FORMAT_ABGR16161616F,
- .glFormat = GL_RGBA,
- .glType = GL_HALF_FLOAT,
+ .drmFormat = DRM_FORMAT_ABGR16161616F,
+ .glFormat = GL_RGBA,
+#ifndef GLES2
+ .glType = GL_HALF_FLOAT,
+#else
+ .glType = GL_HALF_FLOAT_OES,
+#endif
.withAlpha = true,
.alphaStripped = DRM_FORMAT_XBGR16161616F,
.bytesPerBlock = 8,
},
{
- .drmFormat = DRM_FORMAT_XBGR16161616,
- .glInternalFormat = GL_RGBA16UI,
- .glFormat = GL_RGBA,
- .glType = GL_UNSIGNED_SHORT,
- .withAlpha = false,
- .alphaStripped = DRM_FORMAT_XBGR16161616,
- .bytesPerBlock = 8,
+ .drmFormat = DRM_FORMAT_XBGR16161616,
+#ifndef GLES2
+ .glFormat = GL_RGBA16UI,
+#else
+ .glFormat = GL_RGBA16_EXT,
+#endif
+ .glType = GL_UNSIGNED_SHORT,
+ .withAlpha = false,
+ .alphaStripped = DRM_FORMAT_XBGR16161616,
+ .bytesPerBlock = 8,
},
{
- .drmFormat = DRM_FORMAT_ABGR16161616,
- .glInternalFormat = GL_RGBA16UI,
- .glFormat = GL_RGBA,
- .glType = GL_UNSIGNED_SHORT,
- .withAlpha = true,
- .alphaStripped = DRM_FORMAT_XBGR16161616,
- .bytesPerBlock = 8,
+ .drmFormat = DRM_FORMAT_ABGR16161616,
+#ifndef GLES2
+ .glFormat = GL_RGBA16UI,
+#else
+ .glFormat = GL_RGBA16_EXT,
+#endif
+ .glType = GL_UNSIGNED_SHORT,
+ .withAlpha = true,
+ .alphaStripped = DRM_FORMAT_XBGR16161616,
+ .bytesPerBlock = 8,
},
{
.drmFormat = DRM_FORMAT_YVYU,