From: Connor Abbott Date: Thu, 12 Nov 2015 11:40:38 +0000 (+0100) Subject: i965: add brw_imm_df X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5310bca024f77da40ea6f4c275455f9cb0528f9e;p=mesa.git i965: add brw_imm_df v2 (Iago) - Fixup accessibility in backend_reg Signed-off-by: Iago Toral Quiroga Reviewed-by: Kenneth Graunke Reviewed-by: Jordan Justen Reviewed-by: Francisco Jerez --- diff --git a/src/mesa/drivers/dri/i965/brw_reg.h b/src/mesa/drivers/dri/i965/brw_reg.h index b84c709d3f1..6d51623960d 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; @@ -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) { diff --git a/src/mesa/drivers/dri/i965/brw_shader.h b/src/mesa/drivers/dri/i965/brw_shader.h index 0acaa4df1dc..35e7d7ae06d 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;