i965/fs: Emit fixed-width null register regardless of the dispatch width.
authorFrancisco Jerez <currojerez@riseup.net>
Fri, 20 May 2016 04:26:51 +0000 (21:26 -0700)
committerFrancisco Jerez <currojerez@riseup.net>
Sat, 28 May 2016 06:29:05 +0000 (23:29 -0700)
brw_null_vec() cannot handle widths over 16 but it doesn't really
matter what width we specify for null registers because destination
regions have no width field at the hardware level.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/mesa/drivers/dri/i965/brw_fs_builder.h

index c1d13a2b14a706e02197aa5d68d8b2890ff86e2e..f38be6cdf4ceed88686bb2fb2c4a9a7f4ce90fab 100644 (file)
@@ -202,15 +202,13 @@ namespace brw {
       dst_reg
       null_reg_f() const
       {
-         return dst_reg(retype(brw_null_vec(dispatch_width()),
-                               BRW_REGISTER_TYPE_F));
+         return dst_reg(retype(brw_null_reg(), BRW_REGISTER_TYPE_F));
       }
 
       dst_reg
       null_reg_df() const
       {
-         return dst_reg(retype(brw_null_vec(dispatch_width()),
-                               BRW_REGISTER_TYPE_DF));
+         return dst_reg(retype(brw_null_reg(), BRW_REGISTER_TYPE_DF));
       }
 
       /**
@@ -219,8 +217,7 @@ namespace brw {
       dst_reg
       null_reg_d() const
       {
-         return dst_reg(retype(brw_null_vec(dispatch_width()),
-                               BRW_REGISTER_TYPE_D));
+         return dst_reg(retype(brw_null_reg(), BRW_REGISTER_TYPE_D));
       }
 
       /**
@@ -229,8 +226,7 @@ namespace brw {
       dst_reg
       null_reg_ud() const
       {
-         return dst_reg(retype(brw_null_vec(dispatch_width()),
-                               BRW_REGISTER_TYPE_UD));
+         return dst_reg(retype(brw_null_reg(), BRW_REGISTER_TYPE_UD));
       }
 
       /**