/*
* If this assertion fails, we need to increase the field
- * size for register indexes.
+ * size for register indexes (see INST_INDEX_BITS).
*/
ASSERT(ctx->Const.VertexProgram.MaxUniformComponents / 4
<= (1 << INST_INDEX_BITS));
ASSERT(ctx->Const.FragmentProgram.MaxUniformComponents / 4
<= (1 << INST_INDEX_BITS));
+ ASSERT(ctx->Const.VertexProgram.MaxTemps <= (1 << INST_INDEX_BITS));
+ ASSERT(ctx->Const.VertexProgram.MaxLocalParams <= (1 << INST_INDEX_BITS));
+ ASSERT(ctx->Const.FragmentProgram.MaxTemps <= (1 << INST_INDEX_BITS));
+ ASSERT(ctx->Const.FragmentProgram.MaxLocalParams <= (1 << INST_INDEX_BITS));
+
+ ASSERT(ctx->Const.VertexProgram.MaxUniformComponents <= 4 * MAX_UNIFORMS);
+ ASSERT(ctx->Const.FragmentProgram.MaxUniformComponents <= 4 * MAX_UNIFORMS);
+
/* If this fails, increase prog_instruction::TexSrcUnit size */
ASSERT(MAX_TEXTURE_UNITS < (1 << 5));