From: Corbin Simpson Date: Tue, 31 Mar 2009 00:20:12 +0000 (-0700) Subject: r300-gallium: r500-fs: If recompiling a shader, overwrite old insts. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=aafbbf77441dedf6015a4ab61cc7a82ef592415f;p=mesa.git r300-gallium: r500-fs: If recompiling a shader, overwrite old insts. --- diff --git a/src/gallium/drivers/r300/r300_state_shader.c b/src/gallium/drivers/r300/r300_state_shader.c index ed9d26f0b9b..5dc7266f9b1 100644 --- a/src/gallium/drivers/r300/r300_state_shader.c +++ b/src/gallium/drivers/r300/r300_state_shader.c @@ -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)) {