diff options
Diffstat (limited to 'src/mesa/slang/slang_link.c')
-rw-r--r-- | src/mesa/slang/slang_link.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/mesa/slang/slang_link.c b/src/mesa/slang/slang_link.c index 00c2c13cc6..c21f67256a 100644 --- a/src/mesa/slang/slang_link.c +++ b/src/mesa/slang/slang_link.c @@ -756,6 +756,8 @@ _slang_update_inputs_outputs(struct gl_program *prog) prog->InputsRead = 0x0; prog->OutputsWritten = 0x0; + prog->IndirectRegisterFiles = 0x0; + for (i = 0; i < prog->NumInstructions; i++) { const struct prog_instruction *inst = prog->Instructions + i; const GLuint numSrc = _mesa_num_inst_src_regs(inst->Opcode); @@ -774,6 +776,9 @@ _slang_update_inputs_outputs(struct gl_program *prog) else if (inst->SrcReg[j].File == PROGRAM_ADDRESS) { maxAddrReg = MAX2(maxAddrReg, (GLuint) (inst->SrcReg[j].Index + 1)); } + + if (inst->SrcReg[j].RelAddr) + prog->IndirectRegisterFiles |= (1 << inst->SrcReg[j].File); } if (inst->DstReg.File == PROGRAM_OUTPUT) { @@ -784,6 +789,8 @@ _slang_update_inputs_outputs(struct gl_program *prog) else if (inst->DstReg.File == PROGRAM_ADDRESS) { maxAddrReg = MAX2(maxAddrReg, inst->DstReg.Index + 1); } + if (inst->DstReg.RelAddr) + prog->IndirectRegisterFiles |= (1 << inst->DstReg.File); } prog->NumAddressRegs = maxAddrReg; } @@ -1199,11 +1206,11 @@ _slang_link(GLcontext *ctx, vertNotify = ctx->Driver.ProgramStringNotify(ctx, GL_FRAGMENT_PROGRAM_ARB, &shProg->FragmentProgram->Base); if (ctx->Shader.Flags & GLSL_DUMP) { - printf("Mesa pre-link fragment program:\n"); + fprintf(stderr, "Mesa pre-link fragment program:\n"); _mesa_print_program(&fragProg->Base); _mesa_print_program_parameters(ctx, &fragProg->Base); - printf("Mesa post-link fragment program:\n"); + fprintf(stderr, "Mesa post-link fragment program:\n"); _mesa_print_program(&shProg->FragmentProgram->Base); _mesa_print_program_parameters(ctx, &shProg->FragmentProgram->Base); } @@ -1222,11 +1229,11 @@ _slang_link(GLcontext *ctx, geomNotify = ctx->Driver.ProgramStringNotify(ctx, MESA_GEOMETRY_PROGRAM, &shProg->GeometryProgram->Base); if (ctx->Shader.Flags & GLSL_DUMP) { - printf("Mesa pre-link geometry program:\n"); + fprintf(stderr, "Mesa pre-link geometry program:\n"); _mesa_print_program(&geomProg->Base); _mesa_print_program_parameters(ctx, &geomProg->Base); - printf("Mesa post-link geometry program:\n"); + fprintf(stderr, "Mesa post-link geometry program:\n"); _mesa_print_program(&shProg->GeometryProgram->Base); _mesa_print_program_parameters(ctx, &shProg->GeometryProgram->Base); } @@ -1240,11 +1247,11 @@ _slang_link(GLcontext *ctx, fragNotify = ctx->Driver.ProgramStringNotify(ctx, GL_VERTEX_PROGRAM_ARB, &shProg->VertexProgram->Base); if (ctx->Shader.Flags & GLSL_DUMP) { - printf("Mesa pre-link vertex program:\n"); + fprintf(stderr, "Mesa pre-link vertex program:\n"); _mesa_print_program(&vertProg->Base); _mesa_print_program_parameters(ctx, &vertProg->Base); - printf("Mesa post-link vertex program:\n"); + fprintf(stderr, "Mesa post-link vertex program:\n"); _mesa_print_program(&shProg->VertexProgram->Base); _mesa_print_program_parameters(ctx, &shProg->VertexProgram->Base); } @@ -1259,10 +1266,10 @@ _slang_link(GLcontext *ctx, } if (ctx->Shader.Flags & GLSL_DUMP) { - printf("Varying vars:\n"); + fprintf(stderr, "Varying vars:\n"); _mesa_print_parameter_list(shProg->Varying); if (shProg->InfoLog) { - printf("Info Log: %s\n", shProg->InfoLog); + fprintf(stderr, "Info Log: %s\n", shProg->InfoLog); } } |