fragment shader function call fix, gl_FragCoord fix
authorZou Nan hai <nanhai.zou@intel.com>
Sun, 30 Sep 2007 05:47:05 +0000 (13:47 +0800)
committerZou Nan hai <nanhai.zou@intel.com>
Sun, 30 Sep 2007 05:47:05 +0000 (13:47 +0800)
src/mesa/drivers/dri/i965/brw_eu.h
src/mesa/drivers/dri/i965/brw_wm_glsl.c

index d44217d02fa4c271b9d4f25927e4bda0bc2452ac..5c98767c3e573ef991cba010da44e4bd7301d4b9 100644 (file)
@@ -648,6 +648,11 @@ static __inline struct brw_reg deref_1uw(struct brw_indirect ptr, GLint offset)
    return retype(deref_1f(ptr, offset), BRW_REGISTER_TYPE_UW);
 }
 
+static __inline struct brw_reg deref_1ud(struct brw_indirect ptr, GLint offset)
+{
+   return retype(deref_1f(ptr, offset), BRW_REGISTER_TYPE_UD);
+}
+
 static __inline struct brw_reg get_addr_reg(struct brw_indirect ptr)
 {
    return brw_address_reg(ptr.addr_subnr);
index 1f1e32ee47e2d206cd0fbfc8dd1ae873d504ce4c..58cdf72e372d36058da2a0961639304aa9cb87b8 100644 (file)
@@ -966,7 +966,7 @@ static void emit_wpos_xy(struct brw_wm_compile *c,
        /* TODO -- window_height - Y */
        brw_MOV(p,
                dst[1],
-               negate(retype(src0[1], BRW_REGISTER_TYPE_UW)));
+               retype(src0[1], BRW_REGISTER_TYPE_UW));
 
     }
 }
@@ -1272,7 +1272,7 @@ static void brw_wm_emit_glsl(struct brw_wm_compile *c)
                brw_push_insn_state(p);
                brw_set_mask_control(p, BRW_MASK_DISABLE);
                 brw_set_access_mode(p, BRW_ALIGN_1);
-                brw_ADD(p, deref_1uw(stack_index, 0), brw_ip_reg(), brw_imm_d(3*16));
+                brw_ADD(p, deref_1ud(stack_index, 0), brw_ip_reg(), brw_imm_d(3*16));
                 brw_set_access_mode(p, BRW_ALIGN_16);
                 brw_ADD(p, get_addr_reg(stack_index),
                          get_addr_reg(stack_index), brw_imm_d(4));
@@ -1288,7 +1288,7 @@ static void brw_wm_emit_glsl(struct brw_wm_compile *c)
                 brw_ADD(p, get_addr_reg(stack_index),
                         get_addr_reg(stack_index), brw_imm_d(-4));
                 brw_set_access_mode(p, BRW_ALIGN_1);
-                brw_MOV(p, brw_ip_reg(), deref_1uw(stack_index, 0));
+                brw_MOV(p, brw_ip_reg(), deref_1ud(stack_index, 0));
                 brw_set_access_mode(p, BRW_ALIGN_16);
                brw_pop_insn_state(p);