diff options
Diffstat (limited to 'src/mesa/shader/program.c')
-rw-r--r-- | src/mesa/shader/program.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index 7a3b827352a..00655f0288a 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -53,6 +53,15 @@ _mesa_init_program(GLcontext *ctx) { GLuint i; + /* + * If this assertion fails, we need to increase the field + * size for register indexes. + */ + ASSERT(ctx->Const.VertexProgram.MaxUniformComponents / 4 + <= (1 << INST_INDEX_BITS)); + ASSERT(ctx->Const.FragmentProgram.MaxUniformComponents / 4 + <= (1 << INST_INDEX_BITS)); + ctx->Program.ErrorPos = -1; ctx->Program.ErrorString = _mesa_strdup(""); |