i965: add brw_imm_df
authorConnor Abbott <connor.w.abbott@intel.com>
Thu, 12 Nov 2015 11:40:38 +0000 (12:40 +0100)
committerSamuel Iglesias Gonsálvez <siglesias@igalia.com>
Tue, 10 May 2016 09:25:02 +0000 (11:25 +0200)
v2 (Iago)
  - Fixup accessibility in backend_reg

Signed-off-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
src/mesa/drivers/dri/i965/brw_reg.h
src/mesa/drivers/dri/i965/brw_shader.h

index b84c709d3f16887f701426609b19922b8887cd86..6d51623960dc71cd19d88104e7feda17dec2d135 100644 (file)
@@ -254,6 +254,7 @@ struct brw_reg {
          unsigned pad1:1;
       };
 
+      double df;
       float f;
       int   d;
       unsigned ud;
@@ -543,6 +544,14 @@ brw_imm_reg(enum brw_reg_type type)
 }
 
 /** Construct float immediate register */
+static inline struct brw_reg
+brw_imm_df(double df)
+{
+   struct brw_reg imm = brw_imm_reg(BRW_REGISTER_TYPE_DF);
+   imm.df = df;
+   return imm;
+}
+
 static inline struct brw_reg
 brw_imm_f(float f)
 {
index 0acaa4df1dc287d91a7bd6448b8b33955c229c67..35e7d7ae06d08c966b162810b26fcdd857abff91 100644 (file)
@@ -90,6 +90,7 @@ struct backend_reg : private brw_reg
    using brw_reg::width;
    using brw_reg::hstride;
 
+   using brw_reg::df;
    using brw_reg::f;
    using brw_reg::d;
    using brw_reg::ud;