Fix fetching integer inputs.
authorJosé Fonseca <jose.r.fonseca@gmail.com>
Thu, 17 May 2012 23:55:13 +0000 (00:55 +0100)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Thu, 17 May 2012 23:55:13 +0000 (00:55 +0100)
src/gallium/auxiliary/gallivm/lp_bld_tgsi_soa.c

index a9d69a3..412dc0c 100644 (file)
@@ -704,7 +704,15 @@ emit_fetch_input(
          res = bld->inputs[reg->Register.Index][swizzle];
       }
    }
+
    assert(res);
+
+   if (stype == TGSI_TYPE_UNSIGNED) {
+      res = LLVMBuildBitCast(builder, res, bld_base->uint_bld.vec_type, "");
+   } else if (stype == TGSI_TYPE_SIGNED) {
+      res = LLVMBuildBitCast(builder, res, bld_base->int_bld.vec_type, "");
+   }
+
    return res;
 }