summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2008-12-17 13:17:15 -0700
committerBrian Paul <[email protected]>2008-12-17 14:06:34 -0700
commit35bb2aa96a2499860869c0d307b599b3033b5264 (patch)
tree4cde91326e852709ab8b5d08ff51dab3c7ea2aed /src
parenta8751f49167df81611390377aa3e84aba1ed3ae3 (diff)
mesa: add missing cases for texture array targets
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/texenvprogram.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/mesa/main/texenvprogram.c b/src/mesa/main/texenvprogram.c
index c279956f2a2..0294c107b2e 100644
--- a/src/mesa/main/texenvprogram.c
+++ b/src/mesa/main/texenvprogram.c
@@ -179,13 +179,17 @@ static GLuint translate_mode( GLenum mode )
#define TEXTURE_UNKNOWN_INDEX 7
static GLuint translate_tex_src_bit( GLbitfield bit )
{
+ /* make sure number of switch cases is correct */
+ assert(NUM_TEXTURE_TARGETS == 7);
switch (bit) {
- case TEXTURE_1D_BIT: return TEXTURE_1D_INDEX;
- case TEXTURE_2D_BIT: return TEXTURE_2D_INDEX;
- case TEXTURE_RECT_BIT: return TEXTURE_RECT_INDEX;
- case TEXTURE_3D_BIT: return TEXTURE_3D_INDEX;
- case TEXTURE_CUBE_BIT: return TEXTURE_CUBE_INDEX;
- default: return TEXTURE_UNKNOWN_INDEX;
+ case TEXTURE_1D_BIT: return TEXTURE_1D_INDEX;
+ case TEXTURE_2D_BIT: return TEXTURE_2D_INDEX;
+ case TEXTURE_3D_BIT: return TEXTURE_3D_INDEX;
+ case TEXTURE_CUBE_BIT: return TEXTURE_CUBE_INDEX;
+ case TEXTURE_RECT_BIT: return TEXTURE_RECT_INDEX;
+ case TEXTURE_1D_ARRAY_BIT: return TEXTURE_1D_ARRAY_INDEX;
+ case TEXTURE_2D_ARRAY_BIT: return TEXTURE_2D_ARRAY_INDEX;
+ default: return TEXTURE_UNKNOWN_INDEX;
}
}