From dd528f0ec18cfbd6f0a5b23b8cb46a97b96ab965 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 26 Aug 2009 10:57:18 -0600 Subject: [PATCH] mesa: additional instruction field size assertions --- src/mesa/shader/program.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index 4623ff60de6..963478fccdb 100644 --- a/src/mesa/shader/program.c +++ b/src/mesa/shader/program.c @@ -62,6 +62,12 @@ _mesa_init_program(GLcontext *ctx) ASSERT(ctx->Const.FragmentProgram.MaxUniformComponents / 4 <= (1 << INST_INDEX_BITS)); + /* If this fails, increase prog_instruction::TexSrcUnit size */ + ASSERT(MAX_TEXTURE_UNITS < (1 << 5)); + + /* If this fails, increase prog_instruction::TexSrcTarget size */ + ASSERT(NUM_TEXTURE_TARGETS < (1 << 3)); + ctx->Program.ErrorPos = -1; ctx->Program.ErrorString = _mesa_strdup(""); -- 2.30.2