i965: Fix the types of immediate integer values.
authorEric Anholt <eric@anholt.net>
Fri, 27 Aug 2010 20:47:37 +0000 (13:47 -0700)
committerEric Anholt <eric@anholt.net>
Fri, 27 Aug 2010 20:59:36 +0000 (13:59 -0700)
When we're trying to do integer ops, handing a float in doesn't help.

src/mesa/drivers/dri/i965/brw_fs.cpp

index cf02b214f5cf083cef90be4cce804998cac29758..98d5d65940808debd6e08e1577c97cf86bcd4dfc 100644 (file)
@@ -1422,10 +1422,10 @@ static struct brw_reg brw_reg_from_fs_reg(fs_reg *reg)
         brw_reg = brw_imm_f(reg->imm.f);
         break;
       case BRW_REGISTER_TYPE_D:
-        brw_reg = brw_imm_f(reg->imm.i);
+        brw_reg = brw_imm_d(reg->imm.i);
         break;
       case BRW_REGISTER_TYPE_UD:
-        brw_reg = brw_imm_f(reg->imm.u);
+        brw_reg = brw_imm_ud(reg->imm.u);
         break;
       default:
         assert(!"not reached");