i965: Hack in avoidance of c++ reserved keyword in libdrm.
[mesa.git] / src / mesa / drivers / dri / i965 / brw_wm_fp.c
index 3737faf26fb33390cda38f12704c4399a12296a7..3870bf10fcb75fca0abc7247da92645effcf0c1a 100644 (file)
@@ -37,9 +37,9 @@
 #include "brw_wm.h"
 #include "brw_util.h"
 
-#include "shader/prog_parameter.h"
-#include "shader/prog_print.h"
-#include "shader/prog_statevars.h"
+#include "program/prog_parameter.h"
+#include "program/prog_print.h"
+#include "program/prog_statevars.h"
 
 
 /** An invalid texture target */
@@ -88,6 +88,7 @@ static struct prog_src_register src_reg(GLuint file, GLuint idx)
    reg.RelAddr = 0;
    reg.Negate = NEGATE_NONE;
    reg.Abs = 0;
+   reg.HasIndex2 = 0;
    return reg;
 }
 
@@ -159,7 +160,7 @@ static struct prog_dst_register get_temp( struct brw_wm_compile *c )
    int bit = _mesa_ffs( ~c->fp_temp );
 
    if (!bit) {
-      _mesa_printf("%s: out of temporaries\n", __FILE__);
+      printf("%s: out of temporaries\n", __FILE__);
       exit(1);
    }
 
@@ -1034,18 +1035,17 @@ static void print_insns( const struct prog_instruction *insn,
 {
    GLuint i;
    for (i = 0; i < nr; i++, insn++) {
-      _mesa_printf("%3d: ", i);
+      printf("%3d: ", i);
       if (insn->Opcode < MAX_OPCODE)
-        _mesa_print_instruction(insn);
+        _mesa_fprint_instruction_opt(stdout, insn, 0, PROG_PRINT_DEBUG, NULL);
       else if (insn->Opcode < MAX_WM_OPCODE) {
         GLuint idx = insn->Opcode - MAX_OPCODE;
 
-        _mesa_print_alu_instruction(insn,
-                                    wm_opcode_strings[idx],
-                                    3);
+        _mesa_fprint_alu_instruction(stdout, insn, wm_opcode_strings[idx],
+                                     3, PROG_PRINT_DEBUG, NULL);
       }
       else 
-        _mesa_printf("965 Opcode %d\n", insn->Opcode);
+        printf("965 Opcode %d\n", insn->Opcode);
    }
 }
 
@@ -1060,9 +1060,10 @@ void brw_wm_pass_fp( struct brw_wm_compile *c )
    GLuint insn;
 
    if (INTEL_DEBUG & DEBUG_WM) {
-      _mesa_printf("pre-fp:\n");
-      _mesa_print_program(&fp->program.Base); 
-      _mesa_printf("\n");
+      printf("pre-fp:\n");
+      _mesa_fprint_program_opt(stdout, &fp->program.Base, PROG_PRINT_DEBUG,
+                              GL_TRUE);
+      printf("\n");
    }
 
    c->pixel_xy = src_undef();
@@ -1168,9 +1169,9 @@ void brw_wm_pass_fp( struct brw_wm_compile *c )
    }
 
    if (INTEL_DEBUG & DEBUG_WM) {
-      _mesa_printf("pass_fp:\n");
+      printf("pass_fp:\n");
       print_insns( c->prog_instructions, c->nr_fp_insns );
-      _mesa_printf("\n");
+      printf("\n");
    }
 }