diff options
author | Corbin Simpson <[email protected]> | 2009-03-30 17:20:12 -0700 |
---|---|---|
committer | Corbin Simpson <[email protected]> | 2009-03-30 17:20:12 -0700 |
commit | aafbbf77441dedf6015a4ab61cc7a82ef592415f (patch) | |
tree | 1c96ce1a51693144c4c8f6e7db388315fa793b5c /src/gallium/drivers/r300/r300_state_shader.c | |
parent | 70de577b14e9b0efab7a749203d50dc19540472d (diff) |
r300-gallium: r500-fs: If recompiling a shader, overwrite old insts.
Diffstat (limited to 'src/gallium/drivers/r300/r300_state_shader.c')
-rw-r--r-- | src/gallium/drivers/r300/r300_state_shader.c | 5 |
1 files changed, 5 insertions, 0 deletions
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)) { |