intel/fs: Exclude control sources from execution type and region alignment calculations.
authorFrancisco Jerez <currojerez@riseup.net>
Thu, 17 Jan 2019 02:30:08 +0000 (18:30 -0800)
committerFrancisco Jerez <currojerez@riseup.net>
Thu, 21 Feb 2019 22:07:25 +0000 (14:07 -0800)
commitc3c27762f787a93ee3f27189bef8d7cdcb3a6cab
treeaa51a2a70d64104ff31b4746d79e5cc5aa37b4e6
parentd9e08e753bf4125edcdb561bbe80547999eb8e32
intel/fs: Exclude control sources from execution type and region alignment calculations.

Currently the execution type calculation will return a bogus value in
cases like:

  mov_indirect(8) vgrf0:w, vgrf1:w, vgrf2:ud, 32u

Which will be considered to have a 32-bit integer execution type even
though the actual indirect move operation will be carried out with
16-bit precision.

Similarly there's no need to apply the CHV/BXT double-precision region
alignment restrictions to such control sources, since they aren't
directly involved in the double-precision arithmetic operations
emitted by these virtual instructions.  Applying the CHV/BXT
restrictions to control sources was expected to be harmless if mildly
inefficient, but unfortunately it exposed problems at codegen level
for virtual instructions (namely the SHUFFLE instruction used for the
Vulkan 1.1 subgroup feature) that weren't prepared to accept control
sources with an arbitrary strided region.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109328
Reported-by: Mark Janes <mark.a.janes@intel.com>
Fixes: efa4e4bc5fc "intel/fs: Introduce regioning lowering pass."
Tested-by: Anuj Phogat <anuj.phogat@gmail.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/compiler/brw_fs.cpp
src/intel/compiler/brw_fs_lower_regioning.cpp
src/intel/compiler/brw_ir_fs.h