aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/program/program.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-01-05 17:18:15 +0100
committermarha <marha@users.sourceforge.net>2014-01-05 17:18:15 +0100
commit0fd65ec557757ec8760a96400a09b8a8a92a7b14 (patch)
tree961d86d49281cf94e2dc85ffb88c6b1491036338 /mesalib/src/mesa/program/program.h
parent68c12003597662f95eac07ddeee99637f7caa3e5 (diff)
parent1b37f71714e2ca4af60bd050adbbb7969534dfd6 (diff)
downloadvcxsrv-0fd65ec557757ec8760a96400a09b8a8a92a7b14.tar.gz
vcxsrv-0fd65ec557757ec8760a96400a09b8a8a92a7b14.tar.bz2
vcxsrv-0fd65ec557757ec8760a96400a09b8a8a92a7b14.zip
Merge remote-tracking branch 'origin/released'
* origin/released: randrproto libXau libxcb mesa mkfontscale pixman git update 5 Jan 2014
Diffstat (limited to 'mesalib/src/mesa/program/program.h')
-rw-r--r--mesalib/src/mesa/program/program.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/mesalib/src/mesa/program/program.h b/mesalib/src/mesa/program/program.h
index 353ccab47..baff47376 100644
--- a/mesalib/src/mesa/program/program.h
+++ b/mesalib/src/mesa/program/program.h
@@ -210,14 +210,16 @@ _mesa_program_target_to_index(GLenum v)
static inline GLenum
_mesa_program_index_to_target(GLuint i)
{
- static const GLenum enums[MESA_SHADER_TYPES] = {
+ static const GLenum enums[] = {
GL_VERTEX_PROGRAM_ARB,
GL_GEOMETRY_PROGRAM_NV,
GL_FRAGMENT_PROGRAM_ARB
};
- if(i >= MESA_SHADER_TYPES)
+ STATIC_ASSERT(Elements(enums) == MESA_SHADER_TYPES);
+ if(i >= MESA_SHADER_TYPES) {
+ assert(!"Unexpected program index");
return 0;
- else
+ } else
return enums[i];
}