mesa: assertions to check for too many vertex outputs or fragment inputs
authorBrian Paul <brianp@vmware.com>
Fri, 8 May 2009 20:34:15 +0000 (14:34 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 8 May 2009 20:35:48 +0000 (14:35 -0600)
src/mesa/main/context.c

index ddbc631e674e70921d74b08b915a84cc26a2c39c..5e0f2d7b1bdc29b8150227e480ebe2f454d97efb 100644 (file)
@@ -602,6 +602,10 @@ _mesa_init_constants(GLcontext *ctx)
    ASSERT(MAX_NV_VERTEX_PROGRAM_TEMPS <= MAX_PROGRAM_TEMPS);
    ASSERT(MAX_NV_VERTEX_PROGRAM_INPUTS <= VERT_ATTRIB_MAX);
    ASSERT(MAX_NV_VERTEX_PROGRAM_OUTPUTS <= VERT_RESULT_MAX);
+
+   /* check that we don't exceed various 32-bit bitfields */
+   ASSERT(VERT_RESULT_MAX <= 32);
+   ASSERT(FRAG_ATTRIB_MAX <= 32);
 }