fix fd.o bug #13847
authorZou Nan hai <nanhai.zou@intel.com>
Sat, 29 Dec 2007 07:28:51 +0000 (15:28 +0800)
committerZou Nan hai <nanhai.zou@intel.com>
Sat, 29 Dec 2007 07:28:51 +0000 (15:28 +0800)
src/mesa/drivers/dri/i965/brw_eu.h
src/mesa/drivers/dri/i965/brw_vs_emit.c

index 5c98767c3e573ef991cba010da44e4bd7301d4b9..5ef8fef09df0d64da130148b48a63c6a4a4d73e7 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_1d(struct brw_indirect ptr, GLint offset)
+{
+   return retype(deref_1f(ptr, offset), BRW_REGISTER_TYPE_D);
+}
+
 static __inline struct brw_reg deref_1ud(struct brw_indirect ptr, GLint offset)
 {
    return retype(deref_1f(ptr, offset), BRW_REGISTER_TYPE_UD);
index e62de186ae3d9afa2bfa4fae2a222d8486a0634c..7322123fb464d4d0dd7bc3c65a8886ee82e4a754 100644 (file)
@@ -1137,7 +1137,7 @@ void brw_vs_emit(struct brw_vs_compile *c )
         break;
       case OPCODE_CAL:
         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_1d(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));
@@ -1148,7 +1148,7 @@ void brw_vs_emit(struct brw_vs_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_1d(stack_index, 0));
         brw_set_access_mode(p, BRW_ALIGN_16);
       case OPCODE_END: 
          brw_ADD(p, brw_ip_reg(), brw_ip_reg(), brw_imm_d(1*16));