i965: Fix failure to upload new constant data when changing programs.
[mesa.git] / src / mesa / drivers / dri / i965 / brw_wm_fp.c
index 61805ec0809146ff25e39e3ed7d4751c74a69a28..7f7b957cbe892bfde9c390c55f4ecc44e4780d38 100644 (file)
@@ -30,9 +30,9 @@
   */
                
 
-#include "glheader.h"
-#include "macros.h"
-#include "enums.h"
+#include "main/glheader.h"
+#include "main/macros.h"
+#include "main/enums.h"
 #include "brw_context.h"
 #include "brw_wm.h"
 #include "brw_util.h"
@@ -426,10 +426,6 @@ static struct prog_src_register search_or_add_param5(struct brw_wm_compile *c,
 
    idx = _mesa_add_state_reference( paramList, tokens );
 
-   /* Recalculate state dependency: 
-    */
-   c->fp->param_state = paramList->StateFlags;
-
    return src_reg(PROGRAM_STATE_VAR, idx);
 }
 
@@ -1030,6 +1026,11 @@ void brw_wm_pass_fp( struct brw_wm_compile *c )
         precalc_txp(c, inst);
         break;
 
+      case OPCODE_TXB:
+        out = emit_insn(c, inst);
+        out->TexSrcUnit = fp->program.Base.SamplerUnits[inst->TexSrcUnit];
+        break;
+
       case OPCODE_XPD: 
         out = emit_insn(c, inst);
         /* This should probably be done in the parser.