[Mesa-dev] [PATCH 07/24] i965/fs: Emit fixed-width null register regardless of the dispatch width.

Francisco Jerez currojerez at riseup.net
Fri May 27 03:46:12 UTC 2016


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.
---
 src/mesa/drivers/dri/i965/brw_fs_builder.h | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_fs_builder.h b/src/mesa/drivers/dri/i965/brw_fs_builder.h
index c1d13a2..f38be6c 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_builder.h
+++ b/src/mesa/drivers/dri/i965/brw_fs_builder.h
@@ -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));
       }
 
       /**
-- 
2.7.3



More information about the mesa-dev mailing list