diff options
author | Connor Abbott <[email protected]> | 2015-08-03 14:40:37 -0700 |
---|---|---|
committer | Samuel Iglesias Gonsálvez <[email protected]> | 2016-05-10 11:25:03 +0200 |
commit | bb175db16b7e05ec95ce77f49ba3de67d3d2db61 (patch) | |
tree | 38c5970eed098d1028163064938f8edae2339b73 /src | |
parent | 5310bca024f77da40ea6f4c275455f9cb0528f9e (diff) |
i965: add support for getting/setting DF immediates
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Reviewed-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_inst.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_inst.h b/src/mesa/drivers/dri/i965/brw_inst.h index 0e5f61389df..f45e56400c9 100644 --- a/src/mesa/drivers/dri/i965/brw_inst.h +++ b/src/mesa/drivers/dri/i965/brw_inst.h @@ -576,6 +576,18 @@ brw_inst_imm_f(const struct brw_device_info *devinfo, const brw_inst *insn) return ft.f; } +static inline double +brw_inst_imm_df(const struct brw_device_info *devinfo, const brw_inst *insn) +{ + union { + double d; + uint64_t u; + } dt; + (void) devinfo; + dt.u = brw_inst_bits(insn, 127, 64); + return dt.d; +} + static inline void brw_inst_set_imm_d(const struct brw_device_info *devinfo, brw_inst *insn, int value) @@ -602,6 +614,19 @@ brw_inst_set_imm_f(const struct brw_device_info *devinfo, brw_inst_set_bits(insn, 127, 96, ft.u); } +static inline void +brw_inst_set_imm_df(const struct brw_device_info *devinfo, + brw_inst *insn, double value) +{ + union { + double d; + uint64_t u; + } dt; + (void) devinfo; + dt.d = value; + brw_inst_set_bits(insn, 127, 64, dt.u); +} + /** @} */ /* The AddrImm fields are split into two discontiguous sections on Gen8+ */ |