projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4762909
)
mesa: additional instruction field size assertions
author
Brian Paul
<brianp@vmware.com>
Wed, 26 Aug 2009 16:57:18 +0000
(10:57 -0600)
committer
Brian Paul
<brianp@vmware.com>
Wed, 26 Aug 2009 18:02:24 +0000
(12:02 -0600)
src/mesa/shader/program.c
patch
|
blob
|
history
diff --git
a/src/mesa/shader/program.c
b/src/mesa/shader/program.c
index 4623ff60de6b5c5a7fe64f11ec44a314b8fa9cbb..963478fccdbdfa9e3de918222034d80997d6aef2 100644
(file)
--- 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("");