diff options
author | Brian Paul <brianp@vmware.com> | 2009-08-26 10:57:18 -0600 |
---|---|---|
committer | Brian Paul <brianp@vmware.com> | 2009-08-26 12:02:24 -0600 |
commit | dd528f0ec18cfbd6f0a5b23b8cb46a97b96ab965 (patch) | |
tree | 1419765c952305dde0393ca4ba40ccf4bfbd7f9e /src/mesa | |
parent | 476290946e7bd3b7fe5688622127d8c6a9c7f367 (diff) | |
download | external_mesa3d-dd528f0ec18cfbd6f0a5b23b8cb46a97b96ab965.zip external_mesa3d-dd528f0ec18cfbd6f0a5b23b8cb46a97b96ab965.tar.gz external_mesa3d-dd528f0ec18cfbd6f0a5b23b8cb46a97b96ab965.tar.bz2 |
mesa: additional instruction field size assertions
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/shader/program.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index 4623ff6..963478f 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(""); |