gl: Support ColorBuffers of A2B10G10R10 format.
There's no equivalent internal formats to Vulkan A2B10G10R10 format
in GL, which makes it hard to create a color buffer with such
format.
In this change, we introduce an enum GL_BGR10_A2_ANGLEX to represent
A2B10G10R10 formats and translate the format to corresponding
format/type when calling glTexImage2D to create textures.
Change-Id: I63274ae4e75c678e07f0ef0df8ea4f0729d2cddf
diff --git a/stream-servers/vulkan/VkCommonOperations.cpp b/stream-servers/vulkan/VkCommonOperations.cpp
index 1c2407d..99b3793 100644
--- a/stream-servers/vulkan/VkCommonOperations.cpp
+++ b/stream-servers/vulkan/VkCommonOperations.cpp
@@ -1316,6 +1316,8 @@
case GL_RGB10_A2:
case GL_UNSIGNED_INT_10_10_10_2_OES:
return VK_FORMAT_A2R10G10B10_UNORM_PACK32;
+ case GL_BGR10_A2_ANGLEX:
+ return VK_FORMAT_A2B10G10R10_UNORM_PACK32;
case GL_RGBA16F:
return VK_FORMAT_R16G16B16A16_SFLOAT;
case GL_BGRA_EXT: