On Thu, Jan 5, 2017 at 5:07 AM, Samuel Iglesias Gonsálvez <sigles...@igalia.com> wrote: > We need to split DF instructions in two on IVB/VLV as it needs an > execsize 8 to process 4 DF values (one GRF in total). > > Signed-off-by: Samuel Iglesias Gonsálvez <sigles...@igalia.com> > --- > src/mesa/drivers/dri/i965/brw_ir_vec4.h | 1 + > src/mesa/drivers/dri/i965/brw_vec4.cpp | 20 +++++++++++++++++++- > src/mesa/drivers/dri/i965/brw_vec4_generator.cpp | 15 +++++++++++++-- > 3 files changed, 33 insertions(+), 3 deletions(-) > > diff --git a/src/mesa/drivers/dri/i965/brw_ir_vec4.h > b/src/mesa/drivers/dri/i965/brw_ir_vec4.h > index 57fc6be..9291be0 100644 > --- a/src/mesa/drivers/dri/i965/brw_ir_vec4.h > +++ b/src/mesa/drivers/dri/i965/brw_ir_vec4.h > @@ -291,6 +291,7 @@ public: > bool can_do_writemask(const struct gen_device_info *devinfo); > bool can_change_types() const; > bool has_source_and_destination_hazard() const; > + unsigned exec_data_size() const; > > bool is_align1_partial_write() > { > diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp > b/src/mesa/drivers/dri/i965/brw_vec4.cpp > index b5e846d..6ba85d7 100644 > --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp > +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp > @@ -301,6 +301,19 @@ vec4_instruction::can_change_types() const > !src[1].abs && !src[1].negate)); > } > > +unsigned > +vec4_instruction::exec_data_size() const > +{ > + unsigned exec_data_size = 0; > + > + for (int i = 0; i < 3; i++) { > + if (this->src[i].type != BAD_FILE) > + exec_data_size = MAX2(exec_data_size, type_sz(this->src[i].type));
Indentation, use braces. > + } > + > + return exec_data_size; > +} I think this should become a static inline function for the reasons Curro mentioned in the fs patch. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev