From aafbbf77441dedf6015a4ab61cc7a82ef592415f Mon Sep 17 00:00:00 2001 From: Corbin Simpson Date: Mon, 30 Mar 2009 17:20:12 -0700 Subject: [PATCH] r300-gallium: r500-fs: If recompiling a shader, overwrite old insts. --- src/gallium/drivers/r300/r300_state_shader.c | 5 +++++ 1 file changed, 5 insertions(+) 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)) { -- 2.30.2