On Tue, Jul 12, 2016 at 11:42 PM, Samuel Iglesias Gonsálvez <[email protected]> wrote: > According to HSW's PRM, vol02b, the DIM instruction has the following > restriction: > > "Restriction : src0 must be immediate. src0 must specify the :f (F, Float) > type encoding but is an immediate 64-bit DF (Double Float) value. dst > must have type DF." > > This commit allows to upload the immediate 64-bit DF value to the source > of a DIM instruction even when it is of float type encoding. > > Signed-off-by: Samuel Iglesias Gonsálvez <[email protected]> > --- > src/mesa/drivers/dri/i965/brw_eu_emit.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_eu_emit.c > b/src/mesa/drivers/dri/i965/brw_eu_emit.c > index f2f55410..fc187d1 100644 > --- a/src/mesa/drivers/dri/i965/brw_eu_emit.c > +++ b/src/mesa/drivers/dri/i965/brw_eu_emit.c > @@ -350,7 +350,8 @@ brw_set_src0(struct brw_codegen *p, brw_inst *inst, > struct brw_reg reg) > brw_inst_set_src0_address_mode(devinfo, inst, reg.address_mode); > > if (reg.file == BRW_IMMEDIATE_VALUE) { > - if (reg.type == BRW_REGISTER_TYPE_DF) > + if (reg.type == BRW_REGISTER_TYPE_DF || > + brw_inst_opcode(devinfo, inst) == BRW_OPCODE_DIM)
I don't think this patch is needed if we treat src[0] as type-DF in the IR. _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
