mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 04:30:10 +01:00
i965: add support for getting/setting DF immediates
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:
parent
5310bca024
commit
bb175db16b
1 changed files with 25 additions and 0 deletions
|
|
@ -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+ */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue