nvc0: values for undefined outputs must have file GPR
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Sun, 20 Feb 2011 14:10:02 +0000 (15:10 +0100)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Thu, 24 Feb 2011 16:35:35 +0000 (17:35 +0100)
src/gallium/drivers/nvc0/nvc0_tgsi_to_nc.c

index 18ae0e00c41dca0048c69fd02ffed8cd3fd67400..5e208e8623dce7e51f028855905687f5fe96fc9e 100644 (file)
@@ -133,13 +133,10 @@ struct bld_context {
 static INLINE ubyte
 bld_register_file(struct bld_context *bld, struct bld_register *reg)
 {
-   if (reg < &bld->avs[0][0]) return NV_FILE_GPR;
-   else
-   if (reg < &bld->pvs[0][0]) return NV_FILE_GPR;
-   else
-   if (reg < &bld->ovs[0][0]) return NV_FILE_PRED;
-   else
-      return NV_FILE_MEM_V;
+   if (reg >= &bld->pvs[0][0] &&
+       reg <  &bld->ovs[0][0])
+      return NV_FILE_PRED;
+   return NV_FILE_GPR;
 }
 
 static INLINE struct nv_value *