static void r300_vs_op_dump(uint32_t op)
{
- if (op & 0x81) {
- debug_printf("PVS_MACRO_OP_2CLK_M2X_ADD\n");
- } else if (op & 0x80) {
- debug_printf(" PVS_MACRO_OP_2CLK_MADD\n");
+ if (op & 0x80) {
+ if (op & 0x1) {
+ debug_printf("PVS_MACRO_OP_2CLK_M2X_ADD\n");
+ } else {
+ debug_printf(" PVS_MACRO_OP_2CLK_MADD\n");
+ }
} else if (op & 0x40) {
debug_printf("%s\n", r300_vs_me_ops[op & 0x1f]);
} else {
struct r300_vertex_shader* vs = CALLOC_STRUCT(r300_vertex_shader);
/* Copy state directly into shader. */
vs->state = *shader;
+ vs->state.tokens = tgsi_dup_tokens(shader->tokens);
tgsi_scan_shader(shader->tokens, &vs->info);
struct r300_vertex_shader* vs = (struct r300_vertex_shader*)shader;
draw_delete_vertex_shader(r300->draw, vs->draw);
+ FREE(vs->state.tokens);
FREE(shader);
} else {
draw_delete_vertex_shader(r300->draw,
int i;
struct r300_constant_buffer* consts =
&r300->shader_constants[PIPE_SHADER_VERTEX];
+ boolean end = FALSE;
+ int spurious = 0;
struct r300_vs_asm* assembler = CALLOC_STRUCT(r300_vs_asm);
if (assembler == NULL) {
assembler->imm_count++;
break;
case TGSI_TOKEN_TYPE_INSTRUCTION:
- r300_vs_instruction(vs, assembler,
- &parser.FullToken.FullInstruction);
+ if (parser.FullToken.FullInstruction.Instruction.Opcode ==
+ TGSI_OPCODE_END) {
+ end = TRUE;
+ }
+ if (end) {
+ spurious++;
+ } else {
+ r300_vs_instruction(vs, assembler,
+ &parser.FullToken.FullInstruction);
+ }
break;
}
}
debug_printf("r300: vs: tab: %d %d %d %d\n", assembler->tab[0],
assembler->tab[1], assembler->tab[2], assembler->tab[3]);
+ debug_printf("r300: vs: %d spurious instructions following END\n",
+ spurious - 1);
+
tgsi_dump(vs->state.tokens);
/* XXX finish r300 vertex shader dumper */
r300_vs_dump(vs);