diff options
author | Brian Paul <[email protected]> | 2010-08-10 08:38:12 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-08-10 08:38:19 -0600 |
commit | 4567b479531d2791ad2d6a598c9dd9e3730b0504 (patch) | |
tree | a17558673583e11f81f7b1a354e201c011765afb /src/mesa/program/program.c | |
parent | b80a830cd8cbad128aad3edb2eef4cb40e7b145b (diff) |
mesa: additional program limit assertions
Diffstat (limited to 'src/mesa/program/program.c')
-rw-r--r-- | src/mesa/program/program.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c index d99584d63bf..3b6d6827446 100644 --- a/src/mesa/program/program.c +++ b/src/mesa/program/program.c @@ -55,13 +55,21 @@ _mesa_init_program(GLcontext *ctx) /* * 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)); |