code->node[0].alu_end = -1;
code->node[0].tex_end = -1;
- if (!radeonPairProgram(compiler->ctx, compiler->program, &pair_handler, compiler))
+ if (!radeonPairProgram(compiler->program, &pair_handler, compiler))
return GL_FALSE;
if (!finish_node(compiler))
#include "shader/prog_print.h"
#define error(fmt, args...) do { \
- _mesa_problem(s->Ctx, "%s::%s(): " fmt "\n", \
+ fprintf(stderr, "r300 driver problem: %s::%s(): " fmt "\n", \
__FILE__, __FUNCTION__, ##args); \
s->Error = GL_TRUE; \
} while(0)
};
struct pair_state {
- GLcontext *Ctx;
struct memory_pool Pool;
struct gl_program *Program;
const struct radeon_pair_handler *Handler;
struct pair_register_translation *t = get_register(s, file, index);
if (!t) {
- _mesa_problem(s->Ctx, "get_hw_reg: %i[%i]\n", file, index);
+ error("get_hw_reg: %i[%i]\n", file, index);
return 0;
}
InputsRead &= ~FRAG_BIT_COL1;
/* Texcoords */
- for (i = 0; i < s->Ctx->Const.MaxTextureUnits; i++) {
+ for (i = 0; i < 8; i++) {
if (InputsRead & (FRAG_BIT_TEX0 << i))
alloc_hw_reg(s, PROGRAM_INPUT, FRAG_ATTRIB_TEX0+i, hwindex++);
}
}
-GLboolean radeonPairProgram(GLcontext *ctx, struct gl_program *program,
+GLboolean radeonPairProgram(struct gl_program *program,
const struct radeon_pair_handler* handler, void *userdata)
{
struct pair_state s;
_mesa_bzero(&s, sizeof(s));
- s.Ctx = ctx;
memory_pool_init(&s.Pool);
s.Program = program;
s.Handler = handler;
GLuint MaxHwTemps;
};
-GLboolean radeonPairProgram(GLcontext *ctx, struct gl_program *program,
+GLboolean radeonPairProgram(struct gl_program *program,
const struct radeon_pair_handler*, void *userdata);
void radeonPrintPairInstruction(struct radeon_pair_instruction *inst);