i965/vec4: split DF instructions and later double its execsize in IVB/BYT

We need to split DF instructions in two on IVB/BYT as it needs an
execsize 8 to process 4 DF values (one GRF in total).

v2:
- Rename helper and make it static inline function (Matt).
- Fix indention and add braces (Matt).

v3:
- Don't edit IR instruction when doubling exec_size (Curro)
- Add comment into the code (Curro).
- Manage ARF registers like the others (Curro)

v4:
- Add get_exec_type() function and use it to calculate the execution
  size.

Signed-off-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
[ Francisco Jerez: Fix bogus 'type != BAD_FILE' check.  Take
  destination type as execution type where there is no valid source.
  Assert-fail if the deduced execution type is byte.  Clarify comment
  in get_lowered_simd_width().  Move SIMD width workaround outside of
  'if (...inst->size_written > REG_SIZE)' conditional block, since the
  problem should be independent of whether the amount of data written
  by the instruction is greater or lower than a GRF.  Drop redundant
  is_ivb_df definition.  Drop bogus inst->exec_size < 8 check.
  Simplify channel group assertion. ]
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
This commit is contained in:
Samuel Iglesias Gonsálvez
2016-08-29 10:10:30 +02:00
committed by Francisco Jerez
parent a5399e8b1c
commit a21dc2b500
3 changed files with 53 additions and 1 deletions

View File

@@ -1522,7 +1522,6 @@ generate_code(struct brw_codegen *p,
brw_set_default_saturate(p, inst->saturate);
brw_set_default_mask_control(p, inst->force_writemask_all);
brw_set_default_acc_write_control(p, inst->writes_accumulator);
brw_set_default_exec_size(p, cvt(inst->exec_size) - 1);
assert(inst->group % inst->exec_size == 0);
assert(inst->group % 8 == 0 ||
@@ -1530,6 +1529,16 @@ generate_code(struct brw_codegen *p,
inst->src[0].type == BRW_REGISTER_TYPE_DF ||
inst->src[1].type == BRW_REGISTER_TYPE_DF ||
inst->src[2].type == BRW_REGISTER_TYPE_DF);
unsigned exec_size = inst->exec_size;
if (devinfo->gen == 7 &&
!devinfo->is_haswell &&
(get_exec_type_size(inst) == 8 ||
inst->dst.type == BRW_REGISTER_TYPE_DF))
exec_size *= 2;
brw_set_default_exec_size(p, cvt(exec_size) - 1);
if (!inst->force_writemask_all)
brw_set_default_group(p, inst->group);