nvc0: fix immediate arg for SHL/SHR
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Thu, 9 Dec 2010 13:43:11 +0000 (14:43 +0100)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Thu, 9 Dec 2010 13:43:11 +0000 (14:43 +0100)
src/gallium/drivers/nvc0/nvc0_pc_emit.c

index 4edbdb22e5c61b6b6c59046f83ab9fd876630e93..6735f93fd3c89476ca2bac0071f50a14bca075d6 100644 (file)
@@ -153,10 +153,15 @@ set_immd_u32(struct nv_pc *pc, uint32_t u32)
 {
    if ((pc->emit[0] & 0xf) == 0x2) {
       set_immd_u32_l(pc, u32);
+   } else
+   if ((pc->emit[0] & 0xf) == 0x3) {
+      assert(!(pc->emit[1] & 0xc000));
+      pc->emit[1] |= 0xc000;
+      assert(!(u32 & 0xfff00000));
+      set_immd_u32_l(pc, u32);
    } else {
       assert(!(pc->emit[1] & 0xc000));
       pc->emit[1] |= 0xc000;
-
       assert(!(u32 & 0xfff));
       set_immd_u32_l(pc, u32 >> 12);
    }