[Mesa-dev] [PATCH 12/59] i965: add brw_imm_df
Samuel Iglesias Gonsálvez
siglesias at igalia.com
Fri Apr 29 11:29:09 UTC 2016
From: Connor Abbott <connor.w.abbott at intel.com>
v2 (Iago)
- Fixup accessibility in backend_reg
Signed-off-by: Iago Toral Quiroga <itoral at igalia.com>
---
src/mesa/drivers/dri/i965/brw_reg.h | 9 +++++++++
src/mesa/drivers/dri/i965/brw_shader.h | 1 +
2 files changed, 10 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_reg.h b/src/mesa/drivers/dri/i965/brw_reg.h
index b84c709..6d51623 100644
--- a/src/mesa/drivers/dri/i965/brw_reg.h
+++ b/src/mesa/drivers/dri/i965/brw_reg.h
@@ -254,6 +254,7 @@ struct brw_reg {
unsigned pad1:1;
};
+ double df;
float f;
int d;
unsigned ud;
@@ -544,6 +545,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)
{
struct brw_reg imm = brw_imm_reg(BRW_REGISTER_TYPE_F);
diff --git a/src/mesa/drivers/dri/i965/brw_shader.h b/src/mesa/drivers/dri/i965/brw_shader.h
index fc228f6..f6f6167 100644
--- a/src/mesa/drivers/dri/i965/brw_shader.h
+++ b/src/mesa/drivers/dri/i965/brw_shader.h
@@ -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;
--
2.5.0
More information about the mesa-dev
mailing list