aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-09-25 09:37:58 +0200
committermarha <marha@users.sourceforge.net>2013-09-25 09:37:58 +0200
commit1245204b2091d108a8688ff7f749f2c6cc830381 (patch)
treec903bf477d9ddf666685494f3b035680d5d41580 /mesalib/src/mesa/main/teximage.c
parentb299d73bb416e2a26a642a54d5a15ea9fa30df33 (diff)
parent14718f10dcda487178690de9a51cc5acdf21e468 (diff)
downloadvcxsrv-1245204b2091d108a8688ff7f749f2c6cc830381.tar.gz
vcxsrv-1245204b2091d108a8688ff7f749f2c6cc830381.tar.bz2
vcxsrv-1245204b2091d108a8688ff7f749f2c6cc830381.zip
Merge remote-tracking branch 'origin/released'
* origin/released: fontconfig mesa git update 25 Sep 2013
Diffstat (limited to 'mesalib/src/mesa/main/teximage.c')
-rw-r--r--mesalib/src/mesa/main/teximage.c33
1 files changed, 20 insertions, 13 deletions
diff --git a/mesalib/src/mesa/main/teximage.c b/mesalib/src/mesa/main/teximage.c
index b719fc856..c1261138d 100644
--- a/mesalib/src/mesa/main/teximage.c
+++ b/mesalib/src/mesa/main/teximage.c
@@ -661,22 +661,29 @@ _mesa_delete_texture_image(struct gl_context *ctx,
GLboolean
_mesa_is_proxy_texture(GLenum target)
{
+ unsigned i;
+ static const GLenum targets[] = {
+ GL_PROXY_TEXTURE_1D,
+ GL_PROXY_TEXTURE_2D,
+ GL_PROXY_TEXTURE_3D,
+ GL_PROXY_TEXTURE_CUBE_MAP,
+ GL_PROXY_TEXTURE_RECTANGLE,
+ GL_PROXY_TEXTURE_1D_ARRAY,
+ GL_PROXY_TEXTURE_2D_ARRAY,
+ GL_PROXY_TEXTURE_CUBE_MAP_ARRAY,
+ GL_PROXY_TEXTURE_2D_MULTISAMPLE,
+ GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY
+ };
/*
- * NUM_TEXTURE_TARGETS should match number of terms below, except there's no
+ * NUM_TEXTURE_TARGETS should match number of terms above, except there's no
* proxy for GL_TEXTURE_BUFFER and GL_TEXTURE_EXTERNAL_OES.
*/
- assert(NUM_TEXTURE_TARGETS == 10 + 2);
-
- return (target == GL_PROXY_TEXTURE_1D ||
- target == GL_PROXY_TEXTURE_2D ||
- target == GL_PROXY_TEXTURE_3D ||
- target == GL_PROXY_TEXTURE_CUBE_MAP_ARB ||
- target == GL_PROXY_TEXTURE_RECTANGLE_NV ||
- target == GL_PROXY_TEXTURE_1D_ARRAY_EXT ||
- target == GL_PROXY_TEXTURE_2D_ARRAY_EXT ||
- target == GL_PROXY_TEXTURE_CUBE_MAP_ARRAY ||
- target == GL_PROXY_TEXTURE_2D_MULTISAMPLE ||
- target == GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY);
+ STATIC_ASSERT(NUM_TEXTURE_TARGETS == Elements(targets) + 2);
+
+ for (i = 0; i < Elements(targets); ++i)
+ if (target == targets[i])
+ return GL_TRUE;
+ return GL_FALSE;
}