Module: Mesa
Branch: master
Commit: aafbbf77441dedf6015a4ab61cc7a82ef592415f
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=aafbbf77441dedf6015a4ab61cc7a82ef592415f

Author: Corbin Simpson <[email protected]>
Date:   Mon Mar 30 17:20:12 2009 -0700

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

---

 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 ed9d26f..5dc7266 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)) {

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to