r300-gallium: r500-fs: If recompiling a shader, overwrite old insts.

This commit is contained in:
Corbin Simpson 2009-03-30 17:20:12 -07:00
parent 70de577b14
commit aafbbf7744
1 changed files with 5 additions and 0 deletions

View File

@ -582,6 +582,11 @@ void r300_translate_fragment_shader(struct r300_context* r300,
/* Setup starting offset for immediates. */
assembler->imm_offset = consts->user_count;
/* Make sure we start at the beginning of the shader. */
if (is_r500) {
((struct r500_fragment_shader*)fs)->instruction_count = 0;
}
tgsi_parse_init(&parser, fs->state.tokens);
while (!tgsi_parse_end_of_tokens(&parser)) {