summaryrefslogtreecommitdiffstats
path: root/src/glx/compsize.c
diff options
context:
space:
mode:
authorAdam Jackson <[email protected]>2015-07-21 11:43:42 -0400
committerAdam Jackson <[email protected]>2015-07-31 12:32:16 -0400
commitb15aba940a3b6fc7c9bebc692968e7e9b72b9f29 (patch)
treec4533ecd020a20eec0b169d29d20aaf0dcde3277 /src/glx/compsize.c
parent30509788641a413742098f21a4ee0087b1f86e18 (diff)
glx: Fix image size computation for EXT_texture_integer (v2)
Without this this extension basically can't work in indirect contexts, TexImage2D will compute the image size as 0 and we'll send no image data to the server. v2: Add EXT_texture_integer to the client extension list too (Ian) Reviewed-by: Eric Anholt <[email protected]> Signed-off-by: Adam Jackson <[email protected]>
Diffstat (limited to 'src/glx/compsize.c')
-rw-r--r--src/glx/compsize.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/glx/compsize.c b/src/glx/compsize.c
index 99c7763c7f9..805591914c5 100644
--- a/src/glx/compsize.c
+++ b/src/glx/compsize.c
@@ -65,6 +65,8 @@ __glElementsPerGroup(GLenum format, GLenum type)
switch (format) {
case GL_RGB:
case GL_BGR:
+ case GL_RGB_INTEGER_EXT:
+ case GL_BGR_INTEGER_EXT:
return 3;
case GL_RG:
case GL_422_EXT:
@@ -74,10 +76,13 @@ __glElementsPerGroup(GLenum format, GLenum type)
case GL_DEPTH_STENCIL_NV:
case GL_YCBCR_422_APPLE:
case GL_LUMINANCE_ALPHA:
+ case GL_LUMINANCE_ALPHA_INTEGER_EXT:
return 2;
case GL_RGBA:
case GL_BGRA:
case GL_ABGR_EXT:
+ case GL_RGBA_INTEGER_EXT:
+ case GL_BGRA_INTEGER_EXT:
return 4;
case GL_COLOR_INDEX:
case GL_STENCIL_INDEX:
@@ -88,6 +93,11 @@ __glElementsPerGroup(GLenum format, GLenum type)
case GL_ALPHA:
case GL_LUMINANCE:
case GL_INTENSITY:
+ case GL_RED_INTEGER_EXT:
+ case GL_GREEN_INTEGER_EXT:
+ case GL_BLUE_INTEGER_EXT:
+ case GL_ALPHA_INTEGER_EXT:
+ case GL_LUMINANCE_INTEGER_EXT:
return 1;
default:
return 0;