}
}
+typedef void (*gpu_function)(struct arb_vp_machine *m, union instruction op);
-static void (* const opcode_func[MAX_OPCODE+3])(struct arb_vp_machine *, union instruction) =
+static gpu_function opcode_func[MAX_OPCODE+3] =
{
do_NOP,
do_ABS,
idx = REG_OUT0 + dst->Index;
break;
default:
+#if 0
+ /* IF/ELSE/ENDIF instructions will hit this */
assert(0);
+#endif
return REG_RES; /* can't happen */
}
GLuint i, j;
GLbitfield outputs;
+#define FORCE_PROG_EXECUTE_C 0
+#if FORCE_PROG_EXECUTE_C
+ return GL_TRUE;
+#else
if (!program)
return GL_TRUE;
+#endif
if (program->Base.Parameters) {
_mesa_load_state_parameters(ctx, program->Base.Parameters);
call_func( p, m );
}
else {
- GLint j;
- for (j = 0; j < p->nr_instructions; j++) {
- union instruction inst = p->instructions[j];
+ GLint pc;
+ for (pc = 0; pc < p->nr_instructions; pc++) {
+ union instruction inst = p->instructions[pc];
opcode_func[inst.alu.opcode]( m, inst );
}
}
struct arb_vp_machine *m = ARB_VP_MACHINE(stage);
struct gl_vertex_program *program = ctx->VertexProgram._Current;
+#if FORCE_OLD
+ if (0 &&program) {
+#else
if (program) {
+#endif
if (!program->TnlData)
compile_vertex_program( program, m->try_codegen );