[Mesa-dev] [PATCH] mesa: Add missing formats in _mesa_base_format_component_count()
Anuj Phogat
anuj.phogat at gmail.com
Tue Aug 5 11:54:15 PDT 2014
Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
---
src/mesa/main/glformats.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/src/mesa/main/glformats.c b/src/mesa/main/glformats.c
index 0fb25ba..37cb9ec 100644
--- a/src/mesa/main/glformats.c
+++ b/src/mesa/main/glformats.c
@@ -1187,17 +1187,33 @@ _mesa_base_format_component_count(GLenum base_format)
{
switch (base_format) {
case GL_RED:
+ case GL_GREEN:
+ case GL_BLUE:
case GL_ALPHA:
+ case GL_RED_INTEGER:
+ case GL_GREEN_INTEGER:
+ case GL_BLUE_INTEGER:
+ case GL_ALPHA_INTEGER:
+ case GL_LUMINANCE:
case GL_INTENSITY:
case GL_DEPTH_COMPONENT:
+ case GL_STENCIL_INDEX:
return 1;
case GL_RG:
+ case GL_RG_INTEGER:
case GL_LUMINANCE_ALPHA:
case GL_DEPTH_STENCIL:
return 2;
case GL_RGB:
+ case GL_BGR:
+ case GL_RGB_INTEGER:
+ case GL_BGR_INTEGER:
return 3;
case GL_RGBA:
+ case GL_BGRA:
+ case GL_ABGR_EXT:
+ case GL_RGBA_INTEGER:
+ case GL_BGRA_INTEGER:
return 4;
default:
return -1;
--
1.9.3
More information about the mesa-dev
mailing list