diff options
author | Corbin Simpson <[email protected]> | 2009-05-17 10:33:56 -0700 |
---|---|---|
committer | Corbin Simpson <[email protected]> | 2009-05-17 10:34:41 -0700 |
commit | 45435abcb967931c79aba1714ae797a1c5dc075e (patch) | |
tree | 5acfeae57e81c2973a97418bebaaa7647f291ca9 /src | |
parent | 8dae8f28e52ed20b087ecf0d09efe2d94bdd09cf (diff) |
r300-gallium: vs: Fix vert shader init.
Makes the last three commits suck much less. :3
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/r300/r300_state_tcl.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/src/gallium/drivers/r300/r300_state_tcl.c b/src/gallium/drivers/r300/r300_state_tcl.c index 8b7a2ec5e9c..fdbcbf3db8c 100644 --- a/src/gallium/drivers/r300/r300_state_tcl.c +++ b/src/gallium/drivers/r300/r300_state_tcl.c @@ -325,6 +325,8 @@ static void r300_vs_init(struct r300_vertex_shader* vs, break; } } + + vs->instruction_count = 0; } void r300_translate_vertex_shader(struct r300_context* r300, @@ -334,8 +336,6 @@ void r300_translate_vertex_shader(struct r300_context* r300, 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) { @@ -375,16 +375,8 @@ void r300_translate_vertex_shader(struct r300_context* r300, assembler->imm_count++; break; case TGSI_TOKEN_TYPE_INSTRUCTION: - if (parser.FullToken.FullInstruction.Instruction.Opcode == - TGSI_OPCODE_END) { - end = TRUE; - } - if (end) { - spurious++; - } else { - r300_vs_instruction(vs, assembler, - &parser.FullToken.FullInstruction); - } + r300_vs_instruction(vs, assembler, + &parser.FullToken.FullInstruction); break; } } @@ -401,9 +393,6 @@ void r300_translate_vertex_shader(struct r300_context* r300, 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); |