diff options
Diffstat (limited to 'src/mesa/shader/program.c')
-rw-r--r-- | src/mesa/shader/program.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c index 4623ff60de..2cd6eb8a38 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(""); @@ -496,6 +502,7 @@ _mesa_clone_program(GLcontext *ctx, const struct gl_program *prog) = (const struct gl_vertex_program *) prog; struct gl_vertex_program *vpc = (struct gl_vertex_program *) clone; vpc->IsPositionInvariant = vp->IsPositionInvariant; + vpc->IsNVProgram = vp->IsNVProgram; } break; case GL_FRAGMENT_PROGRAM_ARB: |