i965: add brw_imm_df

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>
This commit is contained in:
Connor Abbott 2015-11-12 12:40:38 +01:00 committed by Samuel Iglesias Gonsálvez
parent 9add73f641
commit 5310bca024
2 changed files with 10 additions and 0 deletions

View 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)
{

View 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;