diff options
author | Alan Hourihane <[email protected]> | 2008-11-01 22:57:26 +0000 |
---|---|---|
committer | Alan Hourihane <[email protected]> | 2008-11-01 22:57:26 +0000 |
commit | 81c862205e32b163a9f5ecf3f59e4cdcccee36c6 (patch) | |
tree | 50a5f45f1a0823758e72968d1f1dfd6e0d1098e0 /src/mesa/shader/slang/slang_link.c | |
parent | 14e1505cce24ee294cb98683504cc4537c20f34a (diff) | |
parent | bbffed0857634912c7a1f13882eba303ae2bf4e1 (diff) |
Merge commit 'origin/master' into gallium-0.2
Conflicts:
src/mesa/shader/slang/library/slang_vertex_builtin_gc.h
Diffstat (limited to 'src/mesa/shader/slang/slang_link.c')
-rw-r--r-- | src/mesa/shader/slang/slang_link.c | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/src/mesa/shader/slang/slang_link.c b/src/mesa/shader/slang/slang_link.c index 00e89537685..11fdf3b9dc3 100644 --- a/src/mesa/shader/slang/slang_link.c +++ b/src/mesa/shader/slang/slang_link.c @@ -219,6 +219,7 @@ link_uniform_vars(struct gl_shader_program *shProg, inst->Sampler, map[ inst->Sampler ]); */ /* here, texUnit is really samplerUnit */ + assert(inst->TexSrcUnit < MAX_SAMPLERS); inst->TexSrcUnit = samplerMap[inst->TexSrcUnit]; prog->SamplerTargets[inst->TexSrcUnit] = inst->TexSrcTarget; prog->SamplersUsed |= (1 << inst->TexSrcUnit); @@ -563,32 +564,30 @@ _slang_link(GLcontext *ctx, /* notify driver that a new fragment program has been compiled/linked */ ctx->Driver.ProgramStringNotify(ctx, GL_FRAGMENT_PROGRAM_ARB, &shProg->FragmentProgram->Base); -#if 0 - printf("************** original fragment program\n"); - _mesa_print_program(&fragProg->Base); - _mesa_print_program_parameters(ctx, &fragProg->Base); -#endif -#if 0 - printf("************** linked fragment prog\n"); - _mesa_print_program(&shProg->FragmentProgram->Base); - _mesa_print_program_parameters(ctx, &shProg->FragmentProgram->Base); -#endif + if (MESA_VERBOSE & VERBOSE_GLSL_DUMP) { + printf("Mesa original fragment program:\n"); + _mesa_print_program(&fragProg->Base); + _mesa_print_program_parameters(ctx, &fragProg->Base); + + printf("Mesa post-link fragment program:\n"); + _mesa_print_program(&shProg->FragmentProgram->Base); + _mesa_print_program_parameters(ctx, &shProg->FragmentProgram->Base); + } } if (vertProg && shProg->VertexProgram) { /* notify driver that a new vertex program has been compiled/linked */ ctx->Driver.ProgramStringNotify(ctx, GL_VERTEX_PROGRAM_ARB, &shProg->VertexProgram->Base); -#if 0 - printf("************** original vertex program\n"); - _mesa_print_program(&vertProg->Base); - _mesa_print_program_parameters(ctx, &vertProg->Base); -#endif -#if 0 - printf("************** linked vertex prog\n"); - _mesa_print_program(&shProg->VertexProgram->Base); - _mesa_print_program_parameters(ctx, &shProg->VertexProgram->Base); -#endif + if (MESA_VERBOSE & VERBOSE_GLSL_DUMP) { + printf("Mesa original vertex program:\n"); + _mesa_print_program(&vertProg->Base); + _mesa_print_program_parameters(ctx, &vertProg->Base); + + printf("Mesa post-link vertex program:\n"); + _mesa_print_program(&shProg->VertexProgram->Base); + _mesa_print_program_parameters(ctx, &shProg->VertexProgram->Base); + } } shProg->LinkStatus = (shProg->VertexProgram || shProg->FragmentProgram); |